## HELP CODE TCI INDICATOR PLEASE

Moderator: moderators

tsmike123
rank: <50 posts
Posts: 2
Joined: Tue Oct 23, 2007 11:50 pm
Reputation: 0
Gender:

### HELP CODE TCI INDICATOR PLEASE

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
Last edited by tsmike123 on Sat Nov 03, 2007 4:12 am, edited 1 time in total.

gmoney
rank: <50 posts
Posts: 11
Joined: Fri May 26, 2006 12:56 pm
Reputation: 0
Location: Scottsdale, AZ
Gender:
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");

gmoney
rank: <50 posts
Posts: 11
Joined: Fri May 26, 2006 12:56 pm
Reputation: 0
Location: Scottsdale, AZ
Gender:
Wow, can't believe that was my first post on this forum. I'll quit being so shy in the future

tsmike123
rank: <50 posts
Posts: 2
Joined: Tue Oct 23, 2007 11:50 pm
Reputation: 0
Gender:
Thanks a lot ! It work.

obx
rank: <50 posts
Posts: 41
Joined: Fri May 26, 2006 12:35 pm
Reputation: 0
Gender:
tsmike123,

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

obx