Enum Operators as Inputs
-
I have a situation. I want to be able to use the condition block with indicators but the operator should be an input field in a form of an enum. How can i achieve this? So I want a situation where a user defines the operator from the input if i choose eg Price and Moving Average. So the operators that a user should be able to specify are :
-
Is Above
-
Is Below
-
Crosses Above
-
Crosses Below

-
-
Create the enum, if 1 is selected activate the relevant block, if 2 is selected activate a different block etc. You'll see how to achieve in here: https://fxdreema.com/shared/Q79GHec1c
-
Thanks @jstap . That has given me a great idea.
But now for the operator as depicted on the picture, is it a string? I would like to replace the operator with a variable but am not sure what data type to use for the operator.
-
On FX these data types can't be changed (in my experience), so I would activate a different block for the one I need.