A trendline joins two swings and carries on at the same slope. A retest box marks the gap a strong break leaves behind. All three blocks read candles on the timeframe you name, find swings exactly as the swing blocks do, with the candles each side you choose, and every number is yours to set.
The line
An up line runs under price through the two most recent swing lows. A down line runs over price through the two most recent swing highs. Until it breaks, a line moves to the newest swings as they appear.
Touches. You set how many touches a line needs, counting its two swings. Above two, the line also needs that many more candles between its two swings whose wick comes within your touch tolerance, in ticks, of the line.
Trendline break
This block fires at the close of a candle that closes beyond the line: below an up line is a short, above a down line is a long. The line is then used up and the next one is drawn from the newest swings. A line drawn again through the same two swings does not fire again.
Trendline retest
This block waits for the break, then fires at the close of a candle whose wick comes back to the line within your touch tolerance: after an up line breaks, a high back at the line is a short; after a down line breaks, a low back at it is a long. The line is then used up.
A broken line is dropped without firing when:
- a candle closes back on the side it broke from;
- more candles than you set pass after the break with no retest;
- a candle closes more ticks beyond the line than you set, with no retest;
- a second swing forms beyond the line, further beyond than the first, with no retest between them.
The retest box
A new swing high makes older, lower unused swing highs unusable and drops their boxes. Swing lows mirror this. You set how many swings each side, and boxes in all, are remembered.
The break. A candle that closes above an unused swing high breaks it. A swing older than the number of candles you set can no longer be broken.
The box. The breaking candle must be the third candle of an upward fair value gap, at least the optional minimum size. The box's top is the breaking candle's low. Its bottom is the first candle's high, or the top of the broken swing candle's body, as you choose. Breaks below a swing low mirror all of this.
Firing. From the next candle on, the block fires when a candle's wick reaches the box's near edge without closing beyond its far edge: a long from a break up, a short from a break down. Each box fires once. A box is dropped without firing when:
- it is older than the number of candles you set;
- a candle closes beyond the latest swing on the other side at the time the broken swing was found;
- price runs more ticks beyond the box than you set without coming back;
- a candle closes beyond its far edge.
Where the stop goes
- The line (trendline blocks): the line's price at the close of the candle that fired.
- The far edge and the middle (retest box).
- The candle that fired: its low for a long, its high for a short.
- A swing window: the lowest low or highest high of a number of candles you state.
You can add a buffer of ticks beyond any of them.
What can go wrong
People draw trendlines and boxes in different ways. These blocks draw them only as described here, so read the rule before comparing with a chart marked by hand. Ages count clock time on your timeframe (a swing's age, a box's life and a broken line's wait for its retest), so a weekend counts.