[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[amibroker] Re: CCI in AFL not the CCI function



PureBytes Links

Trading Reference Links

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 amibroker@xxxxxxxxxxxxxxx, "angus_83210" <rduncan@xxx> 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
>




Content-Description: "AVG certification"
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.409 / Virus Database: 268.13.27/517 - Release Date: 11/3/2006