1) Give the variable a name and a default value
2) Specify the calculation of the variable mathematically and/or conditionally.
3) The variable is updated each bar.
3) Use the resultant value in your decision tree.
I cannot figure out how to do this in Ninja Script. When I try I get method group or operand errors.
Can someone point me to some information on how to create user-defined variables that can be used in strategies?
Comment