Custom return. how can i customise whats returned depending on user input?

Forums ProRealTime English forum ProBuilder support Custom return. how can i customise whats returned depending on user input?

  • This topic has 1 reply, 2 voices, and was last updated 5 days ago by avatardruby.
Viewing 2 posts - 1 through 2 (of 2 total)
  • #247633

    Hi,

     

    I have an “all in 1” indicator, that shows multiple moving averages on a price chart.  I have created some user variables, as booleans, that allow the user to turn on/off which indicators that they want to see.

     

    I have tried hiding the unwanted indicators by setting the colour to black (on a black background) but this isn’t good enough.  How can i customise the “return” string, if this is the right approach, to only return, and show, the options the user wants to see?

     

    Thanks.

    #247636

    Try, making the RETURN variable you don’t want = UNDEFINED

    indicator1 = 0  // boolean 0 or 1

    ave10 = average[10](close)

    IF indicator1 = 0 THEN

    ave10 = UNDEFINED

    ENDIF

    RETURN  ave10

     

    Another way is set the transparency to zero,  COLOURED(r,g,b,0) to hide.

     

    2 users 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