Trading Articles
Article Categories
Article Tools

NinjaTrader 7 Indicators
Indicators in this section are compatible with NinjaTrader 7

Entries
1436

Fat Tails

Login to Download
Moving Mean, Median and Mode - TPO & VWTPO

Exported using NT Version 7.0.1000.14
Moving averages are widely used as tools in technical analysis. They come in all variations and colors. The simple moving average can be considered as a moving mean of the close values of a series of price data. Many other indicators are weighted moving averages, which are also applied to the close values.
However, there are other measures for statistical distributions, which are usually neglected. This includes the median and the mode.
Also most moving averages are only calculated from the close values, where as open, high and low are neglected. Why ignore information which is already contained in the price data?
This package includes a TPO mean, a TPO median, a TPO mode (calculated from high and low points of price) and a VWTPO mean, a VWTPO median and a VWTPO mode (calculated from both price and volume data). TPO and VWTPO indicators do not use the open value and the close value, but both assume that the volume is evenly distributed over the range of a price bar. Although this information is mostly incorrect, it is still a better approach when compared to the traditional solution of calculating indicators exclusively from the close values.
Here is a description of the six indicators:
Moving Mean (TPO):
This indicator can be considered as a range weighted moving average that uses the bar center (high + low)/2 as input series. Usually wide range bars have a higher volume than narrow range bars. This makes sense giving them a higher weight. When a breakout occurs, the MovingMean (TPO) will adapt faster than a traditional SMA. Compared to a SMA the lag is reduced when volatility increases, but it is lagging more when volatility decreases.
Moving Mean (VWTPO):
This indicator is identical to the VWMA, when the bar center (high + low)/2 is used as input series. It is pretty similar to the TPO mean, but uses real volume instead of approximating it via the range. The properties of this indicator are similar to the TPO mean, but it should be slightly more accurate.
Moving Median (TPO):
A statistical median calculated from all data points of all bars contained within the lookback period. Compared to a standard median calculated from the closes (also see here:
), it should give a better approximation of the statistical median of the entire price volume distribution. The median is the most stable of the three statistical measures and probably the most representative as well.
Moving Median (VWTPO):
This indicator is similar to the TPO median, but should give an even better approximation of the the statistical median of the price volume distribution.
Moving Mode (TPO) :
The indicator shows the price with the highest occurence over the lookback period of the indicator. As the price volume distribution of the single price bars over the lookback period is unknown, there can be a significant error in any estimation. Unlike the median, the mode is not self-correcting in a way that errors cancel out. It should therefore be used with prudence. However, this indicator will still yield far better results than the Pearson formula, which should only be applied to unimodal distributions.
Moving Mode (VWTPO):
The indicator shows a better accuracy than the TPO mode, but still suffers from its inherent instability.
Category NinjaTrader 7 Indicators