ADX with Smoothing -simple question

Questions about MultiCharts and user contributed studies.
whirl
Posts: 22
Joined: 16 Aug 2010
Has thanked: 4 times

ADX with Smoothing -simple question

Postby whirl » 16 Aug 2010

Hello, new to MultiCharts. I just have a simple question, if anyone can help me. I wanted to put a custom setting of ADX (AvgDirMovement). On my Esignal, I can place, the length, and also a smoothing variable. On MC, I only see the length part. How would I be able to put this in my charts, and later on add it to my automated trading script.
Thanks in advance, much appreciated.

User avatar
TJ
Posts: 7743
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2222 times

Re: ADX with Smoothing -simple question

Postby TJ » 16 Aug 2010

by smoothing, do you mean by adding a moving average on top of the ADX reading?

whirl
Posts: 22
Joined: 16 Aug 2010
Has thanked: 4 times

Re: ADX with Smoothing -simple question

Postby whirl » 16 Aug 2010

I'm not sure exactly, I hear something either a ma, or a wellswidex smoothing. Something similar in a forum I read, but I still don't know exactly where it is to input this "smoothing"
http://forum.esignalcentral.com/showthr ... adid=24076

btw: ameritrade strategy desk, has this second smoothing component as well, with a brief description:
http://www.tdameritrade.com/StrategyDes ... ement.html

whirl
Posts: 22
Joined: 16 Aug 2010
Has thanked: 4 times

Re: ADX with Smoothing -simple question

Postby whirl » 17 Aug 2010

I found this webpage, which may be showing the formula, for what I want, but I don't know how to convert it. Does anyone have an idea, if this is the classic "smoothing" that esignal, ameritrade, stockhcharts.com have for ADX smoothing?

http://www.mql5.com/en/code/8

whirl
Posts: 22
Joined: 16 Aug 2010
Has thanked: 4 times

Re: ADX with Smoothing -simple question

Postby whirl » 17 Aug 2010

kind of interesting, i see it available to esignal, ameritrade strategydesk, stockcharts.com, ninjatrading, metastock, but for some reason i cant find it for TS or multicharts, after hours of googling. can anyone point me in the right direction please?

User avatar
TJ
Posts: 7743
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2222 times

Re: ADX with Smoothing -simple question

Postby TJ » 17 Aug 2010

I found this webpage, which may be showing the formula, for what I want, but I don't know how to convert it. Does anyone have an idea, if this is the classic "smoothing" that esignal, ameritrade, stockhcharts.com have for ADX smoothing?

http://www.mql5.com/en/code/8
according to the formula, the smoothing is done by a simple moving average:

Code: Select all

ADX(i) = SMMA(DX, Perod_ADX, i)
you can do the same with TradeStaion/MultiCharts' formula:

edited

Code: Select all

input:
ADX.length(14),
Smooth.length(14);

var:
smoothed.ADX(0);

smoothed.ADX = average( ADX( ADX.Length ) , Smooth.length);

Plot1(smoothed.ADX, "ADX");

whirl
Posts: 22
Joined: 16 Aug 2010
Has thanked: 4 times

Re: ADX with Smoothing -simple question

Postby whirl » 17 Aug 2010

Hi TJ, thanks for your replies, it's very much appreciated.

ADX itself is already a smoothing of the DMIs and asks for the period length.

Since the ADX is already a type of smoothing, I guess I am going further, and asking how to smooth the ADX itself. Therefore, on the software packages, that allow it, it asks for 2 variables, the length and also the smoothing. On Esignal for example, a standard ADX, would be 14,14. But on MC it only has 1 input. So MC's, 14, would be 14,14 on those w/ smoothing. Problem, is, how to put something like 14,9 on MC.

I'm not a great programmer so please forgive me. The formula I previously referenced show some smoothing, but I'm not sure if it's referring smoothing of the DMI, (which is the ADX), or is it smoothing OF the ADX?
In either case, I'm not sure the actual formula used, which I have been trying hours to find out. I'm working on trying to figure out how to implement it in MC. I'm not sure how to create it in MC to test. But if anyone can help me, would be very grateful.

User avatar
TJ
Posts: 7743
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2222 times

Re: ADX with Smoothing -simple question

Postby TJ » 17 Aug 2010

yes, it looks like the original ADX is already smoothed.

To read the code of ADX,
just right click on the keyword in PLEditor.

whirl
Posts: 22
Joined: 16 Aug 2010
Has thanked: 4 times

Re: ADX with Smoothing -simple question

Postby whirl » 18 Aug 2010

Hi TJ

I just realised you edited the code you placed. Thanks very much for your response and work. I ran that script in MC to see what kind of results I get. Unfortunately, the numbers it spit out were not what I was looking for. This is probably due to the link that had the formula that I posted earlier probably was not the correct one. I found another formula that "seems" to be the correct one at this page: http://www.linnsoft.com/tour/techind/adx.htm

To test if it's the correct one, I just used the Daily close for the SPY on Aug 17 for example. The standard ADX of 14 periods is 16.92. On Esignal, to get the standard you have to enter the same smoothing # to the periods. In this case, 14,14 would equal the same 16.92.

Now, when I tried the same setting on the code I just installed, 14,14 resulted in an ADX of 16.01, when it should also be 16.92.
If I changed the default settings from 14,14 to 14,10 smoothing on Esignal I get, 16.46.
However, if I enter 14,10 on that new code, I get 15.81.
I guess we can use that as a guideline as to how to find the correct formula.

I realise on a daily chart of the spy, 16.92 to 16.01 is not much of a difference. However, if we change this to a 5 minute chart, on a volatile instrument, there is a tremednous difference. Even more so if I use something like 8 periods instead of 14.

I REALLY appreciate the effort you placed to help me. I only wish it was easier to find this formula. I figure if popular software like Esignal, Ameritrade, and others had it standard, by now someone would have this for either TS or Multicharts.

If someone has this ADX indicator w/ a variable for smoothing PLEASE let me know.
thanks Again

whirl
Posts: 22
Joined: 16 Aug 2010
Has thanked: 4 times

Re: ADX with Smoothing -simple question

Postby whirl » 18 Aug 2010

I just found this link on Esignal regarding the formula. It mentions something of using Exponential EMA smoothing. Is that something different than the code we have?

http://forum.esignal.com/showthread.php?threadid=10298

whirl
Posts: 22
Joined: 16 Aug 2010
Has thanked: 4 times

Re: ADX with Smoothing -simple q - FOUND, coding assitance p

Postby whirl » 18 Aug 2010

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: http://www.linnsoft.com/tour/techind/adx.htm

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

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


Return to “MultiCharts”