Do you use "every tick" mode?
and tics can come with a larger interval than every 20 sec.
mat7tnt:
I want to get current price and price of 20 seconds later in stratgy tester
not and ideal solutions, but you should get the price;
void OnTick() { double current_ask = SymbolInfoDouble(_Symbol, SYMBOL_ASK); Print("Current ask : ",current_ask); Sleep(20*1000); // Sleep 20 seconds RefreshRates(); double current_ask_new = SymbolInfoDouble(_Symbol, SYMBOL_ASK); Print("New ask : ",current_ask_new); Print("End of tick loops"); }
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
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:
But in stratgy tester it just show the current price not the 20 later price, Do you have any idea?