MT4 Ticks logged not corresponding with 1 min chart bar

Back to topics list To post a new topic, please log in or register
cyborg1999 2015.12.30 15: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;
    Print(last_tick.time,": 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.



Back to topics list  

To add comments, please log in or register