0

I have a set of user inputs as follows:

//Entry Indicator Selection

tog_entry1 = input.string(title="Entry Indicator 1", defval="KST", group="Entry Indicators", options=["KRI", "KST", "Supertrend", "None"])
tog_entry2 = input.string(title="Entry Indicator 2", defval="None", group="Entry Indicators", options=["KRI", "KST", "Supertrend", "None"])
tog_entry3 = input.string(title="Entry Indicator 3", defval="None", group="Entry Indicators", options=["KRI", "KST", "Supertrend", "None"])

Indicator Options

The idea is to allow users to pick up to three entry indicators from a bank of options. At the moment, the options are not mutually exclusive - e.g., the user could pick "Supertrend", "Supertrend", "Supertrend", and so on.

Using Pine, Is there any way to eliminate options that have already been selected from the remaining lists?

Matt
  • 48
  • 4

1 Answers1

1

No, this is not possible.

If you want to prevent users selecting the same input options, you can throw a runtime error with the runtime.error() function.

if (tog_entry1 == tog_entry2) or (tog_entry1 == tog_entry3) or (tog_entry2 == tog_entry3)
    runtime.error("You cannot select same indicators")
vitruvius
  • 15,740
  • 3
  • 16
  • 26