Frank Hassler's TSI
Author: zorgnak
Creation Date: 8/10/2010 10:31 PM
profile picture

zorgnak

#1
Has anyone coded up Frank Hassler's TSI yet?
http://engineering-returns.com/tsi/
profile picture

Eugene

#2
I hear it for the first time that "TSI" is by Frank Hassler. William Blau's original TSI (Trend Strength Index) is part of Community.Indicators.

As to this formula sharing the well-known TSI name, you could code it yourself - it's pretty simple, if you ignore the fact that the type of the average they use isn't disclosed (assuming SMA here). Coded on-the-fly:
CODE:
Please log in to see this code.
profile picture

sedelstein

#3
I am new to Wealth-Lab. downloaded it today. I figured a way to code my first indicator (this one only perhaps not as elegantly)

Hassler describes the trading system in AMI code. It will take me a while to learn the wealth-lab language. Eugene, could you code this up on the fly to show to a newbie?

Thanks

SetOption("CommissionAmount",0.00);
SetBacktestMode( backtestRegular);
SetOption("InitialEquity", 100000);
tsi = trendstrength();
LongCond = Close>MA(Close,50) OR ROC(Close,150)>0;
Setup1 = Longcond==True AND ((tsi>1.65 AND RSI(2)<18) OR (tsi<1.65 AND RSI(2)<8));
Setup2 = Longcond==False AND ((tsi>1.65 AND RSI(2)<13) OR (tsi<1.65 AND RSI(2)<2));
Buy = ((Setup1 OR setup2) AND Year() >= 1999 ) * sigScaleIn;
Sell = (tsi>1.65 AND RSI(2) > 61) OR (tsi<1.65 AND RSI(2) > 39);
SetPositionSize(33, spsPercentOfEquity );
profile picture

Eugene

#4
Here's my quick take at this dip buyer system:
CODE:
Please log in to see this code.

Note: Position sizing must be set through the Position Size control.
profile picture

sedelstein

#5
Thanks Eugene

I want to learn this language as soon as possible. Can you offer advice on the best way?

I am a VB programmer. I was thinking I should get a book on C# and then print out all the user guides and language references.

Regards

Steve

profile picture

Eugene

#6
You will find some advice in our Wealth-Lab Wiki FAQ on WealthScript and Strategies (click Support, Knowledge Base).
profile picture

odeedo

#7
I think there is a little confusion for the naming of TSI at the Wealthlab Wiki
Only the header says "TREND" Strength Index
But all through the rest of article it is call "TRUE" Strength Index.

Nevertheless Frank Hassler is not the first one who uses the name Trend Strength Index.

Odeedo
profile picture

Eugene

#8
Thanks for the heads-up. The Wiki article in fact documents the True Strength Index by W.Blau. So, "Trend" was replaced with "True" in the header.
profile picture

Gamba

#9
Hi Eugene,

would it be possible to add HasslerTSI to CommunityComponents?

Update: Coded it by myself in the meanwhile ...

Thx
profile picture

Eugene

#10
Sure, I'll add it in an upcoming release of Community Indicators (to be precise).

Update: added, version 2013.08 has been uploaded.
profile picture

Cone

#11
This edit of the strategy seems to follow the intended logic more closely, and fairly closely mirrors the equity curve show in the summary (click)

CODE:
Please log in to see this code.


fyi, the TSI trigger value chosen in the article, 1.65, turns out to be precisely optimized for maximum profit for this test against the DAX cash index.
profile picture

Eugene

#12
QUOTE:
fyi, the TSI trigger value chosen in the article, 1.65, turns out to be precisely optimized for maximum profit for this test against the DAX cash index.

I'm not surprised, in general. ;)
profile picture

Cone

#13
I just ran it on the Active Trader 17, with fixed or % of equity sizing (5% with 2:1 margin), and I am extremely surprised at the results.

Edit: Same general shape with any WatchList I try. Frankly, this looks like a gem.

Edit 2: Corrected entry logic for use with the Pyramid PosSizer.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).