How to achieve "wait" in seconds?
-
let say the ea buys when EMA 5 crosses above EMA 20, but now i want the ea to wait for 30 seconds before opening the trade.
meaning EMA crosses above EMA 30, wait for 30 seconds and then open the trade -
The key factor is the moment you want to be considered as crossing happened. I mean, are you looking for candle ID 1 or 0 to be checked? I guess it is ID 0, but then consider all issues related to it.
-
@l-andorrà candle 0 , this is what i am trying , fast ema crosses above slow ema , then wait 30 seconds and , if the ema fast is still above the ema slow then enter buy
-
I never work with time, so this is just a guess, by try this:
https://fxdreema.com/shared/eglnRYR2cinfo:
https://www.mql5.com/en/forum/162999
https://www.mql5.com/en/docs/dateandtime/timecurrent -
@roar thanks bro
it works like charm