Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
Does anyone know if there is a "Moving Standard Deviation" indicator for Ninjatrader? I've done an advanced search on this and found nothing in the forum. Thanks
Can you help answer these questions from other members on NexusFi?
Moving Standard Deviation
Indicator Type: Standalone
Standard deviation is a statistical term that provides a good indication of volatility. It measures how widely values (closing prices for instance) are dispersed from the average. Dispersion is the difference between the actual value (closing price) and the average value (mean closing price). The larger the difference between the closing prices and the average price, the higher the standard deviation will be and the higher the volatility. The closer the closing prices are to the average price, the lower the standard deviation and the lower the volatility.
Calculation
The steps for calculating a 20-period standard deviation are as follows:
Calculate the simple average (mean) of the closing price. i.e., Sum the last 20 closing prices and divide by 20.
For each period, subtract the average closing price from the actual closing price. This gives us the deviation for each period.
Square each period's deviation.
Sum the squared deviations.
Divide the sum of the squared deviations by the number of periods (20 in our example below).
The standard deviation is then equal to the square root of that number.
Standard Deviation Table
The 20-period standard deviation for the data above is 6.787. Note that this is the "full population" version of the Standard Deviation. There is a different kind of Standard Deviation calculation that is used when you are taking a statistical sample of a population, but that version is not used in technical analysis since all of the data points are known.
Parameters
Period (20) - the number of bars on the chart
Normally you see something like that in plotting Bollinger Bands, which are a certain number of sd's (usually 2) above and below an MA. But you can just plot the standard deviation itself as an indicator below price.
It's a built-in Ninja indicator, StdDev. (They don't call it "moving" because, well, it's a std dev from a moving average, and it moves along with the MA. ) Just set the period, in this case it was 20.
Here's what you get. On the price panel I'm plotting a 20 SMA with Bollinger Bands at 1 standard dev above and below the MA. In the panel below is the StdDev indicator with period = 20.
Either way, it's showing variations in volatility based on how far price deviates from an average.
Yeah, that's both simple and direct: how far has price gotten from a very meaningful benchmark that big traders pay attention to.
MA's may be useful, but they are a little arbitrary, in the sense that you choose the MA period and the timeframe (bar size) of the chart, so your MA depends on your charting choices. Everyone sees the same VWAP, and it arguably best represents the day's current price level on the basis of cumulative trading volume and price.
Before re-inventing the wheel: The indicator that you are looking for is called Bollinger's %B.
Standard configuration - as shown - is +/- 2 SD around a 20 period SMA.
Bollinger himself uses a 0/100 scaling instead of 80/20 (because in relation to 2 SDs 80%/20% don't really make much sense).
He just wants to know how much of +/- 2 SDs are maxed out.
The Bollinger BandsŪ Percentage B is a technical indicator based upon the Bollinger BandsŪ study; it plots a histogram showing position of price relative to the bands. It is calculated as percentage ratio of two differences: first one is the difference …
(Default style is bar here, but you can switch it to line - which would be standard.)