Page 1 of 1

HELP CODE TCI INDICATOR PLEASE

Posted: Mon Oct 29, 2007 2:42 pm
by tsmike123
Need help to code this TCI indicator in EasyLanguage. Here is what I have so far.

n1 = ChannelPeriods; // Channel periods defaultvar is 14.
n2 = AvgPeriods; // Average periods defaultvar is 24.
AP = Avg; //Typical Price (High+Low+close)/3
ESA = EMA(AP, n1);
D = EMA(abs(AP - ESA), n1);
CI = (AP - ESA) / (0.15 * D);
TCI = EMA(CI, n2);

Plot( TCI, "TCI");



Thanks
Mike

Posted: Tue Oct 30, 2007 4:39 pm
by gmoney
Here is the EasyLanguage code:

input: n1(10), n2(21);
var: AP(0), ESA(0), D(0), CI(0), TCI(0);

AP = (High+Low+close)/3;
ESA = xaverage(AP, n1);
D = xaverage(absvalue(AP - ESA), n1);
if D > 0 then CI = (AP - ESA) / (0.015 * D);
TCI = xaverage(CI, n2);

Plot1( TCI, "TCI");

Posted: Tue Oct 30, 2007 4:43 pm
by gmoney
Wow, can't believe that was my first post on this forum. I'll quit being so shy in the future ;)

Posted: Tue Oct 30, 2007 6:08 pm
by tsmike123
Thanks a lot ! It work.

:)

Posted: Tue Oct 30, 2007 6:29 pm
by obx
tsmike123,

Posted about the same a gmoney's code on TS support forum for you.
D is a reserved word...

obx