Count Candles Indicator Error

Forums ProRealTime English forum ProBuilder support Count Candles Indicator Error

Viewing 2 posts - 1 through 2 (of 2 total)
  • #234291

    Hi Guys,

    hoping for some help the indicator looks fine but when i go to put it on the chart it throws the error “an infinite loop or a loop with too many iterations was detected”.

    Essentially i want to place an arrow at the start of a pattern where the series of candles open is less than the close until it isn’t. i want to count the number of pips that have occurred from the first candle in the series until a candle closes lower than the open BUT i only want to plot an arrow if 3 or more candles show up. apologies if this confusing i am reasonably new to this and not sure how to explain it easily. hope this makes sense?

    #234294

    Move the CurrentBar = CurrentBar + 1 , inside the loop, before wend.

    The statement after ‘While’ is the condition to exit the loop. There needs to be some sort of loop counter to reach the condition.

    Since the ‘above line’ is outside the loop, CurrentBar is not incremented, loop cycles till error message.

     

     

     

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

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