NexusFi: Find Your Edge


Home Menu

 





NinjaScript equivalent of EasyLanguage's volatility function?


Discussion in NinjaTrader

Updated
    1. trending_up 4,028 views
    2. thumb_up 2 thanks given
    3. group 1 followers
    1. forum 3 posts
    2. attach_file 0 attachments




 
Search this Thread

NinjaScript equivalent of EasyLanguage's volatility function?

  #1 (permalink)
 zwentz 
Austin, TX
 
Experience: Advanced
Platform: NinjaTrader
Broker: Optimus Futures/Rithmic
Trading: Futures [ZB]
Posts: 36 since Sep 2009
Thanks Given: 12
Thanks Received: 22

I'm having difficulty finding an equivalent of EasyLanguage's Volatility function. For reference here is EasyLanguage's definition of "Volatility."


Quoting 
Volatility (Function)

Disclaimer

The Volatility series function measures the market volatility by plotting a smoothed average of the TrueRange. It
returns an average of the TrueRange over a specific number of bars, giving higher weight to the TrueRange of the
most recent bar.

Syntax
Volatility(Length)
Returns (Double)

A numeric value containing the market volatility. As the number increases, the market is more volatile.

Description
Volatility is the variation in price over a specific interval (the difference between the highest and lowest prices). As the
time interval being studied increases, volatility also increases to a maximum before leveling off. As prices increase, the
volatility tolerance also increases.

Note The Volatility function uses a slightly different set of calculations than the original formula. The Volatility
variation tends to smooth recent activity, which means that it will take more time (bars) to ‘normalize.’

I've tried Ninja's RVI, ATR, and StdDev methods, none of which give comparable results.

Has anyone has success with this before?

Thanks.

Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Ninja Mobile Trader VPS (ninjamobiletrader.com)
Trading Reviews and Vendors
Are there any eval firms that allow you to sink to your …
Traders Hideout
The space time continuum and the dynamics of a financial …
Emini and Emicro Index
My NT8 Volume Profile Split by Asian/Euro/Open
NinjaTrader
Build trailing stop for micro index(s)
Psychology and Money Management
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Get funded firms 2023/2024 - Any recommendations or word …
59 thanks
Funded Trader platforms
37 thanks
GFIs1 1 DAX trade per day journal
22 thanks
NexusFi site changelog and issues/problem reporting
22 thanks
The Program
20 thanks
  #3 (permalink)
 zwentz 
Austin, TX
 
Experience: Advanced
Platform: NinjaTrader
Broker: Optimus Futures/Rithmic
Trading: Futures [ZB]
Posts: 36 since Sep 2009
Thanks Given: 12
Thanks Received: 22


Solved it.

Let's say you want Volatility(6).

You would do this in Ninjatrader to get the equivalent: SMA(ATR(3),6)[0]

Basically you take the SMA of ATR with half your period.

It's not exact, but it's damn close.

Started this thread Reply With Quote
Thanked by:
  #4 (permalink)
 fluxsmith 
Santa Maria
 
Experience: Advanced
Platform: NinjaTrader, ThinkOrSwim
Broker: Mirus/Zen-Fire
Trading: ES
Posts: 290 since May 2010
Thanks Given: 97
Thanks Received: 322

Since their description says "giving higher weight to the TrueRange of the most recent bar" they are probably not using an SMA, maybe an EMA?

Visit my NexusFi Trade Journal Reply With Quote




Last Updated on May 29, 2010


© 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