Discussion of article "The Fundamentals of Testing in MetaTrader 5" - page 3

 
Yedelkin:

Their calculation occurs each time the NewTickevent is sent , even if the Expert Advisor does not have OnTick() function? And if so, then it turns out that indicators are recalculated with the tick frequency of another symbol?
yes
 
sergeev:
Yes.
Thank you! That's news!
 
Yedelkin:
Thank you! That's news!

Nothing surprising about it.

The presence of Expert Advisors on the chart does not prevent indicators from being calculated :)

I guess it means that the tick arrival event is generated after the indicators are calculated.

That is, first the calculation, then the call. But if you do not process the event, the indicators will still be calculated.

 
sergeev:

But if your event is not processed, the indicators will still be calculated.

Yes, but in my case the calculation of indicators will be synchronised with the arrival of ticks on another symbol (the symbol to which the Expert Advisor itself is attached). This is what came as a surprise.
 
Yedelkin:
Yes, but in my case, the calculation of indicators will be synchronised with the arrival of ticks on another symbol (the symbol to which the Expert Advisor itself is attached). This is what came as a surprise.

the point is that if we are talking about the tester, then chart events from objects...? Are there any of those in there?

I don't think they were there a month ago, maybe something has changed that I haven't seen?

so the expert only on chart events will not work in the tester. because there are no events. and the size of the chart too :) try to get ChartGetXXX in the tester. it returns zeros everywhere.

 
sergeev:

the thing is, if we're talking about a tester, then chart events from objects... Are there any of those?

I don't think it was there a month ago, maybe something has changed that I haven't seen?

so the expert will not work only on chart events in the tester. because there are no events. and the size of the chart too :) try to get ChartGetXXX in the tester. it returns zeros everywhere.

No, there are no chart events from objects. Indicators just periodically send one or another calculated values using custom events (Lizar once suggested the idea). This idea itself works in the tester.
 
Yedelkin:
The idea itself in the tester works.

If everything works, then what is the problem in your code?

Is OnCalculation far away to make a check?

 
sergeev:

If everything works, then what is the problem in your code?

There is no problem in the code. You have confirmed my assumption that in the above case the indicators are recalculated in the tester with the frequency of ticks of another symbol. This means that the indicators are recalculated with a different frequency than the one that the tester would generate when each indicator is on its own symbol. Well, what is there to check, we'll have to adapt. If, of course, your confirmation is correct :)
 
Yedelkin:
There are no problems in the code. You have confirmed my assumption that in the case described above, the indicators are recalculated in the tester with the tick frequency of another symbol. This means that the indicators are recalculated with a different frequency than the one that would be generated by the tester when each indicator is on its own symbol. Well, what is there to check, we'll have to adapt. If, of course, your confirmation is correct :)
trust but verify :)
 

Great article, thanks!