Consolidation Breakout Strategy



What is the Consolidation Breakout Strategy?


The Strategy is looking for periods of price compression across candlesticks, also known as consolidation. When the price is compressed during periods of high liquidity there is often a break in the consolidation level either to the upside or downside. The strategy finds those levels of consolidation and uses RSI and moving averages to determine if a break to the upside or downside is more likely.

First, select how many bars the trade will cancel after an alert is placed


After the strategy signals a trade, an alert can be automatically generated to enter a trade if the conditions are met. However, the signal may be less relevant as time passes.

Therefore, we will want to cancel the potential order after a certain number of bars has passed.

Use the "strategy tester' tab to find the optimal setting.

Next, choose a Stop-Loss Strategy, Stop PIP Size, and Risk/Reward Ratio

- Stop-Loss Strategy

  • ATR Trail (No set Target Profit, only uses ATR Stop)

  • ATR Trail-Stop (Has set Target Profit, however, stop is based on ATR inputs)

  • Fixed PIP Size

**If you choose an ATR Stop-Loss Strategy - input the desired ATR period and Multiple you would like the stop to be calculated at**

**ATR Stop-Loss Strategies have a unique alert setup for Auto-Trading. See Auto-Trading Section**


Stop PIP Size = How many PIPs will be representative of the max risk. i.e. - if you are risking $100 and you set the PIP stop to 10, that means 10 PIPs = $100.

Risk/Reward Ratio = If you have a .5 risk/reward, it means you are risking $100 to make $50.



Next, set the Session Filter

Set the Timezone and Trade Session you desire. If no specific session is desired, simply uncheck the box next to 'Session Filter Active?'

Next, set the RSI Filer

If checked, this will force the strategy to consider RSI when signaling a trade.

Choose the RSI Period, the level RSI must be greater than to take a LONG trade, and the level RSI must be lower than to take a SHORT trade.

Next, set the Moving Average Cloud

If checked, this will force the strategy to consider the moving average when signaling a trade.

LONG trades will only be placed if the MA Cloud is green, and SHORT trades will only be placed if the MA Cloud is red.


Enter the Moving Average Type & Period:

  • Simple Moving Average

  • Exponential Moving Average

  • Hull Moving Average

  • Weighted Moving Average

  • Smoothed Moving Average

  • Double Exponential Moving Average

  • Triple Exponential Moving Average

Next, set the Custom Risk %

In combination with the 'initial capital' input on the 'Properties' tab, this input is for use on the 'Strategy Tester' tab and will help you understand how your selected inputs are performing. Using the initial capital number you entered with the risk % per trade, a 'Net Profit' value will be generated on the Strategy Tester Tab.

This is for informational use only and will not be used to set up auto trading via Autoview or PineConnector.


What is the Strategy Doing?

The Strategy is looking for periods of price compression across candlesticks, also known as consolidation. When the price is compressed during periods of high liquidity there is often a break in the consolidation level either to the upside or downside. The strategy finds those levels of consolidation and uses RSI and moving averages to determine if a break to the upside or downside is more likely.


For example, a LONG trade would be placed if:

The Moving Average and RSI boxes are checked, the strategy will consult with both values to determine a trade direction (if only one box is checked, the strategy will only use that selection, and if no boxes are checked it will look for a break to both the upside and downside).

If the MA Cloud is green and the RSI is over the input level, the strategy will place a buy stop order at the top of the consolidation looking for a break to the upside. Once the buy-stop level is broken a trade is automatically placed and the risk-reward selections will automatically determine your target profit and stop loss.


Highlight Coloring

Green Highlights = LONG Trade Signialed

Red Highlight = SHORT Trade Signaled

Yellow Highlight = Trade Signaled, but RSI and/or MA conditions were not met.

Finally, we backtest our ideas

After using the ‘Strategy Tester’ tab on TradingView to thoroughly backtest your predictions you are ready to take it to the next level – Automated Trading!

This was my whole reason for creating the script. If you work a full-time job, live in a time zone that is hard to trade, or just don’t have the patience, this will be a game-changer for you as it was for me.


Auto-Trading

When it comes to auto-trading this strategy I have included two options in the script that utilize the alert messages generated by TradingView.

*Note: Please trade on a demo account until you feel comfortable enough to use real money, and then please stick to 1%-2% of your total account value in risk per trade.*

AutoView

PineConnector


**ATR Auto-Trading Alert Setup**


How to create alerts on 3 Line Strike Strategy

For Trailing Stops:

1) Adjust autoview/pineconnector settings

2) Click "add alert"

3) Select "Condition" = Strategy Name

4) Select "Order Fills Only" from the drop-down

3) Remove template message text from "message" box and place exact text: {{strategy.order.alert_message}}

4) Click "create"


For Fixed Pip Stop:

1) Adjust autoview/pineconnector settings

2) Click "add alert"

3) Select "Condition" = Strategy Name

4) Select "alert() function calls only"

5) I like to title my Alert Name the same thing I named it as an Indicator Template to keep track



Good luck with your trading!

"Most people only sell for one of two reasons. Because they are up or because they are down. Neither have anything to do with strategy."

Howard Marks - Oaktree Capital