Lavoro terminato
Specifiche
Currently this EA is taking order upon conditions met for 3 indicators (TEMA , PSAR & MACD ) in 2 modes
Mode 1 : it closes previous order before opening next one and so on
OR
MOde 2 : it keep previous order open and open the next one ... and so on
What I want to add is a Accumulative TP parameter(s)
Accumulated TP mode : on/off (when off All below is discarded )
Accumulated TP value = A = (this value I should be able to enter in XX USD)
Accumulated TP Action : (2 Options)
A. Reset Lot size only
B. Close order (All existing orders) and Reset Lot size
Example for A :
Mode 1:
We have orders O1 ,O2 , O3 … etc . each one close before the second one is opened as explained
Accumulated TP mode : on
Accumulated TP value = 10 USD
Accumulated TP Action >> A: Reset Lot size only
O1 is closed with loss -2 USD (including Swap fees ..etc ) , O2 opened
Then O2 is closed as well with loss -7 USD , O3 Opened
Then O3 is closed with a profit of +22 USD
So EA now should understand that since I attached the EA to the chart it has executed 3 orders , with total profit of -2-7+22=13 USD
Since 13 USD is greater than (or equal) 10 ( Defined TP Accumulative Value) , the EA should reset the lot size
Accordingly next order ( order number 4 ) … O4 should be opened with the initial lot size we had for O1 and start over …..
Here we waited for O3 to be closed to take the decision of lot size resetting
O4 for the EA will considered as O1 for TP accumulative calculations next cycle (cycle completion is triggered by lot size resetting )
Mode 2 :
This option cannot work with MODE 2
Example for B :
Mode 1:
We have orders O1 ,O2 , O3 … etc . each one close before the second one is opened as explained
Accumulated TP mode : on
Accumulated TP value = 10 USD
Accumulated TP Action >> B. Close order and Reset Lot size
O1 is closed with loss -2 USD (including Swap fees ..etc ) , O2 opened
O2 is closed as well with loss -7 USD , O3 Opened
O3 is still open , however it is making a profit of 19 USD so far
Since total accumulative TP is now -2-7+19=10 , which is equal to Accumulative value A=10 USD , Action : EA should close O3 , reset the lot size and wait for the next signal to open O4 (O4 will be opened with the initial lot size )
O4 for the EA will considered as O1 for TP accumulative calculations next cycle (cycle completion is triggered by lot size resetting )
Mode 2 :
Orders open O1 ,O2 ,O3 and are not closed yet
Accumulated TP mode : on
Accumulated TP value = 10 USD
Accumulated TP Action >> B. Close order (All open orders ) and Reset Lot size
IF total profit of the opened orders = 10 , then EA should close all 3 orders , reset the lot size and start over
Thanks