How to reset variables

Forums ProRealTime English forum ProOrder support How to reset variables

Viewing 6 posts - 1 through 6 (of 6 total)
  • #145947

    Im still stuck on this.

    From what i understand the trigger =  1 is not reset and keeps adding. How do i reset all variables after trade.

    #145951

    Your variable “trigger” is reset to 0 as soon as you enter an order at line 17.

    At next bar, the code is read and if the condition are fulfilled at line 2, the variable is set to 1.

    #145954

    How do i reset variable 1 if the conditions for variable 2 arent met?

    I tried to reset it  8 bars after variable 1, seems to not work.

     

    #145967

    Sorry what are variables 1 and 2 please?

    #145970

    When the high is < bolldown this is variable 1. I named it trigger = 1.

    When trigger = 1 is active and within 8 bars if price closed above bollup i named it trigger =2 ( variable 2).

    If it dosent close above bollup within 8 bars i tried to reset it back to trigger =0.

    Im sorry i know my explanation is a little confusing.

    This is the full code.

    #145972

    If you GRAPH trigger, you will see at what moment the variable is set to what value, did you try? This is the first step to understand why a code is not functioning at it should, GRAPH the variables! 😉

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

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