OPEN-SOURCE SCRIPT

BullTrader - ParabolicSARFlipSignals(NonRepainting)TP/SL

49
🧠 Purpose & Concept
This indicator refines Wilder’s Parabolic SAR into a simple, non‑repainting alert and visualization system that marks each confirmed trend flip with a clear buy or sell signal.
It also auto‑generates dynamic, ATR‑based Take‑Profit (TP) and Stop‑Loss (SL) levels, keeps them updating with price in real time, and displays the current market bias in an on‑chart table.

The goal: clarity and automation without complexity — see exactly when a new bullish or bearish phase begins, what your current TP/SL targets are, and receive a single clean alert for every new flip.

⚙️ How It Works
1. The built‑in ta.sar() function tracks the Parabolic SAR dots.
2. When a candle closes across the SAR line, a trend‑change is confirmed:
 • Price crossing above a SAR dot → Buy Flip (green triangle).
 • Price crossing below a SAR dot → Sell Flip (red triangle).
3. On each flip, the indicator calculates dynamic ATR‑based TP / SL targets:
 TP = entry ± (ATR × tpMult) and SL = entry ∓ (ATR × slMult)
 These values move automatically as the trend develops.
4. A small floating label beside the latest bar shows live‑updated TP / SL numbers.
5. A color‑coded table in the upper‑right corner displays the current trend: Lime = Bullish, Red = Bearish, Yellow = Neutral.
6. Each new flip triggers an easy‑to‑use Buy / Sell alert after the bar closes—no repainting.

🔔 Alerts
 Alert Name   Triggers When   Message 
 SAR Buy Flip Alert   Green triangle (bullish reversal)   “BUY Flip — Parabolic SAR on {{ticker}} ({{interval}})” 
 SAR Sell Flip Alert   Red triangle (bearish reversal)   “SELL Flip — Parabolic SAR on {{ticker}} ({{interval}})” 
📈 Chart Elements
 Element   Meaning 
 🟠 Orange cross   Standard Parabolic SAR trail. 
 🟢 / 🔴 Triangles   Confirmed buy / sell flips (non‑repainting). 
 Bright lime/red TP‑SL box   Live ATR targets that move with price. 
 Trend table (top‑right)   Instant status of bullish/bearish bias. 
✅ Features & Highlights
Non‑repainting — all signals confirm on closed bars.
Visual clarity — single pair of bright triangles for flips.
Dynamic ATR‑based TP / SL values that auto‑trail with trend.
Always‑visible trend summary table.
Two ready‑made alert types (Buy / Sell).
Lightweight and optimized for any timeframe or symbol.
💡 Best Use
Ideal for traders who prefer clean trend‑based entries and volatility‑adaptive exits without signal clutter:
Pair it with your existing strategy or use it standalone for reversal‑based swing and intraday trading.






Thông báo miễn trừ trách nhiệm

Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.