Page 1 of 1

Inherit chart settings from.. resets indicators on original instrument

Posted: Thu Dec 02, 2021 2:17 pm
by zcsoka
Greetings,

I have an indicator, which starts calculating only when it is added to the chart, no backfill. If I keep changing only tabs, the indicator keeps its values fine. Let's suppose I have it on the NQ
If I pick an other instrument (ES) and apply the Inherit chart settings from..NQ, then the indicator is reinitialised on the NQ. Is it intended, if yes, why?

Re: Inherit chart settings from.. resets indicators on original instrument

Posted: Thu Dec 02, 2021 2:21 pm
by Svyatoslav
Well... It's sort-of intended. If we are talking about core L1, inheritance works like this: copy settings, unload addon, replace settings on the target instrument, start addon back. That's because there is no special inherit API message/call, we just unload the addon and swap the settings.
For core L1 that makes some sense, since there are no "per-instrument" addons, all addons are global and per-instrument state is handled by addon developer.

It makes less sense with Simplified L1, but it's actually built purely as a wrapper around core L1, so core just reloads entire wrapper, with all per-instrument "sub-addons".