EA don't trade at 20.00 - 00.01 everyday.

To add comments, please log in or register
Aphicha Anothai
131
Aphicha Anothai  

I use condition.

if Profit today >= Profit need of day than trade again next day.

but My EA Don't Open order at 20.00-00.01 everday.

I don't understand why!!!

I test in Backtest.My EA can Open Order at 20.00-00.01.

This My:

 

extern int NextOpenTradeAfterTOD_Hour = 00;
extern int NextOpenTradeAfterTOD_Min = 00; 
datetime NextTradeTime = 0; 

NextTradeTime = StringToTime(IntegerToString(NextOpenTradeAfterTOD_Hour)+":"+IntegerToString(NextOpenTradeAfterTOD_Min));

   if( Profit_Today <= Profit_Need_of_day && NextTradeTime <= TimeCurrent()) NextTradeTime += 86400;
        

  if(TimeCurrent() <= NextTradeTime) return;

  MyOrderSend();

  
img
To add comments, please log in or register