Triangle forming event
Marks when a symmetric triangle shape has held for hold_n bars in a row; rare at default settings.
The pattern builds four lines from closing prices: the lowest and highest close over the last 100 bars, and the percent change of each over the last 20 bars. It counts a symmetric triangle when the low line has risen more than 0.05 percent and the high line has fallen more than 0.05 percent over those 20 bars. The marker lands on the bar where that shape has held for hold_n bars in a row, once per run, so it confirms the coil has lasted rather than calling a breakout.
How to read it
- Each marker sits on one candle, and a long coil gets one marker rather than a row of them.
- The marker comes hold_n bars into the shape, not at its start, so it always arrives late in the coil.
- No lines are drawn. Judge the narrowing range by eye; the marker does not say which way price will leave it.
What it outputs
- Symmetric triangle
- Marks the bar where the symmetric triangle shape has held for hold_n bars in a row, once per run.
When it fires
Fires on the bar where the symmetric triangle shape has held for hold_n bars in a row, once per run. It means the range has been narrowing for that long: the low rising and the high falling over the last 20 bars. It is not a breakout, and it does not say which way price will leave the range.
Settings
- hold_n
- Bars in a row the triangle shape must hold before the marker appears. Raising it demands a longer coil, so fewer markers, each later in the shape. Lowering it to 1 marks the first bar of every run, so more markers, each earlier.
Pitfalls
- In the one-month SPY sample (Sep 2026, 20,160 one-minute bars) it marked one bar at defaults, so most charts will show nothing.
- The lines are rolling 100-bar extremes of closes, not swing-point trendlines, and the 0.05 percent slope threshold is fixed here, not adjustable.
- The marker lags the shape by hold_n bars, and a shape that breaks before then never marks.