Infinite Loop Problem with For Loop

Forums ProRealTime English forum ProBuilder support Infinite Loop Problem with For Loop

Viewing 3 posts - 1 through 3 (of 3 total)
  • #176391

    Hello,

    i read about the problem with PRT Engine and for in for loops. I have the following indicator and want to run it in my ProScreener.

    Problem: i get the infinite loop error.

    How can i solve this?

    Thank you

    Best regards,

    Branimir

    #177035

    Too many iterations, almost 40K per candle!

    Try removing line 1 and setting 50K units, to allow enough bars to run.

    It will take quite a long time to calculate!

    I removed line 1, used 10K units and set timerange=50, and it worked!

     

    1 user thanked author for this post.
    #177077

    You can try to encapsulate your loop into a condition with “IsLastBarUpdate”, so that the code is only once each time the last bar is updated (new price received), see:

    IsLastBarUpdate

    Speed calculation with IsLastBarUpDate instruction

    1 user thanked author for this post.
Viewing 3 posts - 1 through 3 (of 3 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login