MT4 Ticks logged not corresponding with 1 min chart bar New comment [Deleted] 2015.12.30 14:57 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.ThanksJohn why not has volume in MqlTick data Errors, bugs, questions Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes New comment
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