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
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