While Loop In Strategy Tester, Timer - page 2

 
sandrika_ :

Ok I understand that in strategy tester the next tick is not used until start() returns. But I just can't get why it works in Live mode and not in tester. OK i will use start, I didn't want to use start() because I can't control its call back. But in tester Ok I will use start()

As I already said . . .

RaptorUK :
It won't help . . . to make time pass in the Strategy Tester you MUST use start() . . . the next tick is not used until start() returns, if start is never called it never returns so the next tick is never used . . . time does not advance.

If there are no ticks being used time is not progressing . . . so TimeLocal(), which gives the same time as TimeCurrent() in the Strategy Tester, does not change, it returns the same time, so localSeconds never equals (CurrentSecond + 1) so your loop never ends.
 
sandrika_ : I don't use start. I use Init.
Init MUST return within 2.5 seconds or it WILL BE FORCEFULLY killed.
 
WHRoeder :
Init MUST return within 2.5 seconds or it WILL BE FORCEFULLY killed.
My previous test and post strongly suggests that init() is not constrained by the 2.5 second timing rule and therefore shouldn't be forcefully terminated within that time (unless, of course, the shutdown command is issued while init() is performing operations).
 
RaptorUK :

As I already said . . .

If there are no ticks being used time is not progressing . . .

But ticks are used in strategy tester also. no? Ok, let be so. Can you tell me if my code in start () is running and start began to run again when last start wasn't completed, what in that case? aborting last started code? or processing and currently start is waiting?

Thirteen :
My previous test and post strongly suggests that init() is not constrained by the 2.5 second timing rule.
Thank you for that info. This rule is fro live mode or strategy tester? or both?
 
sandrika_ :
But ticks are used in strategy tester also. no? Ok, let be so. Can you tell me if my code in start () is running and start began to run again when last start wasn't completed, what in that case? aborting last started code? or processing and currently start is waiting?

The Strategy Tester runs differently to Live/Demo. In the Strategy Tester the speed at which the EA runs is governed by the complexity of the start() function, there aren't actually any ticks, start() is called again when it has just finished so there can be no missed "ticks", so start() ending governs when the next tick's data is used . . . with Live/Demo if start() is running and a new tick arrives that tick is missed, start() will continue till it ends and then will be called again when the next tick arrives.
 
RaptorUK :
The Strategy Tester runs differently to Live/Demo. In the Strategy Tester the speed at which the EA runs is governed by the complexity of the start() function, there aren't actually any ticks, start() is called again when it has just finished so there can be no missed "ticks", so start() ending governs when the next tick's data is used . . . with Live/Demo if start() is running and a new tick arrives that tick is missed, start() will continue till it ends and then will be called again when the next tick arrives.


Thank you very much. All clear
 

Hello 

To bring this topic to life again, 

Does anyone knows why in while loop strategy tester stuck? I have same issue,

Regards

 
palnewth: Does anyone knows why in while loop strategy tester stuck? I have same issue,
Asked and answered #15
Reason: