Hello, retrieving historical value for an indicator is a pretty common task, I think it would be much easier if indicators could contain history values themselves, so we could use it like this:

  1. ema = ExponentialMovingAverage(100, history=10)
  2. ema_current = ema.Current.Value
  3. ema_old = ema.History[10] # 1-based, because 0 means current value

Author

Yuri Lopukhov

June 2022