Bellow you find the implementation of TSI for TradeSignal . The syntax is very similar to TradeStation.
Please be aware that TradeSignal’s ATR calculation is based on a simple moving average (read here for more information)
.
equilla – code
Meta: SubChart(True); VAR: Ratio, TSI; Ratio = abs((close - close[10])) / AvgTrueRange( 10 ) ; TSI = Average(Average(Ratio,10),100); DrawLine( TSI, "TSI" );

Would you say something about why you take two averages of Ratio. It looks like you are computing the 100 day moving average of the 10 day moving average. Is that really very different from a straight 100 day moving average?
Hi Russ,
the idea of using an average of an average is simply to get a smoothed indicator line without loosing to much of directional change (compared to a 200MA).
The principle is still working, even with a single longer MA.
Frank
I’m afraid I still don’t see it. To take a simple example, consider Average(Average(X, 2),5), where X is some time series. I chose 2 and 5 so that I could show the details of the example. This is
(Average(X, 2)(-4) + Average(X, 2)(-3) + Average(X, 2)(-2) + Average(X, 2)(-1) + Average(X, 2)(0) ) / 5 where Average(X, 2)(-N) is the 2 period average of X N periods ago. But Average(X, 2)(-N) is (X(-N) + X(-(N+1))/2. Substituting:
((X(-4)+X(-5))/2 + (X(-3)+X(-4))/2 + (X(-2)+X(-3))/2 + (X(-1)+X(-2))/2 + (X(0)+X(-1))/2 ) / 5
= (X(-5) +X(0)+ 2*(X(-4) + X(-3) + X(-2)+X(-1) ) / (5*2)
= (X(-5) + X(0))/2 + X(-4) + X(-3) + X(-2)+X(-1))/5
But that is very much like Average(X, 5). It’s not exactly the same since it includes X(-5) and uses only 1/2 X0). But it”s so close that it would seem not to make too much of a difference. Am I doing something wrong here?
Hi Russ,
thanks for challenging me
. I did some tests with a version of a single MA100 and a second version of MA100(MA10). The results are very similar, though i got slightly slightly better results. Overall i agree, there isn’t much of a difference. I will send you an email with a picture showing the two different versions, of course the single MA100 version has a slightly more noisy line.
All the best,
Frank
This is a great indicator, could you post the code for Tradestation.
Thanks
Thanks for the feedback.
I’m not a TradeStation user, however the TradeSignal code shouldn’t be that different.
Frank
Hi,
The indicator is very helpful. This is the code I am using for Tradestation.
var: TSIratio(0),TSI(0);
TSIratio=AbsValue(close-close[10])/avgTrueRange(10);
TSI=average(average(TSIratio,10),100);
Plot1(TSI, “TSI”);
Plot2(0,”0″);
Thanks
HPTrade
Thanks a lot for sharing!
Regards,
Frank
Is it possible to have code for eSignals Advanced GET. It looks very promising indicator to filter out the noise.
Thanks
BB