New function profit counting and closing

MQL4 Experts Integration

Specification


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 …….   useBasketprofitpct_Low_high=true;          //new function

extern …….. basketprofitpct_Low_high=2;                         //new function

 

If „extern bool   useBasketprofitpct_Low_high=true;“
„extern ……. basketprofitpct_Low_high=2; „

>>count-profit-closed-buy-position (like „extern bool   useBasketprofitpct=true;“ but only the buy-posistions)
>>count-profit-open-buy-posistions
>>count-profit-of-the-lowest-open-sell-position
>>if (profit-closed-buy-positions (similar like „useBasketprofitpct“) + profit-open-buy-posistions + 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-open-sell-posistions
>>count-profit-of-the-highest-open-buy-position
>>if (profit-closed-sell-positions (similar like „useBasketprofitpct“) + profit-open-sell-posistions + 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 for the buy and the sell-posistions and adding the lowestsellposion and hightestbuyposistion!

 



Responded

1
Developer 1
Rating
(362)
Projects
504
40%
Arbitration
147
18% / 72%
Overdue
98
19%
Busy
2
Developer 2
Rating
(298)
Projects
427
26%
Arbitration
18
61% / 33%
Overdue
26
6%
Free
3
Developer 3
Rating
(53)
Projects
79
18%
Arbitration
13
15% / 54%
Overdue
5
6%
Free
4
Developer 4
Rating
(258)
Projects
395
28%
Arbitration
69
19% / 49%
Overdue
120
30%
Free
Similar orders
Hi there ,I am seeking for some who can I integrate MT4+MT5 into Matlab!We need our indicator window of MT4+MT5 viewable in Matlab so we can execute more research on Matlab Best regards Richie
I wan to oder a product for copytrade online like that : - master on mt4 - slaver (copier) by python that mean MT4 open an oder, python will open the same on client account => python will click the mouse then results will show manual (not expert) value : autolot (ratio with receiver balance) - fixed lot - Smart ratio (ratio with master account) trade on many pairs get source for manage license hide everything that
We trading using C# application running via API https://www.mtsocketapi.com to send orders and some other commands to MT5. We have to read UT bot alert indicator in our C# application
I NEED TO HAVE MY INDICATOR CONVERTED TO PINESCRIPT. IF YOU CHARGE PER LINES PLEASE ADVISE ALSO I NEED THIS DONE QUICKLY. IF YOU ARE ABLE FINISH WITHIN A DAY OR 2 PLEASE APPLY. THE INDICATOR IS BASED OFF ZIG ZAG AND RSI

Project information

Budget
20 - 30 USD
For the developer
18 - 27 USD
Deadline
from 2 to 3 day(s)