I think you should go with GLOBAL and handle it on OnInit()...
STATIC variables in general have a ver very specific usage...
;)

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
A static variable retains it's value even after Symbol or Period change of the chart.
Is there a way to reinitialize local static variables upon Symbol or Period change?
Or is there only the possibility to declare the variable on the global scope and reinitialize it in OnInit()?