««12

ADX Indicator Expand / Collapse
Author
Message
Posted 8/24/2010 11:58:58 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 10/10/2010 3:38:49 PM
Posts: 8, Visits: 74
Hi, Den!
I wery need in Woodie CCI indicators !!!
Post #1890
Posted 9/7/2010 2:52:51 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 9/8/2010 4:33:45 PM
Posts: 4, Visits: 41
Here are ADX code from my station and in "//" ActFX code ...
--------
declare lower;
input length = 14;
def hiDiff = high - high[1];
def loDiff = low[1] - low;

//

hiDiff:=SourceGraph.HighValue(ValueIndex)-SourceGraph.HighValue(ValueIndex-1);
loDiff:=SourceGraph.LowValue(ValueIndex-1)-SourceGraph.LowValue(ValueIndex):
//

def plusDM = if hiDiff > loDiff and hiDiff > 0 then hiDiff else 0;
def minusDM = if loDiff > hiDiff and loDiff > 0 then loDiff else 0;

//
if hiDiff > loDiff and hiDiff > 0 then plusDM:= hiDiff else 0;
if loDiff > hiDiff and loDiff > 0 then minusDM:= loDiff else 0;

TrueRange:= Max(SourceGraph.CloseValue(ValueIndex-1), SourceGraph.HighValue(ValueIndex)) - Min(SourceGraph.CloseValue((ValueIndex)-1), SourceGraph.LowValue(ValueIndex));
//

def ATR = WildersAverage(TrueRange(high, close, low), length);
plot "DI+" = 100 * WildersAverage(plusDM, length) / ATR;
plot "DI-" = 100 * WildersAverage(minusDM, length) / ATR;
def DX = if ("DI+" + "DI-" > 0) then 100 * AbsValue("DI+" - "DI-") / ("DI+" + "DI-") else 0;
plot ADX = WildersAverage(DX, length);
----

so, I recalculate WilderAverage to EMA with (2N - 1) formula so Period is 27 and it's ok, but I stuck in implementing ATR .

Any help with this



Edited: 9/7/2010 3:12:07 PM by datasos
Post #1950
« Prev Topic | Next Topic »

««12

Reading This Topic Expand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: Admin

All times are GMT -5:00, Time now is 11:26am


© 2009 Actforex.com Terms of Use