Bullish Momentum Breakout

This indicator will detect breakouts of upwards price momentum. To detect rising price momentum we can use the fact that candle lengths tend to increase when momentum is rising quickly, either to the upside or downside.

Select the Indicator Builder from the menu, then add a Moving Average operator.

Card image cap

Moving average of candle length

Set the input to the Moving Average to a Subtract operator. Now set the inputs to high price and low price. Set the averaging period in the Moving Average to 12 bars. To do this, click the cogs icon in that row, and select the parameters tab.

This logic will give us the average candlestick length over the last 12 bars.

Card image cap

Add second Moving Average

We need to detect places where the candlestick size is rising unusually fast. To do this, we can choose places where the candle size is more than 20% above its long term average.

Click the top row, then click the plus symbol in the toolbar to add a new row. Set the new row to Greater Than. Copy the first moving average stub to the second input of the Greater Than operator. To do this, click that row, then drag it whilst holding down the CTRL key. The structure should now look like the image above.

Card image cap

Set the second moving average to 75 bars

Now open the settings of the second moving average and set the length to 75 bars, as shown above.

Card image cap

Candle length greater than average

The logic will now give us any bar where the recent average candle length (over 12 bars) is greater than the average length over 75 bars. For the next step, click the lower Moving Average stub, then click the plus symbol to add a new row above it. Set that row to Multiply.

Card image cap

Candle length at least 20% greater than average

Set the second input to Multiply to a constant, and set its value to 1.2. Preview the result so far.

Card image cap

Preview momentum detector

We’re only interested in the first bar where the higher momentum event triggers. To pick out this bar, add a Dirac Delta function in the top row. Then add a Threshold operator above that. This will filter just the first bar, where it changes from zero to positive.

Card image cap

Filter first bar (step) with Dirac Delta

As we’re only looking for bullish momentum, we need to add another condition to check that the candles are rising. To do this, add an And operator, then set the second input to Greater Than and set the input to that to the Gradient. Set the length of the gradient to 3 bars. This will ensure that the indicator has a fast reaction with minimal lag.

Card image cap

Add a gradient to detect bullish rising

Now our logic will detect the initial bar where the candle size is unusually long, And the candles over the last 3 bars are rising. Finally, add a Buy signal in the top row. To preview the result, click the spyglass icon in the top row. The result should look something like the chart below, depending on symbol and timeframe.

Card image cap

The above chart confirms that the indicator does indeed pick out rising momentum candles, as required.

Finally, to save this indicator, click the disk on the toolbar and choose a name.

Use this Indicator

Risk Disclosure: Information given on this website is for general purposes only and should not be construed as investment advice. Certain instruments shown here are complex and may come with a high risk of losing money rapidly due to leverage. You should consider whether you understand how these instruments work and whether you can afford to take the high risk of losing your money. Market data displayed is indicative and is not a solicitation to buy or sell.