Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
I wanted to log MT4 ticks for external analysis. I used test code in an EA like this (running on a 1M forex chart)
void OnTick()
{
MqlTick last_tick;
//---
if(SymbolInfoTick(Symbol(),last_tick))
{
Print(last_tick.time,": Bid = ",last_tick.bid,
" Ask = ",last_tick.ask," Volume = ",last_tick.volume);
}
else Print("SymbolInfoTick() failed, error = ",GetLastError());
//---
}
Looking at the EA log I was expecting to find the OHLC values of a chart bar would correspond to ticks logged within any given minute.
This is not the case - I find OHLC values from bar often have no correspoding entry in tick log for that minute.
I am not really familiar with MT4 workings so maybe someone can explain why this is.
What time reference does MT4 use to collate ticks into a 1min bar for chart (I assume it is server time)
I thought myabe MT4 was missing ticks but the EA does no real processing.
Thanks
John