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.
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.