How to shade background on Price Chart based on a Rising or Falling Oscillator
This lesson will teach us to modify the very popular and my favourite indicator the SuperTrend. The SuperTrend indicator shows the changing of trend based on the sensitivity settings of a computed Average True Range. The bars on the chart change from long to short once the price goes through the volatility stop. In this lesson we will call the MACD oscillator and depending if it average is rising or falling we will paint the background one color or another. This exercise will allow us to be able to provide the user the ability to select their own colors for the background, for the longs and the shorts. When we use the built in Plot functions this colour serialization occurs automatically for us. However, in this case we must do additional coding to provide the user the ability to select from the available color list in NinjaTrader. It can appear confusing at first but not after you have someone explain the how and the why.