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

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #247633 quote
    OllieB
    Participant
    Junior

    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 quote
    druby
    Participant
    New

    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.

    Iván González and robertogozzi thanked this post
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.

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


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
OllieB @ollieb Participant
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by druby
8 months, 2 weeks ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 05/26/2025
Status: Active
Attachments: No files
Logo Logo
Loading...