|
Help me convert this great indicator
Hello,
Can anyone please help me convert this great indicator that I have for Amibroker into MT4. Here is a little background and then the code.
thanks
chomper
The Trading Channel Index (TCI) identifies changes in price direction. The TCI can be used for
short-term confirmation of an Expert Rating signal, and is especially useful in option trading.
A simple rule is to never take a position against the direction of the TCI. The TCI is a very
short-term and responsive indicator and is likely to change in a short period of time. When you have determined
a position that you wish to take, using the direction of TCI to dictate your entry point can be an effective short-term timing method.
The Trading Channel Index is an adaptation of equities of Donald R. Lambert's Commodity Channel Index. The TCI has been slowed
down and is not quite as volatile as the Commodity Channel Index, whose fast response is needed for the commodity markets. A slower response
is more pratical for equity markets.
Used it Intraday as a filter.
Here is the amibroker code.....
n1 = ChannelPeriods; // Channel periods defaultvar is 10.
n2 = AvgPeriods; // Average periods defaultvar is 21.
AP = Avg; //Typical Price (High+Low+close)/3
ESA = EMA(AP, n1);
D = EMA(abs(AP - ESA), n1);
CI = (AP - ESA) / (0.015 * D);
TCI = EMA(CI, n2);
Plot the TCI line.
|