Swing High
What it measures: The highest high of the prior N bars (excludes the current bar — already shifted)
When to use it: Upside structure/liquidity levels: breakout (close > swing_high), or liquidity grab (a wick pierces through, then closes back)
Typical period: 10-20
Caution: Already shift(1) internally — no need to connect an extra Lag
Formula the engine actually uses
high.rolling(period).max().shift(1)
smoothing: None — shift(1) prevents lookahead (excludes the current bar) · warmup: period + 1