While Loop in Championship

 
can i use a while loop like this in the championship:
while(IsConnectetd() && !IsStopped)
{
sleep(500);
refreshrates();
some code
Ordersend...
some code
}

the problem is all works fine in demoaccount and livetrading, but backwardtesting is impossible because of the while loop (impossible so to backtest or to long term for backtest)!
but what can i do if i like to trade in some spiecial times in other currencies and i need allways actual prices.
i only can use a loop.

can i use it in the Championship because. (its like portfoliostrategie if i use more currencies,but not all the same time)

it would be nice to get a answer because of preparation of the EA to send it in!
 
hello12345:
can i use a while loop like this in the championship:
while(IsConnectetd() && !IsStopped)
{
sleep(500);
refreshrates();
some code
Ordersend...
some code
}

the problem is all works fine in demoaccount and livetrading, but backwardtesting is impossible because of the while loop (impossible so to backtest or to long term for backtest)!
but what can i do if i like to trade in some spiecial times in other currencies and i need allways actual prices.
i only can use a loop.

can i use it in the Championship because. (its like portfoliostrategie if i use more currencies,but not all the same time)

it would be nice to get a answer because of preparation of the EA to send it in!
 

No, You cannot expose to Championship such EA.

 
stringo:

No, You cannot expose to Championship such EA.

And why not?
 
int t = 5;
 
while(IsConnectetd() && !IsStopped() && t > 0) {
  Sleep(500);
  RefreshRates();
  ...
  t--;
}
Can i use this code?

Regards,
 
Exposed EAs are tested automatically. If test continues more than 5 minutes then tester stopped and error generated. This behavior (endless or continuous loop) can violate Rule III.6 (expert must be economical with the use of resources on the processor and PC memory)
 
stringo:
Exposed EAs are tested automatically. If test continues more than 5 minutes then tester stopped and error generated. This behavior (endless or continuous loop) can violate Rule III.6 (expert must be economical with the use of resources on the processor and PC memory)
It is economical with Sleep(500). It uses 0%-1% of my old 2500+ Barton. An average EA/Script can run like half million times per second with 100% CPU load on an average CPU. Running twice per second doesn't mean more load than an EA that is ran every tick IMHO.

I can understand the test though.
Reason: