ActiveTrader 2012-01 | Symmetrical triangle breakouts
Author: Eugene
Creation Date: 12/8/2011 7:49 AM
profile picture

Eugene

#1
Code for ActiveTrader 2012-01 | Symmetrical triangle breakouts strategy published.

EDIT 02/07/2017: Superseded by ActiveTrader 2012-01 | Breakout from Triangle (Rev.A)

We recommend downloading it directly using the convenient "Strategy Download" feature (found in Wealth-Lab's "Open Strategy" dialog).
profile picture

Eugene

#2
pscanlon1 asked:

Hello All, If you run the code below, you will see that it continues to place trades after the initial trigger of a triangle pattern is detected. What I would like to accomplish is, once a trade is placed, because the price has moved outside of the triangle pattern, I would not like a new trade placed until a new triangle pattern is found...

CODE:
Please log in to see this code.


I have attached a photo here to highlight the only 2 trades I would like to be alerted on. I am trying to just use a trailing stop with it.

profile picture

Eugene

#3
The problem as I see it is that a 1% trailing stop is unsuitable for the chosen instrument (set way too tight). If it's adjusted properly the stop works as intended. Any other issue?
profile picture

Eugene

#4
On 02/07/2017, "ActiveTrader 2012-01 | Symmetrical triangle breakouts" has been replaced with a Revision A strategy...

ActiveTrader 2012-01 | Breakout from Triangle (Rev.A)

...in which we've improved detection of ascending triangles by minimizing threshold between the peaks.
profile picture

LenMoz

#5
When I run this strategy on the S&P 500, I get 25 errors like this one...
QUOTE:
Error processing symbol ABT Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
Full error is:
QUOTE:
Runtime error: index was out of range. Must be non-negative and less than the size of the collection
at WealthLab.Strategies.TriangleBreakout.Execute()
at WealthLab.DataSeries.get_Item(Int32 i)
at System.ThrowHelper.ThrowArgumentOutOfRangeExceptio(ExceptionArgument argument, ExceptionResource resource)


Also, I'm unable to make it performant, barely beating buy-and-hold after optimization. Is your experience better?
profile picture

Eugene

#6
Thank you for pointing me towards the error. "Revision B" with a fix uploaded.

In my opinion, a strategy like this could hardly aim at beating Buy&Hold. It trades pretty infrequently, especially with "Ascending only?" mode activated (29 trades on Dow 30 / 10 years). As it's clearly a niche system, I'd be mainly interested in its (low) exposure and (potential) ability to smooth out the portfolio equity.

Next, armed with only a channel-based exit (which lacks any adaptivity) the system is incomplete so your optimization is basically measuring the performance of its simpleton exit. Its exit "strategy" deserves much improvement.

But maybe you speak tongue-in-cheek? After all, beating this unprecedented bullish market of the last decade is a challenge itself!
profile picture

LenMoz

#7
It wasn't tongue-in-cheek. I'm always looking for good ideas.
QUOTE:
In my opinion, a strategy like this could hardly aim at beating Buy&Hold
Then what's its purpose? Why bother publishing? When I first began to use WealthLab, I tried several of the canned strategies and failed to find any strong performers. I switched to writing my own with better results. Seeing this one in the spotlight, I revisited canned strategies. This just matches my earlier experience. <<shrug>>
profile picture

Eugene

#8
The purpose of publishing this article 5 years ago was (as always) to evaluate an idea. But by saying "a strategy like this" I meant a niche strategy with low exposure. Its mission isn't in always being in the black. If it doesn't take the beating all the time it's already fine. Just to be loosely or negatively correlated with the primary system and to support it when it takes a break.