Optuma Forums › Optuma Scripting › Use of #$ variables › Reply To: Use of #$ variables
May 23, 2020 at 7:17 pm
#58251

- Topics: 98
- Replies: 289
- Posts: 387
Hi Michael,
It appears that you cannot undertake calculations with the #$ variables.
I tried the simple MA plot script from the KB article Bar Variables and Properties :
1 2 3 4 5 6 |
#$MA1= 20 ; #$MA2= 50 ; plot1=MA(Bars=$MA1); plot2=MA(Bars=$MA2); |
This code will work as shown in the above KB article, with MA1 and MA2 appearing and active in the Properties Panel list.
However, if you change the code to:
1 2 3 4 5 6 |
#$MA1= 20 ; #$MA2= 50 ; plot1=MA(Bars=$MA1 * 2); plot2=MA(Bars=$MA2); |
You will find that the MA1 has disappeared from the Properties Panel list.
This seems to stymie what you are attempting to achieve.
We’ll have to hope that the Optuma Genii can come up with a solution that makes to use of the #$var function much more flexible.
Cheers
Trevor