Indicator Value Continuation

Forums ProRealTime English forum ProBuilder support Indicator Value Continuation

  • This topic has 2 replies, 2 voices, and was last updated 3 years ago by avatarBi.
Viewing 3 posts - 1 through 3 (of 3 total)
  • #141606
    Bi

    Hi all

    I am new to PRT as well as coding, I am trying to create an indicator with the below logic but the value seems to be not continuous. I feel like I am missing an obvious point, appreciate your help.

    The logic behind the indicator is

    Positive signal  – when EMA9 crossover EMA20 while both the line being under VWMA50

    Negative signal – when EMA9 crossover EMA20 while both the line being under VWMA50

    The above signals are getting created accurately but I want the value to continue even when EMA9 and EMA20 crosses above VWMA50. So essentially what I am trying to do is if a positive signal occurred then show me the signal until a negative signal appears. At the moment the signal disappears when EMA9 and EMA20 crosses above VWMA50 I want the system to ignore that event and lookback the value what it was previously.

    Values would look like 0000011111111111-1-1-1-1-1-1

    I am not sure whether I should be using “for loop ” to get this which I’ve tried and failed.

    I would very much appreciate your expert help

     

     

     

    #141613

    I think you only have to remove, or comment out, line 23.

     

    1 user thanked author for this post.
    avatar Bi
    #141647
    Bi

    Legend! thank you it worked

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