NexusFi: Find Your Edge


Home Menu

 





Moving Standard Deviation


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one jwhtrades with 6 posts (0 thanks)
    2. looks_two bobwest with 4 posts (3 thanks)
    3. looks_3 Fat Tails with 2 posts (4 thanks)
    4. looks_4 choke35 with 2 posts (1 thanks)
      Best Posters
    1. looks_one Fat Tails with 2 thanks per post
    2. looks_two Big Mike with 1 thanks per post
    3. looks_3 bobwest with 0.8 thanks per post
    4. looks_4 choke35 with 0.5 thanks per post
    1. trending_up 8,010 views
    2. thumb_up 9 thanks given
    3. group 4 followers
    1. forum 15 posts
    2. attach_file 4 attachments




 
Search this Thread

Moving Standard Deviation

  #1 (permalink)
 
jwhtrades's Avatar
 jwhtrades 
woodstock, ga
 
Experience: Intermediate
Platform: NinjaTrader
Broker: NinjaTrader Brokerage
Trading: Futures, TF, CL
Posts: 163 since Feb 2011
Thanks Given: 670
Thanks Received: 92

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

Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Are there any eval firms that allow you to sink to your …
Traders Hideout
Better Renko Gaps
The Elite Circle
Deepmoney LLM
Elite Quantitative GenAI/LLM
My NT8 Volume Profile Split by Asian/Euro/Open
NinjaTrader
Futures True Range Report
The Elite Circle
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Get funded firms 2023/2024 - Any recommendations or word …
61 thanks
Funded Trader platforms
39 thanks
NexusFi site changelog and issues/problem reporting
26 thanks
The Program
18 thanks
GFIs1 1 DAX trade per day journal
18 thanks
  #3 (permalink)
 
bobwest's Avatar
 bobwest 
Western Florida
Site Moderator
 
Experience: Advanced
Platform: Sierra Chart
Trading: ES, YM
Frequency: Several times daily
Duration: Minutes
Posts: 8,162 since Jan 2013
Thanks Given: 57,341
Thanks Received: 26,267


Maybe you could explain what you mean by a "moving standard deviation."

A standard deviation has to be a deviation from something, such as a moving average or linear regression or VWAP, etc.. There's lots of those.

If I didn't get your meaning, please say more about what it would be.... A picture would help.

Bob.

Reply With Quote
  #4 (permalink)
 
jwhtrades's Avatar
 jwhtrades 
woodstock, ga
 
Experience: Intermediate
Platform: NinjaTrader
Broker: NinjaTrader Brokerage
Trading: Futures, TF, CL
Posts: 163 since Feb 2011
Thanks Given: 670
Thanks Received: 92

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

Reference: Barchart.com - Technical Chart Indicators and Studies

Started this thread Reply With Quote
  #5 (permalink)
 
bobwest's Avatar
 bobwest 
Western Florida
Site Moderator
 
Experience: Advanced
Platform: Sierra Chart
Trading: ES, YM
Frequency: Several times daily
Duration: Minutes
Posts: 8,162 since Jan 2013
Thanks Given: 57,341
Thanks Received: 26,267

Ah, OK. That formula is simply one standard deviation from a moving average.

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.




Bob.

Reply With Quote
Thanked by:
  #6 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Frequency: Every few days
Duration: Weeks
Posts: 50,396 since Jun 2009
Thanks Given: 33,172
Thanks Received: 101,536

BTW, I would venture the most popular indicator setup for SD's is VWAP +/- 2 SD. At least that's what I like and see a lot of others using.

Mike

We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor
Searching for trading reviews? Review this list
Lifetime Elite Membership: Sign-up for only $149 USD
Exclusive money saving offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #7 (permalink)
 
bobwest's Avatar
 bobwest 
Western Florida
Site Moderator
 
Experience: Advanced
Platform: Sierra Chart
Trading: ES, YM
Frequency: Several times daily
Duration: Minutes
Posts: 8,162 since Jan 2013
Thanks Given: 57,341
Thanks Received: 26,267


Big Mike View Post
BTW, I would venture the most popular indicator setup for SD's is VWAP +/- 2 SD. At least that's what I like and see a lot of others using.

Mike

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.

Bob.

Reply With Quote
  #8 (permalink)
 choke35 
Germany
 
Experience: Intermediate
Platform: Other
Trading: ES, YM, 6E
Posts: 2,668 since Feb 2013
Thanks Given: 5,101
Thanks Received: 6,558



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.

Reply With Quote
Thanked by:
  #9 (permalink)
 
jwhtrades's Avatar
 jwhtrades 
woodstock, ga
 
Experience: Intermediate
Platform: NinjaTrader
Broker: NinjaTrader Brokerage
Trading: Futures, TF, CL
Posts: 163 since Feb 2011
Thanks Given: 670
Thanks Received: 92

Thanks for your reply.

Started this thread Reply With Quote
  #10 (permalink)
 choke35 
Germany
 
Experience: Intermediate
Platform: Other
Trading: ES, YM, 6E
Posts: 2,668 since Feb 2013
Thanks Given: 5,101
Thanks Received: 6,558



jwhtrades View Post
Thanks for your reply.

You can download it here:


(Default style is bar here, but you can switch it to line - which would be standard.)

Reply With Quote




Last Updated on August 22, 2015


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts