How to detect Bearish Capitulations
This tutorial will show how to create an indicator to detect a type of bearish capitulation. When a market peaks in a big bullish rally, you’ll often see a final exaggerated move to the upside. This is when the market gaps higher as inflows of “dumb money” reach a maximum, often on thin volume. These appear as bullish candlesticks, each gaping higher than the last.
Open the indicator builder from the Indicators tab in the top menu.
Now start by selecting a MinN operator from the drop down menu. Select the top row, then click the plus symbol in the tool bar to add a new row above. Set this to Greater than.
Change the second input of Greater than to an Array shift, then set the input of that to MaxN using the open and close price. This piece of logic finds candlesticks that gap upwards. That is, where the bottom of a candlestick is above the top of the previous candlestick.
We can test this with the preview button. Just click the spy glass icon on the top row to preview the output on a chart.
We need some additional logic to check that the size of the gaping candle is significantly bigger than the average size. Click the top row and add a row above that by clicking the plus icon on the tool bar.
Set this to new row to the And operator. Change the second input, the bottom row to Subtract.
We can save the work so far by clicking the disk icon in the tool bar.
Next click the Subtract row and add a new row above that. Change that row to Greater than.
Now click on the subtract row again. This time, select copy from the toolbar. Then click the second row beneath the Moving average operator, and choose paste from the toolbar.
The result should be as shown below.
These two bits of logic will test for an upwards gaping candle, and for that candle being larger than normal. The parameters can be tweaked in the moving average to set the type of averaging and how many bars the average is calculated over. For the purpose of this example, we’ll just leave those at the default settings.
The subtract in the moving average should ideally use an Absolute (Abs) operator because there will be both white and black candles in the series. To do this, click the Subtract row and insert a new row above that one by clicking the plus icon in the tool bar. Then set the new operator to Abs.
Finally, select the top row again and click the plus symbol in the tool bar to add a new row above. Set that to a Sell operator. This triggers a sell signal whenever the conditions in our logic are true. Then, click the preview in the top row to preview the result.