Stocks either go up or down. The degree (measured as standard deviation) at which the trend occurs varies by period.
Closing price and not price change is typically used to calculate standard deviation (or dispersion from mean). However, using the standard deviation of closing price does not illustrate price movement from mean. Therefore, a price change percentage of 0% is your staring point.
The equation below will provide a "number" indicating how strong a trend is. The number is the price change per standard deviation for the given period. It works well on a list of stocks that is sortable.
A stock with a strong upward trend will have a higher value and vice versa in a down trend.
This is a modified z-value calculation using zero as a starting point.
prc_chg = (close[0]-close[1]) / close[0]
z-value = mean(prc_chg, period) / SD(prc_chg, period)
The higher or lower the "z-value", the stronger the trend (for the given period).
Category NinjaTrader 7 Indicators
|
|
|