Duration of a Trade. Time a trade is open. ORDER_TIME_DONE_MSC.
Good day,
I have an EA to perform an Ordermodify function after the Trade has been opened for a certain Period.
The logic is simple:
Step 1: Enter a trade
Step 2: If the trade is open for longer than Time "T1" but less than "T2", perform Ordermodify and reduce the TP.
Step 3: If the trade is open for longer than Time "T2" but less than "T3", perform another Ordermodify and reduce TP again.
Step 4: IF the trade is open for longer than "T3" , close all trades.
============================================================================================================
I have tried to use this within a loop.
to get the time of the trade, it does not work.
It looks like you're mixing position functions with order functions which won't work.
- www.mql5.com
- 2021.06.03
- Fernando Carreiro
- www.mql5.com
Good day,
I have an EA to perform an Ordermodify function after the Trade has been opened for a certain Period.
The logic is simple:
Step 1: Enter a trade
Step 2: If the trade is open for longer than Time "T1" but less than "T2", perform Ordermodify and reduce the TP.
Step 3: If the trade is open for longer than Time "T2" but less than "T3", perform another Ordermodify and reduce TP again.
Step 4: IF the trade is open for longer than "T3" , close all trades.
============================================================================================================
I have tried to use this within a loop.
to get the time of the trade, it does not work.