using a < or > as an input  [SOLVED]

Questions about MultiCharts and user contributed studies.
User avatar
joebone
Posts: 175
Joined: 05 Sep 2018
Has thanked: 53 times
Been thanked: 4 times

using a < or > as an input

Postby joebone » 16 Nov 2023

Hello,
Just making a quick post asking if there is a way to input a <,>, or = as an input. From what I see we cant do that.

If you wanted to be able to change these as an input or be able to optimize through them would you create a switch statement or a if, then series?

User avatar
Kate MultiCharts
Posts: 597
Joined: 21 Oct 2020
Has thanked: 9 times
Been thanked: 148 times

Re: using a < or > as an input  [SOLVED]

Postby Kate MultiCharts » 16 Nov 2023

Hello joebone,

String and bool variables cannot be optimized, they won’t be displayed in the Optimization Settings. Only number values can be optimized.
So, you could create a number input and optimize values 1-3 that would correspond to <,>, or =

For example:

Code: Select all

input: comparacion(1); //1 set <; 2 set >; 3 set = if comparacion = 1 then ... //your code if comparacion = 2 then ... //your code if comparacion = 3 then ... //your code


Return to “MultiCharts”