Hi all,
My code has suddenly started returning ‘infinite loop’ error, even thought I have not changed the code?! It will not work in backtests, but will the original code still work in live trading? The strategy was very profitable but has lost 50% since this error appeared? Has there been a new release of PRT that is stopping older code from working???
Many thanks
Grim
Submit a Technical Report to PRT asap asking why are you NOW getting the infinite loop error message after the code has been running fine for X Months??
Thanks GraHal. Does that include PRT on IGindex? The report said they would only respond to executed trades? Seems back testing is not covered. I’ve submitted once but not received a reply!
The report said they would only respond to executed trades? Seems back testing is not covered
Yes I noticed that yesterday when I submitted a Technical Report (never noticed it before) and I took it to mean automatic trade execution … backtesting is a trade execution?
I’ll let you know if / when I get a reply to my Technical Report about Even Trades on backtesting.
The report said they would only respond to executed trades?
I’m guessing but I think they are just trying to clarify which type of report you should be sending as if you spot an issue or bug on a particular window then that is a different type of report than if you have weird results or errors from an auto-trading strategy. I guess it helps them get the problem to the right department quicker.
Personally I think that the more choices you give someone the more chance there is of them choosing the wrong one and then the system is broken!
Thanks guys. Still no luck and no response from PRT. I can’t understand why the code has suddenly started reporting this infinite loop error when nothing has changed in the code? Why does this error come about? Is it an errant ‘if’ command not closed off with an ‘endif’?
Normally it is a FOR NEXT loop that is the problem.
The kind folks at IT-Finance came back to me. This may be instructive to others as it appears the new engine is less forgiving!
Basically, he should replace the while… wend condition by a If… endif condition :
while case <> 0 and time>= activationtime and daytrading=1 do //and time <=LimitHour do
if levelhi>0 then
buy size contract at levelhi stop
endif
if levello>0 then
sellshort size contract at levello stop
endif
wend
should be replaced with:
if case <> 0 and time>= activationtime and daytrading=1 then//and time <=LimitHour do
if levelhi>0 then
buy size contract at levelhi stop
endif
if levello>0 then
sellshort size contract at levello stop
endif
endif
Otherwise the code is looping in this section of code. The old engine ignored this error, but the new one is a lot cleaner.
Thanks IT-Finance guys for solving the issue!