Error in backtesting with MT5 1595

 

Hi,

I have updated the MT5 to 1595 version and now I have pb with backtesting (in demo no, it's ok).

The problem is in OnTradeTransaction when I call the HistorySelect. This leads to a block of execution

That is a code sample

void  OnTradeTransaction(
    const MqlTradeTransaction&    trans,        // trade transaction structure
    const MqlTradeRequest&          request,      // request structure
    const MqlTradeResult&           result        // result structure
    ){
    
   datetime now = TimeCurrent();
   datetime from = now - PeriodSeconds(PERIOD_H1);
   HistorySelect(from, now);

   Alert("bye");
}

First of update, all was ok.

Does anyone have the solution?

It's a bug?

Thanks

Reason: