Flat Finder
The indicator finds the range (sideways market) on its own from candle structure and breakout points, outlines it as a box with upper and lower borders (resistance · support), and fires a signal on a confirmed breakout — with a tick threshold to filter out false exits.
The range is detected automatically from candle structure and breakout points — you don't mark the consolidation by hand, the box appears on its own.
The upper and lower borders of the range are drawn automatically — trade bounces off the borders or wait for price to leave the zone.
A breakout only counts when price moves past the border by more than the tick threshold — a "Breakdown" marker, not every poke past the level.
A close past the border by more than the tick threshold — "Breakdown Attempt": the threshold itself filters out false exits (a touch of the border doesn't count). Held beyond the threshold on the next bar — a confirmed "Breakdown" and an arrow. Confirmation is a second bar beyond the threshold, not a bigger threshold.
With "Allow narrowing" on, new points inside the range pull the borders inward (up0 < Up / down0 > Down) — the consolidation is outlined more precisely, and orders at the borders are placed more accurately.
The indicator breaks price action down into trend patterns and marks fractals — ▲ local highs and ▼ lows. These are the anchors the zone is built from.
2 points up + 2 down are collected and the range narrows (up0 ≥ up1, down0 ≤ down1) → a box is drawn: upper border = up0, lower = down0. While price is inside — a "Flat" marker.
A close moved past the border by more than the tick threshold → "Breakdown Attempt". The threshold itself filters out false exits: a touch of the border doesn't count as an attempt — only a move past the threshold.
Price held beyond the threshold for one more bar → "Breakdown" and an arrow: the range is closed, a trend has started. Confirmation is a second bar beyond the threshold, not a bigger threshold.
2 fractals ▲ up + 2 ▼ down; when the range between them narrows (up0 ≥ up1, down0 ≤ down1) — a box is drawn: upper border = up0, lower = down0. While price is inside — a "Flat" marker.
After a downtrend the fractals are collected and a box with borders is drawn. LONG entry off the lower border (support), stop beyond the upper — you trade bounces inside the zone, and the borders are outlined for you.
A trader sees a sideways market but doesn't want to mark levels by hand and gets confused: where's the real border of the zone, and where's a genuine breakout versus a false poke past the level.
- Puts the indicator on the chart — the range is outlined with a box on its own, with an upper and a lower border
- Trades bounces inside the zone: entry off the border, stop — beyond the opposite border of the range
- Sets the breakout threshold in ticks to filter out false exits past the level
- On the "Breakdown" marker with an arrow, enters the trend in the direction of the breakout
Breakout confirmation threshold in ticks, resetting points after a breakout, allowing the zone to narrow, and the file name for the signal to an external robot — tune it to your instrument and style.