NexusFi: Find Your Edge


Home Menu

 





Need help to modify standard Ninjatrader's ADX/DMI indicator formula


Discussion in Traders Hideout

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




 
Search this Thread

Need help to modify standard Ninjatrader's ADX/DMI indicator formula

  #1 (permalink)
 Azrael 
Jurong Singapore
 
Experience: Beginner
Platform: NinjaTrader
Broker: Optimus Futures/Rithmic
Trading: TF
Posts: 72 since Jul 2012
Thanks Given: 39
Thanks Received: 9

Hi

I am looking to create a variant of the usual ADX/DMI.

From wikipedia,

Quoting 
The ADX is a combination of two other indicators developed by Wilder, the positive directional indicator (abbreviated +DI) and negative directional indicator (-DI).[2] The ADX combines them and smooths the result with an exponential moving average.

To calculate +DI and −DI, one needs price data consisting of high, low, and closing prices each period (typically each day). One first calculates the directional movement (+DM and −DM):

UpMove = today's high − yesterday's high
DownMove = yesterday's low − today's low
if UpMove > DownMove and UpMove > 0, then +DM = UpMove, else +DM = 0
if DownMove > UpMove and DownMove > 0, then −DM = DownMove, else −DM = 0
After selecting the number of periods (Wilder used 14 days originally), +DI and −DI are:

+DI = 100 times exponential moving average of +DM divided by average true range
−DI = 100 times exponential moving average of −DM divided by average true range
The exponential moving average is calculated over the number of periods selected, and the average true range is an exponential average of the true ranges. Then:

ADX = 100 times the exponential moving average of the absolute value of (+DI − −DI) divided by (+DI + −DI)
Variations of this calculation typically involve using different types of moving averages, such as a weighted moving average or an adaptive moving average.

The idea is to change the EMA/Wilder's calculation of the ninjatrader's ADX/DMI with another moving average of my specification (I will provide the MA script), or allowing multiple moving averages to be modularly used (depends on my budget) of +DI, -DI, True Range and ADX calculations.

Cheers

Started this thread Reply With Quote




Last Updated on April 11, 2013


© 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