In this Indicator Spotlight, we’re looking at the Z-score and how you can use it to normalize oscillator values. Specifically, we’ll show the Z-score can be used to condition entry and exit conditions for an Awesome Oscillator strategy. To learn more about the general idea behind the Z-score and how to apply it to the Awesome Oscillator, watch the video or continue reading below:

**The Empirical Rule**

The bell curve and standard deviations are useful for creating statistical representations for expected outcomes. If we assume a normal distribution of data points and illustrate them with a curve, the majority will fall within the bell shaped form. The sides represent the tails of the bell curve, giving us a basis for making fairly reliable predictions.

In statistics, the 68–95–99.7 rule, a.k.a. the empirical rule, is a quick way to remember the expected percentage values defined by a normal distribution. Statistically, the datapoints within one standard deviation represent about 68% of the dataset. Furthermore, in a normal distribution, 95% of all datapoints are within the 2^{nd} standard deviation and 99.7% within the 3^{rd} standard deviation. If we apply the Z-score to the Awesome Oscillator, we can use the expected percentage values and apply them to conditions for entry and exit rules.

**Z-Scores and Standard Deviations**

The Z-score is calculated by subtracting the population mean from an individual raw score and then dividing the difference by the population standard deviation. This conversion process is called standardizing or normalizing. The Z-score refers to how many standard deviations a datapoint is from the mean of the data. Values above the mean have positive standard scores whereas values below the mean have negative standard scores.

A Z-score of 1 means that the datapoint is one standard deviation above the mean. The “tails” of the curve, i.e. the 2^{nd} and 3^{rd} standard deviations have Z-scores of 2 and 3. A “3-sigma event” with data points outside the 3rd standard deviation are then considered an outlier. These are infrequent events, for example the SNBs decision to unpeg the Franc from the Euro a few years back.

**The Awesome Oscillator**

The Z-score can be used for a number of purposes and in this example, we will apply it to Bill William’s Awesome Oscillator. The Awesome Oscillator is a moving average convergence divergence (MACD) indicator similar to the MACD that is included with all charting programs. However the Awesome Oscillator is calculated from simple moving averages, while the standard MACD uses exponential moving averages. The default periods for the fast and slow moving average are 5 and 34, whereas the standard MACD uses 12 and 26. Also, the Awesome Oscillator uses the midpoints of the bars as input values while the standard MACD is calculated from the closes.

**The Zeroline Cross Setup**

Oscillator values above the zeroline indicate a short term momentum which is higher than the long term. Values below the zeroline indicates a short term momentum which is lower than the long term. You may then identify basic signals when there is a zeroline cross. This indicates a change in momentum representing buying/selling opportunities.

**The Saucer Setup**

Another way of using the Awesome Oscillator is by identifying “Saucer Setups”. This is a situation where you identify a pause in the current trend, with oscillator values on the same side of the zeroline. A bullish setup occurs when the Awesome Oscillator is above the zeroline with a number of consecutive oscillator values showing a slowing momentum. This situation is then followed by renewed buying pressure and higher oscillator values.

The general idea here is to catch the “sweet spot”, entering in an early trend continuation scenario, before the trend has advanced too far. By using the Z-score to normalize the Awesome Oscillator, you may then identify setups that occur within one standard deviation of the data in the lookback period.

**Normalizing the Awesome Oscillator**

In the below chart, the Awesome Oscillator strategy output was normalized over a 100 bar lookback period. Specifically, the Awesome Oscillator was used as input for the Z-score. The oscillator values are then required to fall within 1 standard deviation in order for the saucer setups to plot. Accordingly, the late entry signal was eliminated.

Likewise, the Z-score can be used to identify scenarios that are likely oversold or overbought. In the below chart, the Z-score threshold was moved out to a -2 threshold for a short scenario. This situation can then be used to identify a potential exit for an Awesome Oscillator strategy.

**Conclusion**

We’ve seen that the Z-score can be used to normalize the Awesome Oscillator data points. That in turn gives you a basis for making fairly reliable predictions. Specifically, this process enables us to create a fixed scale and to condition entries / exits for an Awesome Oscillator Strategy:

- to occur within one standard deviation, i.e. ca. 68%, of the dataset.
- to occur outside the 2
^{nd}standard deviation, i.e. 95% of the dataset

Of course the concept applies not only the Awesome Oscillator, but can also be used on a MACD, for example. To download the Z-score indicator for NinjaTrader 8, please follow the below link:

**Other Library Indicators **

Apart from the Z-score, our our NinjaTrader indicators library features the following **Advanced Oscillators** entries: Connors RSI, Laguerre RSI, MACD BB Lines, MACD KC Lines, Multiple MACD, Multiple TSI, Projection Oscillator, QQE, Rainbow Oscillator and the SVE Stochastics IFT.

Furthermore, the standard **Momentum Oscillators** category features the Acceleration Deceleration, Balanced Momentum, Double Smoothed Momentum / Double Smoothed Stochastics from Blau as well as Bressert’s version of the Double Smoothed Stochastics, along with an improved version of the standard Relative Strength Index, the Slow RSI, Stochastic RSI and the Traders Dynamic Index (TDI). Additional info on the TDI indicator, was also discussed our Indicator Spotlight.

Finally, the library also contains a Modified Z Score. It applies the median calculation instead of the mean. Furthermore, the signed number of standard deviations is replaced by the Mean Absolute Deviation (around the Median).