I'm not positive if this is the ideal place to ask. When it isn't please direct me to the ideal spot to ask
am new to programming in MQL4 along with the metatrader app and I'm confused about backtesting and the Time functions.I ran the app in the metatrader tester along with the journal messages I get are quite confusing. Also I wrote a very simple program to attempt to test my understanding by of the backtester. The program was made to just tell me that the timing of when events occur so that I can verify my understanding of exactly what the Metatrader backtester journal messages mean.
Within the OnTick purpose I set this:
void OnTick()
//--
for (int I=Bars-2;igt;0;I--)
Print(Time[I]);
Print(TimeDay(Time[I]));
// ------------------------------------------------------------------
I ran a simple backtest in the M5. Regarding the journal, the first column of the journal Time makes sense, that just records the time that parts of the backtesting has been processed. Everything there's as I anticipated.
The message pillar, however, is quite confusing. The first portion of the message column is a date followed by what seems to be a moment. That all seems well and good except there are a number of openings in the time however I suppose those are just gaps in the information.
That's not confusing to me. What I believed the app that I wrote was about to do was simply print the date and the timing of those events. I believed that every other line could have a number to get a date that would just correspond to the initial portion of the message column and I believed that every other line could have a time that corresponded to the time that is the exact next portion of the message column. Unfortunately that does not appear to be true in any way. Particularly the only times it is giving me are instances generally goes up on 5 min increments. It skips around even more, always on a multiple of 5. Worse that the dates it gives me don't ascend in order. They occasionally jump from day to day. In case the backtester isn't just going through time from the most distant past into the most recent past. What's it doing? Ever since I picked every tick as the way to mimic the output signal why is it giving me precisely one time per 5 minute period?
The range I am searching is all of yesterday and today and this is information I downloaded automatically from the history centre, not info I collected myself.
The last thing that I noticed the days the messages segment is telling me this information is from is between February 24th and today. The date ranges make no sense for me that's the limit in how”off” it's.
Thank you for your help! I'm just really confused