|
|
|
Forum 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 !!!
|
|
|
|
|
Forum 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
|
|
|
|