Structure Midline [@Mishu]

433
Structure Midline follows the market structure leg by leg and draws the midpoint between the last leg high and the last leg low.

How it works
- An up-leg starts when price closes above the high of the previous bar(s); a down-leg starts with a close below the low. The lookback is adjustable (1 = behavior of my original Entry Helper).
- During an up-leg the indicator tracks the highest high (top), during a down-leg the lowest low (bottom).
- Midline = (top + bottom) / 2. Price above the midline = upper half, below = lower half (optionally shaded).
- Optional: a minimum breakout distance in ATR units ignores marginal breaks.
- Structure flips (first up-leg after a down-leg and vice versa) are marked after bar close.

Alerts
Structure flip up / down, close above / below midline - once per bar close.

Limitations
Top and bottom are updated while a leg is running. The midline therefore moves with new extremes - that is by design and not repainting of past values. With a lookback of 1 the structure flips often in sideways markets; higher lookback values or the ATR filter reduce this.

This is a rewritten successor of my earlier "Entry Helper" script (Pine Script v6).

This script is an analysis tool. It does not provide financial advice or trade recommendations.

면책사항

해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.