calculating the etality of the Bollinger band

Forums ProRealTime English forum ProRealTime platform support calculating the etality of the Bollinger band

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

    Hi everyone, I want to be able to determine whether the lower BB at [0] is either:

    • going up from lower than close/10000 and reaching a local max at [0];
    • going down from a local max (itself defined by having come up from a preceding low lower than close/10000 relative to that local max)  but not too much (less than close/500);
    • going down from a local max   by more  than close/500.

    I’ve tried to write it that way bbut it always gives 0 as a result. Even if I pu in the FOR loop a condition that is always verified e.g. b=b it still gives me 0. Any idea what is missing ? Thanks !

     

    #248931

    Line 12 should read:

    as it is now, its meaning is a boolean comparison, because it will check if b=500, which is always false because it starts from 1 which is different from 500, unless it’s the very last iteration to which it seems to never arrive as it always breaks earlier.

    As to the rest of the code I can’t exactly understand what you want to do.

     

     

     

     

     

    1 user thanked author for this post.
    #248932

    Thanks, I realized just 10 minutes ago that this was the mistake! I new it had to be something super basic because nothing worked. Good catch!

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