Count profits and close some of the positions

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 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!

 


Responded

1
Developer 1
Rating
(66)
Projects
95
28%
Arbitration
20
25% / 55%
Overdue
24
25%
Free
2
Developer 2
Rating
(53)
Projects
79
18%
Arbitration
13
15% / 54%
Overdue
5
6%
Free
3
Developer 3
Rating
(620)
Projects
680
57%
Arbitration
25
16% / 60%
Overdue
228
34%
Free
4
Developer 4
Rating
(585)
Projects
917
46%
Arbitration
31
39% / 29%
Overdue
93
10%
Free
5
Developer 5
Rating
(28)
Projects
47
23%
Arbitration
13
31% / 15%
Overdue
12
26%
Free
6
Developer 6
Rating
(89)
Projects
137
24%
Arbitration
35
9% / 40%
Overdue
52
38%
Free
7
Developer 7
Rating
(219)
Projects
370
42%
Arbitration
145
17% / 41%
Overdue
124
34%
Free
Similar orders
I need help getting pineconnector working in mt5 the alerts from TV to mt5 work fine What is happening now is that if I am in a long position and a short position comes through it is not closing off the original position to only then keep the short position open. I have tried hedging - netting in the pineconnector settings but still no luck. The issue is that if I am in a long position and then alerts come through to
Hi I need access to Pocket option OTC charts where I can apply my tradingview indicator. I have the indicator but I need access to OTC charts to apply them! Please help
Tenho um endereço de API que retorna informações, a cada 1 minuto faremos uma consulta e mostraremos em um painel, é necessário validar se todos os tempos gráficos retornaram, em alguns momentos pode não retornar todos os dados. https://integra.tasdigital.com.br/GetIndicadoresForexDataAtualProducao/XAUUSD
Hi, Do you have an indicator or expert and would like to protect and control it? What you will get protection and control Customer control panel The number of products is unlimited. You can add any number of your own experts and consultations You can give a trial period for your product, for example a week or a month, after which the customer subscribes Monthly, annually, or for life, depending on the customer’s
I need an EA to automate Tradingview alerts on MT4 using webhook alerts. The bridge/connector should be python based GUI. Required features at a minimum Mapping Tradingview alert formats to MT4 Automating market, limit and stop orders with entry price, stop loss, multiple TPs and trailing stop Lot sizing - fixed/% of balance/fixed amount breakeven, partial close and trailing stop Mapping pair name prefixes/suffixes
Hello, I am looking for an experienced and professional developer to create a trade copier that transfers trades from MetaTrader 5 (MT5) to NinjaTrader 8 (NT8). I am looking for a developer with a strong track record in creating MT5 to NT8 trade copiers and who can deliver a robust and reliable solution. Thank you, and I look forward to your proposals
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 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
1. Combination of Market Profiles on daily basis a) this should be combined if the bell curve is similar to the previous day. Rotational day (volume - standard deviation). b) If breakout, new range should be drawn Conclusion: Market profile should be combined on daily after the market is closed 2. Use Vwap indicator, with 0.5 - slow trend, 1.0 - normal trend, 1.5 fast trend. The stop loss should be under the trend
I want to find a Developer to perform this work and settle payments in this Application. I undertake not to communicate with Applicants anywhere else except this Application, including third-party messengers, personal correspondence or emails. I understand that violators will be banned from publishing Orders in the Freelance service. I have read the Rules of using the Freelance service and accept them. I agree

Project information

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