NexusFi: Find Your Edge


Home Menu

 





Help. Simple Request on ADX if possible.


Discussion in EasyLanguage Programming

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




 
Search this Thread

Help. Simple Request on ADX if possible.

(login for full post details)
  #1 (permalink)
 whirl 
usa
 
Experience: Intermediate
Platform: multicharts
Posts: 6 since Aug 2010
Thanks Given: 0
Thanks Received: 0

Hello. How do we change the smoothing of the ADX? Other packages like Esignal, Ameritrade StrategyDesk, Stockcharts.com, etc allow us to change 2 variables: length, and smoothing of the ADX. However, the ADX on Tradestation/Multicharts only allow us to input 1 variable, the length. How do are we able to change the smoothing?
On Esignal for example, ADX of 14 w/ no smoothing would be a setting of (14,14). An ADX of 10 would be (10,10)etc. If you want to change it to 12 days and 9 smoothing it would be (12,9). Since TS/MC doesn't give you an area to change the smoothing how do we do it?

Here are some reference links I reserached to help illustrate:

eSignal Forums - ADX (Welles Wilder)
Strategy Desk - Help Center
Investor/RT Tour - ADX (Average Directional Movement)

If anyone out there knows how to add the smoothing input, I would be VERY appreciated.
Thanks in Advance.

Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Request for MACD with option to use different MAs for fa …
NinjaTrader
The space time continuum and the dynamics of a financial …
Emini and Emicro Index
Wicked Renko Bars
Traders Hideout
Trader Dale [email protected] or Scammer Dale
Trading Reviews and Vendors
Searching for CurrentMonthOHL Indicator
NinjaTrader
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Tao te Trade: way of the WLD
37 thanks
Deaddogs Stock Trading
27 thanks
GFIs1 1 DAX trade per day journal
26 thanks
Supertradersams Thread Journal on NQ/MNQ
24 thanks
Leaving CFD trading and learning futures
11 thanks

(login for full post details)
  #3 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Posts: 50,233 since Jun 2009
Thanks Given: 33,105
Thanks Received: 101,350


Untested, but this should do it.

 
Code
                            


inputs

    
Length14 ),
    
Smooth ) ;

variables:
    
var0) ;

var0 Average(ADXLength ), Smooth ) ;

Plot1var0"ADX" ) ;

condition1 var0 var0[1] and var0[1] <= var0[2] ;
if 
condition1 then
    Alert
"Indicator turning up" )  
    
else 
begin 
condition1 
var0 var0[1] and var0[1] >= var0[2] ;
if 
condition1 
then
    Alert
"Indicator turning down" ) ;
    
end 
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


For the best trading education, watch our webinars
Searching for trading reviews? Review this list


Lifetime Elite Membership: Sign-up for only $149 USD
Receive exclusive 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
(login for full post details)
  #4 (permalink)
 whirl 
usa
 
Experience: Intermediate
Platform: multicharts
Posts: 6 since Aug 2010
Thanks Given: 0
Thanks Received: 0

Hi BigMike

Thanks for helping. I just tested it, but I guess it's not the correct formula. I'm not sure what the actual smoothing code is, but one way to test it, is to compare it against the standard ADX.

In theory, 14 periods, and 14 smoothing (14,14) should = the standard ADX.

If we look at the daily SPY chart, today (Aug 18), the standard ADX closed at 16.73. When I inputed 14,14 on the new code created, I got 15.96. Obviously not a big difference on this scale, but if I changed to a 5 minute chart on say 3 periods chart on a more volatile instrument, the difference would be huge.

Since I'm not a programmer I guess I don't know how to find the code for smoothing. Perhaps an Exponential MA? But I'm not sure.

The links I mentioned earlier hopefully would give an idea of what it's "supposed" to look like?
Again more assistance would be appreciated.

Started this thread Reply With Quote
(login for full post details)
  #5 (permalink)
 whirl 
usa
 
Experience: Intermediate
Platform: multicharts
Posts: 6 since Aug 2010
Thanks Given: 0
Thanks Received: 0

Hey BigMike,

I just played around w/ the code you put, and wanted to give a little feedback. On the other software packages, if you put the same smoothing #, you get the standard ADX. For instance, (14,14) on Esignal you get the standard ADX(14). So basically, you increase or decrease smoothing from there.

On the code you wrote, (14,1) = the standard ADX. I don't know what the relationship codewise is, but can it be turned around where (14,14) = the standard ADX? Then I can add or subtract the smoothing from there to match studies I am working on.

thanks

Started this thread Reply With Quote
(login for full post details)
  #6 (permalink)
 whirl 
usa
 
Experience: Intermediate
Platform: multicharts
Posts: 6 since Aug 2010
Thanks Given: 0
Thanks Received: 0

I found the formula to implement the smoothing. Apparently it's not just a simple moving average. If anyone could be so kind as to help me code it, since I'm not a programmer.

I got the formula from this webpage: Investor/RT Tour - ADX (Average Directional Movement)


ADXi = [(ADX(i-1) * (n - 1)) + DXi] / n
where n = Smoothing Period
DX = [ 100 * ABS( (+ [COLOR=#0066cc]DI[/COLOR]) - (- [COLOR=#0066cc]DI[/COLOR]) ) ] / ( (+ [COLOR=#0066cc]DI[/COLOR]) + (- [COLOR=#0066cc]DI[/COLOR]) )


This is the formula for the ADX. Notice, there are 2 variables, that can be input:
i: the length (this is something that standard TS and MC can be entered)
n: the smoothing. This is the variable that I wanted to put in that some software allows, but TS and MC's ADX's indicator formula doesn't give a place to enter.

Is there anyone that can code this that can allow both variables to be input? i and n? The standard ADX only allows i.

Much appreciated

Started this thread Reply With Quote





Last Updated on August 18, 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