- ago
Hello,

after several tries, I think I have come up with something solid.

It's called "Range contraction breakout"

example



You buy after big breakout candle in anticipation of continued move higher.

Initial stop is below breakout candle's low, and then breakeven or small loss is in case of consolidation, if the close after 1day is below breakout bar's close.

Then assuming first two conditions haven't fulfilled, stock rallies, profit taking either happens when stock closes below 10EMA or position profit % exceeds 50%.

Here's the logic

Entry



Exit



Results















I think the the reason the results are solid, that I have been able to filter out the bad trades as essentially scratches, and they don't turn into a bigger losers that need to, the other half is what pays.

I tried with various settings, as fixed amount of shares, as % of equity, as % of risk, add specific filters such as SPY & QQQ above their 20EMA, stock is up X % in quarter, all where able to maintain 1:2 R/R with approximately 48-50% win-rate.

I haven't fully backtested what are the results based on stock prices, maybe there is some extra edge to squeeze out...

Since I am still very new to backtesting & but I am experienced at trading, is there something I am missing, am I delusional with results, anything you can add?

Thanks
1
1,198
Solved
7 Replies

Reply

Bookmark

Sort
Cone8
 ( 4.83% )
- ago
#1
Nice job! At the moment, I notice only these:

1. Using a Yahoo! DataSet, your backtest includes Survivorship Bias. If you don't know what it is, see this -
https://www.wealth-lab.com/blog/survivorship-bias

I'd recommend doing the backtest with the Wealth-Data S&P 500, but if you need even more symbols for without survivorship bias, get Norgate Data.
https://www.wealth-lab.com/extension/detail/Norgate

2. The rule "Close is greater than 15" peeks, because when you compare price to a value historically it includes "future splits". To resolve it, substitute the SplitRev indicator for Close.
1
Cone8
 ( 4.83% )
- ago
#2
3. Sorry, there's another problem with peeking that I didn't notice before. The qualifier "1 bar ahead" looks at tomorrow's Close. The code prevents signals from that rule (they're not possible without a crystal ball), but the backtest will take those trades.

I can't remember the motivation for adding that Qualifier to the PowerPack, but if it's not already documented, I'll do it now. I'm pretty sure it's only to help create strategies for backtesting AtClose orders.

In short - remove that "1 bar ahead" Qualifier. It's only "somewhat valid" with AtClose orders.
0
Best Answer
Cone8
 ( 4.83% )
- ago
#3
I found that it's impossible to navigate to Power Pack help topics "Indicators" and "Building Blocks". You'll be taken to the main help for those topics, not the PP topic. This will be corrected in Build 35.
0
- ago
#4
Cone,

thank you for your input,

then how do I specify that I want my trade to exit, if for example stock rallies, but pulls back to my entry?

My main goal is to filter out bad trades that don't pan out right away.

I adjusted entry rules

Pattern has 100% confidence level and Splitrev close is bigger than 15.

Removed requirement that close has to be above 10/20 and 50 EMA.

Exit



Stop-loss #1 - if close is below breakout bar low

Stop-loss #2 - if close is less than breakout bar's close after 2 bars (in another words...I give 2 days time after breakout to consolidate(assuming it doesn't go below Breakout bar's low) to move higher, based on breakout bar's close price)

Profit #1 - if profit is 20% or more

Profit #2 - if after 2 bars profit is 10% or more

Results

Tested S&P 500 and NASDAQ 100 stocks for the last 10Y with fixed 500 shares position.

S&P 500







NASDAQ 100







I think this breakout strategy has a statistical edge, I just need to find out a way to filter out the noise and bad trades.




0
Glitch8
 ( 11.08% )
- ago
#5
You should never specify more that 1 Bar Ahead using this Power Pack Condition. It's just peeking into the future.

The only reason we added this Block to Power Pack was to support entering and exiting trades at the closing price, which I'm still not a fan of in any event.

If you look 1 Bar Ahead, you can examine the data and then issue an entry/exit At Close without technically peeking into the future, although whether or not you'd be able to execute such a trade in reality is questionable.

Looking 2 or more Bars Ahead is simply illegally predicting the future.

To top it off, you should use 1 Bar Ahead only with "At Close" entries/exit, not Market entries/exits.
1
Glitch8
 ( 11.08% )
- ago
#6
We're working on documenting this Block better for Build 35, and we're also making a few changes. It'll be limited to 1-Bar-Ahead only, and it will only work if paired with an "At Close" Entry/Exit. Apologies for the documentation gap here :)
0
Cone8
 ( 4.83% )
- ago
#7
QUOTE:
then how do I specify that I want my trade to exit, if for example stock rallies, but pulls back to my entry?

My main goal is to filter out bad trades that don't pan out right away.


Here's an idea for you. You can add another Sell At Market to get you out of a Position after X bars if the profit percentage is less than some value -

0

Reply

Bookmark

Sort