In the block list they're Double top or double bottom and Shelf break. Both read candles on the timeframe you name and work the same in Backtest, the Bot and on your strategy's chart, which marks every break, and so does the script you copy to another platform. When you describe a strategy, say "a double top or bottom" or "a shelf break" and it asks you each number below.
The shelf
A shelf is a price candles keep reaching that holds: a floor (support, read from lows) or a ceiling (resistance, read from highs). On a double top or bottom it is the neckline. You set:
- Touches: how many candles must reach the shelf.
- Tolerance: how many ticks from the shelf a candle may reach and still count as a touch.
- Which price: the price touched most often, or the lowest low (for a ceiling, the highest high). The double top or bottom block also offers the last low before the second swing (for a double bottom, the last high).
Double top or double bottom
Swings are found exactly as the swing blocks find them, with the number of candles each side you choose. When a new swing high is confirmed, the block looks for an earlier swing high to pair it with. A pair counts when:
- the number of candles from the first swing to the second is between the fewest and the most you set;
- the second swing is no more than a number of ticks above the first and no more than a number of ticks below it (you set both);
- the lows from the first swing to the second form a shelf with at least your number of touches.
You choose whether the newest swing is compared with only the previous one or every earlier one, and which pair wins when several fit: the most recent, the most touches, or the most candles apart.
A double bottom is the mirror: two swing lows with a ceiling of highs between them.
Once found, the pair is watched. A candle that closes below a double top's shelf is a short. A candle that closes above a double bottom's ceiling is a long. You can ask for a close a number of ticks beyond it. The pair is dropped when a candle closes beyond its higher swing (for a double bottom, the lower), or after the number of candles you set. Each pair fires once. A pair whose shelf price already closed through when it was confirmed isn't watched.
You can also tell the block not to fire while a pair of the other kind is still being watched.
Shelf break
This block reads your number of candles before the newest one. Their lows make a floor and their highs a ceiling. A floor has held when it has at least your number of touches and no candle in that window closed below it. The newest candle closing below a held floor is a short. Closing above a held ceiling is a long. A candle that closes through both fires nothing.
Where the stop goes
- The shelf: the price the close went through.
- The other side: on the double top or bottom block, the more extreme of the two swings. On the shelf break block, the window's highest high above a floor, or its lowest low below a ceiling.
- The middle: halfway between the shelf and the other side.
- The candle that broke the shelf: its high for a short, its low for a long.
- Recent candles: the lowest low for a long, or the highest high for a short, over the last number of candles you set.
- A set distance: ticks from the entry, which you type.
You can add a buffer of ticks. A stop on the wrong side of the entry places no trade.
The parts
The Shelf part holds the shelf settings, beside either block. The Double top / double bottom part holds the pair settings, beside the double top or bottom block.