Confirmed swing high
A local high becomes confirmed only after the chosen number of later bars have lower highs. A five-left, five-right pivot is known five bars after the peak, not on the peak bar.
Swing trading guide
Short answer
A swing high is a local peak with lower highs on both sides, and a swing low is a local trough with higher lows on both sides. Traders use the sequence of confirmed points to describe structure: higher highs and higher lows suggest an uptrend, while lower highs and lower lows suggest a downtrend. The right-side bars mean a pivot is confirmed only after a delay, so it must not be treated as information that was known on the pivot bar.
A local high becomes confirmed only after the chosen number of later bars have lower highs. A five-left, five-right pivot is known five bars after the peak, not on the peak bar.
A local low becomes confirmed only after the chosen number of later bars have higher lows. Wider pivot settings identify fewer, larger turns and add more confirmation delay.
A sequence of higher confirmed swing highs and higher confirmed swing lows describes rising structure. It does not prove that the next swing will also be higher.
A sequence of lower confirmed swing lows and lower confirmed swing highs describes falling structure. A break above the latest lower high can be tested as a change condition, not as a guaranteed reversal.
Alternating pivots that fail to extend in either direction can describe a range. Breakout rules should define whether a wick or a completed close is required beyond the boundary.
Choose the same number of bars on the left and right, such as five and five, before reviewing results.
A fixed definition prevents discretionary relabeling and makes the confirmation delay explicit.
Record each confirmed high and low, its price, its original bar, and the later bar on which confirmation became available.
Keeping both timestamps prevents a backtest from acting on a pivot before the strategy could know it existed.
Compare the latest two confirmed highs and latest two confirmed lows to label higher, lower, or equal structure.
The labels turn a visual chart reading into conditions that can be audited across many trades.
Require a completed bar to close beyond a confirmed swing level, or define a pullback that holds the most recent swing low or high.
An exact close rule distinguishes a tested breakout from an intrabar wick or subjective line touch.
State which confirmed swing invalidates the setup, then size the hypothetical position from that distance before recording an entry.
Structure identifies a logical failure point, but the distance may still be too large for the account risk limit.
| Risk | What to check |
|---|---|
| Lookahead bias | Confirm that orders occur only after the right-side bars have closed. A back-plotted pivot marker must not create an order on the earlier pivot bar. |
| Repainting or moving labels | Compare historical and realtime behavior, use confirmed bars, and document whether any marker can disappear or relocate. |
| False structure breaks | Test wick-through and close-through definitions separately. Record gaps that open beyond the planned entry or stop level. |
| Parameter sensitivity | Compare nearby pivot widths such as three, five, and seven bars. A rule that works only at one exact width may be overfit. |
| Timeframe mismatch | Label each pivot timeframe explicitly and do not compare a daily swing level with an unlabeled intraday point. |
These templates define a research process. They are not trade calls or evidence that a setup will make money.
Rule to test
Identify five-left, five-right confirmed pivots. Enter a hypothetical long only after a daily close above the latest confirmed swing high while the latest confirmed swing low is higher than the prior swing low.
Execute no earlier than the confirmation bar. Compare pivot widths of three, five, and seven, include gaps and costs, and report drawdown plus trade count alongside returns.
Rule to test
After two lower confirmed swing highs, mark a structure-change candidate when a completed 4-hour bar closes above the latest swing high. Invalidate below the latest confirmed swing low.
Compare close confirmation with wick-through entry as separate tests. Split results into trending and range-bound samples and keep the session definition fixed.
Rule to test
Require rising daily confirmed swing lows. On the 4-hour chart, trigger only after a completed bar closes above its latest confirmed five-bar swing high.
Store daily and 4-hour pivots separately. Use an out-of-sample period and review earnings gaps, slippage, maximum adverse excursion, and parameter sensitivity.
Use one pivot definition for the entire SPY test. Changing from three bars to five bars after seeing the chart makes the result hard to trust.
Wait for the right-side confirmation bars before labeling an AAPL swing point. Plotting the label back on the pivot candle is useful visually, but a strategy could not act there with confirmed information.
For QQQ breakout tests, require a close beyond the confirmed swing level. Record a brief wick through the level separately to measure false breaks.
Keep daily structure and 4-hour execution in separate variables. Mixing pivots from two timeframes without labels makes entries and invalidation rules ambiguous.
Pineify can convert a pivot definition, structure sequence, entry trigger, and invalidation rule into Pine Script. You can then test how pivot width and confirmation delay change trade frequency and drawdown without pretending that a plotted swing point was known early.
Build and Test Swing Structure RulesSources checked 2026-07-18
Pineify is an information tool, not investment advice. Swing points and market structure labels are descriptive research tools, not predictions or promises of returns. AI cannot reliably predict future prices. Pivot confirmation is delayed, overnight gaps can bypass planned levels, and trading can result in substantial losses. Simulated and backtested results have limitations and do not guarantee future performance. Verify the implementation and consider advice from a qualified financial professional.