Can't remember where I got this 
but it appears to agree with the 
inbuilt CCI.
Regds
Gerard

_SECTION_BEGIN("CCI Full");
// The full CCI(14)
per = 14;
TP = Avg ;
TMA = MA( TP, per );
d1 = abs(TP - MA(TP,per));
d2 = abs(Ref(TP,-1) - TMA);
d3 = abs(Ref(TP,-2) - TMA);
d4 = abs(Ref(TP,-3) - TMA);
d5 = abs(Ref(TP,-4) - TMA);
d6 = abs(Ref(TP,-5) - TMA);
d7 = abs(Ref(TP,-6) - TMA);
d8 = abs(Ref(TP,-7) - TMA);
d9 = abs(Ref(TP,-8) - TMA);
d10 = abs(Ref(TP,-9) - TMA);
d11 = abs(Ref(TP,-10) - TMA);
d12 = abs(Ref(TP,-11) - TMA);
d13 = abs(Ref(TP,-12) - TMA);
d14 = abs(Ref(TP,-13) - TMA);

CCIn= 66.666*(TP - TMA)/((d1+d2+d3+d4+d5+d6 +
d7+d8+d9+d10+d11+d12+d13+d14)/14);

Plot ( CCIn , "CCI(14)", 1,4);
Plot(0,"",4);
_SECTION_END();

--- In [email protected], "angus_83210" <[EMAIL PROTECTED]> wrote:
>
> Does anyone have the CCI Function in AFL.  I don't want the x = CCI
> (14);, I am after the complete function.
> 
> Thanks
> 
> Robert
>





Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to 
SUPPORT {at} amibroker.com

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

For other support material please check also:
http://www.amibroker.com/support.html
 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[EMAIL PROTECTED] 
    mailto:[EMAIL PROTECTED]

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 

Reply via email to