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
    OllieBOllieB
    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
    drubydruby
    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.
ProRealAI ProRealAI New

Stuck on this ProBuilder code?

Describe what this topic is trying to build, in plain English, and ProRealAI writes the ProRealTime™ indicator, screener or system for you.

Available in 7 languages
Try ProRealAI

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 drubydruby
1 year, 3 months ago.

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