Count profits and close some of the positions

MQL4 专家 积分

指定

I would like to have a new function in my EA.

later i will upload the EA for Integration in the EA.



New Funktion:

extern bool   useBasketprofitpct_Low_high=true;         //new function
extern double basketprofitpct_Low_high=2;                    //new function

 If „xtern bool   useBasketprofitpct_Low_high=true;“
„extern double basketprofitpct_Low_high=2; „
à count profit closed buy-position (like „extern bool   useBasketprofitpct=true;“ but only the buy-posistions)
à count profit of the lowest open sell-position
à if (profit closed buy positions (similar like „useBasketprofitpct“) + profit of the lowest open sell posistion >=basketprofitpct_low_high*0.01*AccountBalance()
                then close all open buy-posistions and the lowest-open-sell-position

à count profit closed sell-position (like „extern bool   useBasketprofitpct=true;“ but only the sell-posistions)
à count profit of the highest open buy-position
à if (profit closed sell positions (similar like „useBasketprofitpct“) + profit of the highest open buy posistion >=basketprofitpct_low_high*0.01*AccountBalance()
                then close all open sell-posistions and the highest-open-buy-position

 

 

 

Function in the EA: „useBasketprofitpct“

    if(useBasketprofitpct)

     {

      if(basketpercentflag=="CLOSE")if(countall(1)==0)basketpercentflag="";

      if(countprofit(1)>=nd(basketprofitpct*0.01*AccountBalance(),2) || countprofit(1)<=-1*nd(basketlosspct*0.01*AccountBalance(),2)) basketpercentflag="CLOSE";

      if(basketpercentflag=="CLOSE")

        {

         close(OP_BUY);close(OP_SELL);deletes(7);deletes(8);

         timex=TimeCurrent();

        }

      //Comment("\nprofit = "+DoubleToStr(countprofit(1),2));

     }

 

ààà// i wanna the same just only fort he buy and the sell-posistions and adding the lowestsellposion and hightestbuyposistion!

 


反馈

1
开发者 1
等级
(66)
项目
95
28%
仲裁
20
25% / 55%
逾期
24
25%
空闲
2
开发者 2
等级
(53)
项目
79
18%
仲裁
13
15% / 54%
逾期
5
6%
空闲
3
开发者 3
等级
(620)
项目
680
57%
仲裁
25
16% / 60%
逾期
228
34%
空闲
4
开发者 4
等级
(600)
项目
934
46%
仲裁
31
39% / 29%
逾期
93
10%
工作中
5
开发者 5
等级
(28)
项目
47
23%
仲裁
13
31% / 15%
逾期
12
26%
空闲
6
开发者 6
等级
(89)
项目
137
24%
仲裁
35
9% / 40%
逾期
52
38%
空闲
7
开发者 7
等级
(219)
项目
370
42%
仲裁
145
17% / 41%
逾期
124
34%
空闲
相似订单
ENGULFING TRAILING STOP GRID MQL5 I WANT AN AUTOTRADER WITH: - AUTOMATED ENGULFING UNLIMITED GRID ORDERS DISTANCE (IN POINTS). - ORDER LOT SIZE FREE MARGING PORCENTAGE (IN POINTS AND DECIMALS - 0.0000000000 UNLIMITED). - CLOSING ORDERS ONLY WITH PROFIT TRAILING STOPS (IN MINIMUM POINTS). -
Hi Auto trading robot in mt4 need to be develop simple price action strategy i can pay 30 usd for this interested coder can ask for more details then i can share strategy details who is ready to do it
i am looking for experienced programmers who can help me out make my expert with zero lags and run smoothly and develop it in any possible way that make the accuracy way higher i need in addition to make this expert advisor linked on mt4 and mt5 also link the ea to WhatsApp and telegram bot where it giveS signals of the expert on it
Mr fano 30+ USD
I want a robot that will teach me how to be a good Forex trader, teach me the necessary requirements,and also teach me how the save. And a robot that will understand my needs and support me when I'm lost or don't understand a certain thing.. The robot should have good trading skills. Thank you
I need help with this, Hi i want a bot that will send orders to efood delivery app If you have experience about message to get started immediately pls i need it urgent
I have multiple fx accounts with a couple of brokers and I use myfxbook to monitor daily/weekly/monthly profits of these accounts. I would like view all the accounts Daily/Weekly/Monthly profits on a single page which is not possible with myfxbook currently. If someone can code an EA (or an API) to send these details to a Web Request, I can code on the client side to display them. Details I would like to get: -
Hi I need a simple dashboard for manual trading. must be an EA and must work in the strategy tester but also on live/demo account and must allow me to open/close/partially close. required elements: instruments (A & B) lot size to open for each instrument ticket identification for the orders to amend (whatever is required to identify precisely the order to amend). open/close Close can be full or partial If partial the
Tenho um EA que preciso: Desde correções como conectar filtros existentes à lógica já inserida no sistema. insira novos filtros no ea com nova lógica e conecte-se com a lógica existente. Há várias pequenas tarefas a serem concluídas, gosto de fazê-las em partes para que haja uma avaliação adequada e depois passar para a próxima etapa. ea contém +6k linhas de código e está em português. Embora eu não entenda de
Fellow devs, I need help converting a futures trading bot from python into MQL5. Code base for the bot already exists, backtests in python look good, however I need to be able to backtest it on tick data with MT5. Would appreciate someone who has experience with futures bots specifically, and even better if you have experience with AMP brokers, and can provide guidance and improvement criteria. A point you note, I
I wanna earn money in the right way on meta 5 trader, i wanna trade to make profit through my incomes and investing a lot of money on meta 5 trader. I already know how to trade on meta 5 trader because i got a demo account on meta 5 trader then now i wanna make real money on meta 5 trader, im ready to invest my money on meta 5 trader to make more profitable investments. Meta 5 trader is a great app to open a real

项目信息

预算
20 - 30 USD
开发人员
18 - 27 USD
截止日期
 3  5 天