I've been experimenting with Bollinger Bands (BB) based on Heikin Ashi values and can't explain the BB values being returned during backtesting. I've attached a simplified backtest and extensive research notebook that hopefully makes it clearer what I'm seeing. But in essence:

  • The Heikin Ashi values are being calculated correctly.
  • The Bollinger Band values generated using the IndicatorExtensions.Of extension don't match my own calculations.
     

The strategy itself is immaterial BUT I do want to understand how the LEAN engine is coming up with these BB values (as some combinations with other indicators look promising).

Any help appreciated! As an aside, in the research notebook, I'm using the object store and Bokeh to visualise the trades generated (see pic below).

74974_1623021958.jpg

Author