OPEN-SOURCE SCRIPT

Pivot Pro - CPR PDH/PDL EMA by Sani

1 979
═══════════════════════════════════════════════
PIVOT POINTS PRO — CPR + PDH/PDL + EMA
Full Historical | No Repaint | All Customizable
═══════════════════════════════════════════════

A professional all-in-one indicator combining the
Standard Pivot Point system with CPR (Central Pivot Range),
Previous Day High/Low, and dual EMAs — all non-repainting,
fully customizable per level, and drawn across complete
chart history.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔷 PIVOT POINTS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
- Supports all 6 types: Traditional, Fibonacci,
Woodie, Classic, DM, Camarilla
- Timeframe anchoring: Auto, Daily, Weekly, Monthly,
Quarterly, Yearly, and multi-year periods
- Every level (P, R1–R5, S1–S5) has its own
independent Color, Line Style, and Line Width
- Lines extend to the right edge of the chart
- Historical pivot count controlled by "Number of Pivots Back"

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔶 CPR — CENTRAL PIVOT RANGE
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
- Calculated from previous day OHLC (non-repainting)
- Draws CPR Pivot, BC (Bottom Central), TC (Top Central)
- Visible across ALL historical sessions — not just today
- Each line has its own Color, Style (Solid/Dashed/Dotted),
and Width
- Current session extends to right edge automatically

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔹 PDH / PDL — PREVIOUS DAY HIGH & LOW
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
- Previous day High and Low plotted per session
- Full chart history — every completed day visible
- Independent Show/Hide, Color, Style, and Width
for PDH and PDL separately
- Current session extends to right edge automatically

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📈 EMA — FAST & SLOW WITH TREND COLORING
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
- Dual EMA (default 10 / 20) with dynamic color:
→ Green when Fast > Slow (bullish)
→ Red when Fast < Slow (bearish)
→ Yellow when flat
- Optional EMA Band background highlight (purple)
when price is between the two EMAs
- EMA Touch + 2-Candle confirmation alerts included

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚙️ SETTINGS OVERVIEW
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
- Pivot Type & Timeframe
- Labels: Show/Hide, position (Left or Right), prices
- Per-level: P, R1–R5, S1–S5 — Color, Style, Width
- CPR: Master toggle + individual Pivot / BC / TC controls
- PDH/PDL: Master toggle + individual PDH / PDL controls
- EMA: Lengths, Width, Band background

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛡️ NO REPAINT
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
All values fetched using:
request.security(..., lookahead=barmerge.lookahead_on)
with [1] shift on daily OHLC — values are locked to
the previous completed day and never change on the
current bar.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📌 BEST USED ON
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Intraday timeframes: 1m, 3m, 5m, 15m, 30m, 1H
Works on any market: Stocks, Forex, Crypto, Futures

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔔 BUILT-IN ALERTS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
- EMA Bullish Cross
- EMA Bearish Cross
- Price Touched PDH
- Price Touched PDL
- Price Near CPR Pivot

Pernyataan Penyangkalan

Informasi dan publikasi ini tidak dimaksudkan, dan bukan merupakan, saran atau rekomendasi keuangan, investasi, trading, atau jenis lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Ketentuan Penggunaan.