Please, look at attached indicator.
Indicator:
- add 2 buttons on chart;
- hold hosted SMA() indicator (Hosted_Sma = SMA(20)).
When click on "Hosted_Indicator_[0]" button, it print Hosted_Sma[0] value.
When click on "Hosted_Indicator_[1]" button, it print Hosted_Sma[1] value.
Both work not as expected.
[0]: print wrong value;
[1]: throw exception.
(Hosted_Indicator.GetValueAt(CurrentBar) looks working correct)
Comment