OPEN-SOURCE SCRIPT
업데이트됨

Premium/Discount Retracement Indicator

973
The indicator works in four layers.

**The major swing** — it scans the chart for a significant impulse move using a pivot-based lookback. Once it finds a clear swing low and swing high (or high then low), it locks that range in and draws a horizontal 50% line across the middle. Everything above that line is premium, everything below is discount.

**The retracement zone** — after the major move, it watches for a smaller pullback forming within the range. When that pullback produces its own local high and local low, those two levels become the zone boundaries. The zone is drawn as a two-colour box: teal on top, red on the bottom, split at the midpoint. Only zones sitting in the discount area qualify for buys, and only zones in the premium area qualify for sells, so it automatically filters out setups that go against the structure.

**The entry** — a limit order line sits at the exact midpoint of the zone. Nothing happens until price returns to that level. If price dips into the zone but reverses before touching the midpoint and then closes back above the zone boundary, the zone is marked as rejected and the limit is cancelled automatically. This handles the scenario where price taps the upper portion of the zone but doesn't commit.

**Trade levels** — once the limit is hit, three levels are displayed. The stop loss is placed just beyond the outer zone boundary with a small buffer. The take profit is calculated at 1:2 risk-to-reward from the entry. A break-even line sits at the 1:1 level, and an alert fires when price reaches it so you know when to move your stop to entry.

There are also four alerts: zone created, order filled, zone cancelled, and move to break even.
릴리즈 노트
updated bugs
릴리즈 노트
fixed
릴리즈 노트
update
릴리즈 노트
updated

면책사항

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