ATR Swing Structure [Leonichev]

690
ATR Swing Structure marks swing highs and lows with a volatility-based zigzag, labels them as HH / HL / LH / LL, and shows where the structure breaks. It is meant as a clean, non-repainting base layer for reading trend structure by eye or for building alerts.

How it works

1. Swing detection. A swing high is the highest high since the last swing low. It is confirmed once price has moved a set number of ATRs (2.0 by default) below it. You can confirm by close (fewer false swings on spikes) or by wick (faster). Swing lows are the mirror image. Highs and lows always alternate.
2. Volatility anchor. The ATR used for the confirmation threshold is taken at the bar of the extreme, so a volatility spike after the swing cannot change whether it gets confirmed.
3. Labels. Each swing is compared with the previous swing of the same type: higher high (HH), lower high (LH), higher low (HL), lower low (LL).
4. Zones. Each swing gets a fixed-height zone (0.25 ATR by default) from the wick toward the most extreme candle body around it, which is closer to how traders actually mark a level than a single wick price.
5. Structure breaks (BOS). The first close above the last confirmed swing high, or below the last confirmed swing low, is marked with a dashed line from the swing to the breaking bar. Each swing level can be broken only once.
6. Active levels. Dotted lines show the last unbroken swing high and low up to the current bar.

How to use it

- A sequence of HH and HL with bullish breaks describes an uptrend; LH and LL with bearish breaks describe a downtrend. A break against the current sequence is an early sign of a change in structure.
- Use the zones and active levels as reference areas for stops, targets or entries from your own method.
- Increase the reversal multiplier to see higher-order structure; decrease it to see minor swings.
- Alerts: swing high confirmed, swing low confirmed, bullish break, bearish break. The last swing high and low are also shown in the Data Window.

Repainting and timing

The engine runs on closed bars only and never uses future data. Confirmed swings are never moved or removed. Because a swing can only be confirmed after price has moved away from it, its label and zone are drawn back on the bar of the extreme a few bars later. Alerts fire on the bar where the swing is confirmed or the break happens.

This is an analysis tool, not a trading system. Test the settings on your own markets and timeframes.

免责声明

这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。