Infinte Loop

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #76554 quote
    grimweasel47
    Participant
    Senior

    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

    #76556 quote
    GraHal
    Participant
    Master

    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??

    #76557 quote
    grimweasel47
    Participant
    Senior

    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!

    #76564 quote
    GraHal
    Participant
    Master

    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.

    #76566 quote
    Vonasi
    Moderator
    Master

    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!

    #76699 quote
    grimweasel47
    Participant
    Senior

    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’?

    #76718 quote
    Vonasi
    Moderator
    Master

    Normally it is a FOR NEXT loop that is the problem.

    #76722 quote
    grimweasel47
    Participant
    Senior

    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!

    GraHal thanked this post
Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.

Infinte Loop


ProOrder: Automated Strategies & Backtesting

New Reply
Author
Summary

This topic contains 7 replies,
has 3 voices, and was last updated by grimweasel47
7 years, 7 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 07/23/2018
Status: Active
Attachments: No files
Logo Logo
Loading...