PROTECTED SOURCE SCRIPT
Charaf's PSP

Precision Swing Pair (PSP) is a correlation-based swing indicator that identifies divergence moments between two or three related assets (a “triad”). A PSP signal occurs when one asset’s candle closes bullish while another closes bearish — revealing potential swing turning points or short-term inefficiencies between correlated instruments such as indices, commodities, or FX pairs.
What It Does
Detects candle direction mismatches between correlated assets.
Marks PSP signals directly on the chart of your main asset.
Optional filters for volume, ATR, or momentum confirmation.
Helps traders catch early reversals, strength shifts, or pair-trading setups.
Works seamlessly across timeframes and correlated markets.
How It Works
You select a primary symbol (main chart) and secondary (or two others for triad setups).
PSP compares each candle’s close-to-open relationship:
If one asset closes bullish and another closes bearish, a PSP signal triggers.
Repeated divergence clusters often mark exhaustion zones or swing reversals.
Optional volatility or momentum filters help remove noise and refine signals.
Typical Use Cases
Triad trading: e.g., NAS100 / S&P500 / Dow — when one diverges, the weaker or stronger one tends to “catch up.”
Commodity pairs: e.g., Crude Oil / Gasoline / Heating Oil for refining spreads.
FX correlation setups: e.g., EURUSD vs GBPUSD.
Gold pairs: XAUUSD vs XAUEUR or XAUGBP.
How to Use PSP
Add the indicator to your main asset chart.
In the settings, enter the tickers of correlated assets you want to compare.
Adjust detection type (strict opposite closes or soft mismatch tolerance).
Optional: enable filters for ATR, RSI, or momentum.
Look for PSP signals at key structure zones — they often precede reversals or short-term dislocations.
Alerts
PSP Bullish Divergence: Primary bearish, secondary bullish.
PSP Bearish Divergence: Primary bullish, secondary bearish.
Custom alert messages are supported with placeholders for symbol and timeframe.
Recommended Markets
Indices triads (NAS100, SPX, DJ30)
Commodities triads (USOIL, RB1!, HO1!)
Metals triads (XAUUSD, XAUEUR, XAUGBP)
FX pairs (EURUSD, GBPUSD, USDCHF)
Inputs
Secondary symbol
(Optional) Third symbol for triad setups
Detection mode: strict / soft
Use ATR filter (on/off)
Use momentum filter (on/off)
Show markers (color, size, opacity)
Alert mode (on signal / on candle close)
How to Interpret
A PSP signal indicates misalignment — one asset leads, the other lags.
Often, the lagging asset will “catch up” in direction soon after.
Combine PSP signals with support/resistance or structure to identify swing reversals and momentum shifts.
Notes
PSP is not a buy/sell signal on its own — it’s a context tool for reading correlation behavior.
Best used with assets that historically move together (correlation > 0.7).
Test different timeframe alignments for your specific triad.
Example Workflow
Use PSP to identify divergence between NAS100 and SPX.
Confirm with price structure or RSI divergence.
Trade the “catch-up” move on the lagging asset once alignment resumes.
Changelog
v1.0 — Core divergence logic, 2-asset mode
v1.1 — Triad comparison support
v1.2 — Added volatility & momentum filters
v1.3 — Alert system & visual improvements
Tags:
correlation, divergence, indices, pair trading, spread, volatility, price action, structure, PSP, trading tools
What It Does
Detects candle direction mismatches between correlated assets.
Marks PSP signals directly on the chart of your main asset.
Optional filters for volume, ATR, or momentum confirmation.
Helps traders catch early reversals, strength shifts, or pair-trading setups.
Works seamlessly across timeframes and correlated markets.
How It Works
You select a primary symbol (main chart) and secondary (or two others for triad setups).
PSP compares each candle’s close-to-open relationship:
If one asset closes bullish and another closes bearish, a PSP signal triggers.
Repeated divergence clusters often mark exhaustion zones or swing reversals.
Optional volatility or momentum filters help remove noise and refine signals.
Typical Use Cases
Triad trading: e.g., NAS100 / S&P500 / Dow — when one diverges, the weaker or stronger one tends to “catch up.”
Commodity pairs: e.g., Crude Oil / Gasoline / Heating Oil for refining spreads.
FX correlation setups: e.g., EURUSD vs GBPUSD.
Gold pairs: XAUUSD vs XAUEUR or XAUGBP.
How to Use PSP
Add the indicator to your main asset chart.
In the settings, enter the tickers of correlated assets you want to compare.
Adjust detection type (strict opposite closes or soft mismatch tolerance).
Optional: enable filters for ATR, RSI, or momentum.
Look for PSP signals at key structure zones — they often precede reversals or short-term dislocations.
Alerts
PSP Bullish Divergence: Primary bearish, secondary bullish.
PSP Bearish Divergence: Primary bullish, secondary bearish.
Custom alert messages are supported with placeholders for symbol and timeframe.
Recommended Markets
Indices triads (NAS100, SPX, DJ30)
Commodities triads (USOIL, RB1!, HO1!)
Metals triads (XAUUSD, XAUEUR, XAUGBP)
FX pairs (EURUSD, GBPUSD, USDCHF)
Inputs
Secondary symbol
(Optional) Third symbol for triad setups
Detection mode: strict / soft
Use ATR filter (on/off)
Use momentum filter (on/off)
Show markers (color, size, opacity)
Alert mode (on signal / on candle close)
How to Interpret
A PSP signal indicates misalignment — one asset leads, the other lags.
Often, the lagging asset will “catch up” in direction soon after.
Combine PSP signals with support/resistance or structure to identify swing reversals and momentum shifts.
Notes
PSP is not a buy/sell signal on its own — it’s a context tool for reading correlation behavior.
Best used with assets that historically move together (correlation > 0.7).
Test different timeframe alignments for your specific triad.
Example Workflow
Use PSP to identify divergence between NAS100 and SPX.
Confirm with price structure or RSI divergence.
Trade the “catch-up” move on the lagging asset once alignment resumes.
Changelog
v1.0 — Core divergence logic, 2-asset mode
v1.1 — Triad comparison support
v1.2 — Added volatility & momentum filters
v1.3 — Alert system & visual improvements
Tags:
correlation, divergence, indices, pair trading, spread, volatility, price action, structure, PSP, trading tools
สคริปต์ที่ได้รับการป้องกัน
สคริปต์นี้ถูกเผยแพร่เป็นแบบ closed-source อย่างไรก็ตาม คุณสามารถใช้ได้อย่างอิสระและไม่มีข้อจำกัดใดๆ – เรียนรู้เพิ่มเติมได้ที่นี่
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมที่ ข้อกำหนดการใช้งาน
สคริปต์ที่ได้รับการป้องกัน
สคริปต์นี้ถูกเผยแพร่เป็นแบบ closed-source อย่างไรก็ตาม คุณสามารถใช้ได้อย่างอิสระและไม่มีข้อจำกัดใดๆ – เรียนรู้เพิ่มเติมได้ที่นี่
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมที่ ข้อกำหนดการใช้งาน