Breakout Strategy with Price above EMA
Author: bpsylianteng
Creation Date: 1/9/2015 8:14 AM
profile picture

bpsylianteng

#1
Hi,

I am testing a basic strategy of buying a stock when-
1. It is above 100EMA
2. Price Crosses Highest High for 20days
3. Price Crosses Highest High for 55days
*Basically buy will only be initiated if 20d high = 55d high and price crosses this level

Exit is an ATR stop of 2.0

How do I do this using the tools available in wealth lab? Currently I made the ff conditions-
Buy at market-
1. Price is above moving average
2. Multi-condition------Price >=Highest price in 20 lookback period & Price >- Highest price in 55 lookback period

Sell at ATR Stop-

However, once I inspect the individual stocks that I tested, the buy entries are not where 20d high = 55 high. Please help.
profile picture

Eugene

#2
Hi,

You don't need a Multi-Condition Group here. Note that conditions are ANDed by default. Also, "Price Crosses Highest High for 55days" automatically includes "Price Crosses Highest High for 20days": when price breaks through a 55-day high, it automatically sets a new 20-day high.

Here's what I suggest:

1a. Entry: Channel Breakout > "Buy at stop channel high" (55)
1b. Condition: Price is above moving average (100)

2. Exit: Sell at ATR Stop
profile picture

bpsylianteng

#3
Hi Eugene,

Thanks for the reply. I understand that when price breaks through a 55-day high, it automatically sets a new 20-day high. But what I want to test is a break-out when 55day high is equal to 20d high. I see this during periods of low volatility. How would you do this?

Also, what is the purpose of the Multi-Condition when by default all criteria are ANDed?
profile picture

Eugene

#4
QUOTE:
Also, what is the purpose of the Multi-Condition when by default all criteria are ANDed?

Multi-Condition is a powerful instrument: fuzzy logic. For more details see the User Guide where it's explained: Strategy Window > Strategy Builder > MC, Multi-Condition Group.

QUOTE:
But what I want to test is a break-out when 55day high is equal to 20d high.

Could you show me an example?
profile picture

bpsylianteng

#5
One example is AXP for Feb 7, 2013. Price was trading in a narrow range hence there were instances when the 55d high and 20d high converged and were equal. What I want to do is test a system that buys at a level where 55d and 20d high converge.

Is there a way to provide you a screenshot?
profile picture

Eugene

#6
Where? There should be a blue line for the 20-day high but as expected, it's covered by the reddish 55-day high line. They always converge.

profile picture

bpsylianteng

#7
Hi,

I am using the 20d and 55 day Donchian Channels . It is an indicator that takes the highest high and the lowest low of the last n periods. On Feb 7, 2013, the 20d and 55d upper barrier of the Donchian Channels were overlapping indicating that the 20d was equal to 55day high. It is also on this day that price broke through these two levels and went higher.

I am trying to attach the screenshot by clicking on "Add Attachment" but website wont let me.
profile picture

bpsylianteng

#8
Please see attachment.

The Blue Dashed Lines are the 55-d Donchian Channels and the Green Straight Lines the 20-d Donchian Channels. Take note that the upper channels were overlapping for days before price broke through them on 02-07-13 (encircled in pic)

profile picture

Eugene

#9
QUOTE:
On Feb 7, 2013, the 20d and 55d upper barrier of the Donchian Channels were overlapping indicating that the 20d was equal to 55day high. It is also on this day that price broke through these two levels and went higher.

You said it before: "But what I want to test is a break-out when 55day high is equal to 20d high." This is exactly what happens in your encircled fragment.

There is nothing else I can add to this discussion. It is going nowhere.

QUOTE:
I am trying to attach the screenshot by clicking on "Add Attachment" but website wont let me.

It was either in an unsupported format (not PNG, JPG) or too big (greater than 2 MB).