Hello
I have a simple mql code, I want to get current price and price of 20 seconds later in stratgy tester, Here is my code:
int _time_waiting=0;
int _PauseTime=TimeCurrent();
void OnTick()
{
//---
double current_bid = SymbolInfoDouble(_Symbol, SYMBOL_BID);
double current_ask = SymbolInfoDouble(_Symbol, SYMBOL_ASK);
Print(current_ask);
_time_waiting = _PauseTime + 20; // wait for 20 sec
if ( TimeCurrent() >= _time_waiting ) // wait until 20 seconds have passed
{
double current_ask_new = SymbolInfoDouble(_Symbol, SYMBOL_ASK);
Print(current_ask_new);
}
But in strategy tester it just show the current price not the 20 later price, Do you have any idea?