OnDeinit() race condition and recalculation issues - page 3

 
Alain Verleyen:

Thanks for these informations. Always good to know.

As Stanilaw was stating : it's a feature not a bug. Sometimes Metaquotes is really hard to follow.

No problem, glad to help you.
 
If I understand correctly, changing symbol or timeframe is an issue. Then one can add EnumToString(timeframe) and symbol suffix or perfix to created objects.
 
Yes, but thats on the assumption that there aren't two copies of the indicator in the moment of setting change also, or other times when the indicator is reinitialized like synchronization of rates (rates_total=0)
 
Stanislav Korotky:
If I understand correctly, changing symbol or timeframe is an issue. Then one can add EnumToString(timeframe) and symbol suffix or perfix to created objects.

I've also used this method to workaround this very annoying bug. Although the issue should not happen in the first place.

I would also like to add that I don't think this happens all the time.. only when there are pending history candles that need to be fetched.. When the history is 100% up to date then I believe the OnInit/OnDeinit is synchronous again

This points to an over zealous use of parallel processing where proper synchronisation is required.