ChartSetSymbolPeriod maybe problem?
By not changing symbol.
This function works so.
You would have to find another solution.
Your indicator will de-init and re-init every time either the symbol or timeframe changes, manually or through code. You can capture the event by checking the reason in OnDeinit (looking for REASON_CHARTCHANGE).
I'm assuming it is causing you trouble as certain indicator values are resetting when it re-inits? If that's the case, save values to globals and read them back in in OnInit. I have to do this in quite a lot of my indicators/EAs
Hi everyone, I do not understand why using this feature,
ChartSetSymbolPeriod();my indicator is deinitialized and initialized each time I change symbol. How can I overcome this problem?
thank you