Count profits and close some of the positions

Tarea técnica

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!

 


Han respondido

1
Desarrollador 1
Evaluación
(66)
Proyectos
95
28%
Arbitraje
20
25% / 55%
Caducado
24
25%
Libre
2
Desarrollador 2
Evaluación
(53)
Proyectos
79
18%
Arbitraje
13
15% / 54%
Caducado
5
6%
Libre
3
Desarrollador 3
Evaluación
(620)
Proyectos
680
57%
Arbitraje
25
16% / 60%
Caducado
228
34%
Libre
4
Desarrollador 4
Evaluación
(593)
Proyectos
925
46%
Arbitraje
31
39% / 29%
Caducado
93
10%
Trabaja
5
Desarrollador 5
Evaluación
(28)
Proyectos
47
23%
Arbitraje
13
31% / 15%
Caducado
12
26%
Libre
6
Desarrollador 6
Evaluación
(89)
Proyectos
137
24%
Arbitraje
35
9% / 40%
Caducado
52
38%
Libre
7
Desarrollador 7
Evaluación
(219)
Proyectos
370
42%
Arbitraje
145
17% / 41%
Caducado
124
34%
Libre
Solicitudes similares
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
NB: Given price is a placeholder only. Fees are negotiable. I’m looking for a developer who could make an expert advisor (EA) that will Auto copy telegram signals to an MT4 account. 1. Read and copy trading signals posted in specific telegram channels with different formats to MT4. 2. Copy all the signals including entry price, stop loss, and take profit levels 1 to 3 (if any). 3. Read customized messages on telegram
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

Información sobre el proyecto

Presupuesto
20 - 30 USD
Para el ejecutor
18 - 27 USD
Plazo límite de ejecución
de 3 a 5 día(s)