Continuation Structures
6 algorithms in Geometric Chart Patterns.
In this family#
-
Ascending Triangle contract
Scans a close series for an ascending triangle - a flat ceiling sitting over a rising floor - and reports whether that shape is still forming, has broken out, or was rejected. The two boundaries are least-squares lines fitted through the confirmed swing highs and swing lows of a pivot window; the shape passes when the ceiling's relative slope is within
flat_toleranceof zero, the floor's is at leastmin_slope, and the channel narrows by at leastmin_convergence. A close beyond either boundary bybreak_bufferwithinmax_confirmation_barsof the last pivot ends the search, and only a bullish break confirms.detectAscendingTriangle(close, parameters) -
Descending Triangle contract
Scans a close series for a descending triangle - a falling ceiling pressing down on a flat floor - and reports whether that shape is still forming, has broken out, or was rejected. The two boundaries are least-squares lines fitted through the confirmed swing highs and swing lows of a pivot window; the shape passes when the floor's relative slope is within
flat_toleranceof zero, the ceiling's is at most-min_slope, and the channel narrows by at leastmin_convergence. A close beyond either boundary bybreak_bufferwithinmax_confirmation_barsof the last pivot ends the search, and only a bearish break confirms.detectDescendingTriangle(close, parameters) -
Symmetrical Triangle contract
Scans a close series for a symmetrical triangle - a falling ceiling and a rising floor closing on each other - and reports whether that shape is still forming, has broken out, or was rejected. The shape passes when the fitted ceiling's relative slope is at most
-min_slope, the floor's is at leastmin_slope, and the channel narrows by at leastmin_convergence. The prior move overimpulse_lookbackbars sets the expected side only when its size reachesmin_impulse; without that, a break through either boundary bybreak_bufferconfirms.detectSymmetricalTriangle(close, parameters) -
Flag contract
Scans a close series for a flag - a strong prior move followed by a narrow channel drifting against it - and reports whether that shape is still forming, has broken out, or was rejected. The shape passes when the move over
impulse_lookbackbars reachesmin_impulse, both fitted boundaries slope against it by more thanmin_slope, the gap between their relative slopes is withinparallel_tolerance, and the channel ends between 0.65 and 1.35 times its starting width. Only a break in the impulse's own direction, bybreak_bufferwithinmax_confirmation_barsof the last pivot, confirms.detectFlag(close, parameters) -
Pennant contract
Scans a close series for a pennant - a strong prior move followed by a small converging triangle - and reports whether that shape is still forming, has broken out, or was rejected. The shape passes when the move over
impulse_lookbackbars reachesmin_impulse, the fitted ceiling's relative slope is at most-min_slope, the floor's is at leastmin_slope, and the channel narrows by at leastmin_convergence. Only a break in the impulse's own direction, bybreak_bufferwithinmax_confirmation_barsof the last pivot, confirms.detectPennant(close, parameters) -
Rising/Falling Wedge contract
Scans a close series for a wedge - two boundaries tilted the same way while converging - and reports whether that shape is still forming, has broken out, or was rejected. A rising wedge needs both fitted slopes at or above
min_slopewith the floor rising faster than the ceiling, and expects a bearish break; a falling wedge needs both at or below-min_slopewith the ceiling falling faster than the floor, and expects a bullish break. Either way the channel must narrow by at leastmin_convergence, the matchingsubtype(risingorfalling) is reported on the event, and a break the other way is recorded as rejected.detectRisingFallingWedge(close, parameters)
What they share#
Every topic here is a row-classify, so once you have
called one the rest follow the same shape. Import paths differ only in the final segment:
import { detectAscendingTriangle } from "fintech-algorithms/geometric-chart-patterns/continuation-structures/ascending-triangle";
import { detectDescendingTriangle } from "fintech-algorithms/geometric-chart-patterns/continuation-structures/descending-triangle";Read them in the order above — the sequence is pedagogical, not alphabetical.
Where this sits#
Geometric Chart Patterns collects 64 algorithms across 7 families. For the concept behind this family rather than the call signatures, see the concept guides.