Forum

Execute function at start time

Hello friends, I am trying to run function at the time I need, but function ignoring the given time. bool IsBelowMA() { double Time_S = Hour() + Minute() / 100.0 ; // Ensure the function executes only after Time_Start if (Time_S >= Time_Start) { for ( int i = 0 ; i <

Delay before closing all orders

Hi, I am trying to find the way how to delay my function CloseAll (closing all orders) before it will execute. So once EA see profit it should pause for couple seconds (let say for 10 sec) and after CloseAll will take place. here is my part of EA. Could you please advise what to add ? double