PROTECTED SOURCE SCRIPT
Syed Shams - PSX Dashboard v2.0

A compact dashboard that summarizes trend/strength context for Pakistan stocks and indices. It normalizes signals from widely-used tools into a single table so you can triage symbols quickly—no alerts, no buy/sell calls.
What’s inside (columns):
------------------------------
- Scrip / Price / Δ%: Symbol, last price, and percent change vs the previous bar close on the active timeframe (e.g., on 1D it’s vs prior daily close).
- LMH / LML / LWH / LWL: Last Month/Week High & Low. Optional setting to use closed prior M/W bars.
- EMAs 5/9/21/44/100/200: Six mini-squares. Green = price ≥ that EMA, Red = below.
- RS5 / RS21 (vs KSE100): Arrows show out/under-performance over two user-set return windows.
- RSI: Text = RSI value with slope arrow; Blue fill when RSI > its EMA (bullish bias), Red fill when below.
- OBV: Blue/Red fill for OBV vs its EMA; slope arrow uses the global Slope Lookback.
- MACD (M A C D): 4 tiny histogram bars colored by quadrant/acceleration for quick trend read.
- ADX / DMI: ADX value (color-coded: >50 red, 25–50 green, 20–25 orange, <20 red) + slope arrow. +DI / −DI arrows with neutral/green/red fill when +DI dominates/equals/−DI dominates.
- ST 5,1 / ST 8,2: Green/Red dots for SuperTrend state.
- Ichimoku: Cell fill for price vs cloud (above/inside/below). “Laser” dash appears on fresh HH/LL checks.
- BB Zone: Uses BB(20,1/2/3).
• price ≥ U2 → “BB3” (Dark Blue text, Light Blue fill)
• U1 < price < U2 → “BB2” (Dark Blue / Light Blue)
• L1 ≤ price ≤ U1 → “BB1” (Dark Green / Light Green)
• L2 < price < L1 → “BB2” (Dark Red / Light Red)
• price ≤ L2 → “BB3” (Dark Red / Light Red)
Also shows BB3 upper-band slope using the global lookback: “+” widening, “−” contracting, “=” flat.
- Grade (A/B/C/D): Optional composite score; rows sort by score when enabled.
Grade scoring:
------------------
Price ≥ each EMA +1 (max +6) · RS5>idx +2, RS21>idx +1 · OBV>EMA +2, OBV-EMA↑ +1 · RSI>50 +2, RSI>EMA +1, RSI slope↑ +2 / ↓ −2 · MACD hist: ≥0&rising +2, ≥0&falling +1, <0&falling −2, <0&rising −1 · +DI>−DI +1, +DI slope↑ +1 · ADX: >50 −2, 25–50 +2, 20–25 +1, ADX slope↑ +1 · ST(5,1) +1, ST(8,2) +1 · Ichimoku: above cloud +1, below −1, HH “laser” +2 / LL −2 · BB zone: inside BB1 +1; above BB1 +2; BB3 widening +2; shrinking −2; flat 0.
Controls & workflow:
-------------------------
- Universe selector (incl. sector lists and Custom Watchlist).
- Show KSE index rows (off by default).
- Slope Lookback (arrows): one control for RSI/ADX/DMI/OBV/BB3 slope checks.
- Closed bars for LM/LW H/L (off by default).
- Dark Mode (off by default): optimized table contrast for black charts.
- Show Grades toggle.
How to use:
---------------
1) Pick your universe and timeframe.
2) Adjust Slope Lookback (default 1) if you want a stricter/looser slope test.
3) Sort by Grade (on) to find leaders/laggards, then open charts for entries/exits using your own process.
Notes:
--------
- Timeframe-aware: all calculations—including Δ% and RS windows—use the active chart TF.
- Educational research tool. Not investment advice. No alerts.
What’s inside (columns):
------------------------------
- Scrip / Price / Δ%: Symbol, last price, and percent change vs the previous bar close on the active timeframe (e.g., on 1D it’s vs prior daily close).
- LMH / LML / LWH / LWL: Last Month/Week High & Low. Optional setting to use closed prior M/W bars.
- EMAs 5/9/21/44/100/200: Six mini-squares. Green = price ≥ that EMA, Red = below.
- RS5 / RS21 (vs KSE100): Arrows show out/under-performance over two user-set return windows.
- RSI: Text = RSI value with slope arrow; Blue fill when RSI > its EMA (bullish bias), Red fill when below.
- OBV: Blue/Red fill for OBV vs its EMA; slope arrow uses the global Slope Lookback.
- MACD (M A C D): 4 tiny histogram bars colored by quadrant/acceleration for quick trend read.
- ADX / DMI: ADX value (color-coded: >50 red, 25–50 green, 20–25 orange, <20 red) + slope arrow. +DI / −DI arrows with neutral/green/red fill when +DI dominates/equals/−DI dominates.
- ST 5,1 / ST 8,2: Green/Red dots for SuperTrend state.
- Ichimoku: Cell fill for price vs cloud (above/inside/below). “Laser” dash appears on fresh HH/LL checks.
- BB Zone: Uses BB(20,1/2/3).
• price ≥ U2 → “BB3” (Dark Blue text, Light Blue fill)
• U1 < price < U2 → “BB2” (Dark Blue / Light Blue)
• L1 ≤ price ≤ U1 → “BB1” (Dark Green / Light Green)
• L2 < price < L1 → “BB2” (Dark Red / Light Red)
• price ≤ L2 → “BB3” (Dark Red / Light Red)
Also shows BB3 upper-band slope using the global lookback: “+” widening, “−” contracting, “=” flat.
- Grade (A/B/C/D): Optional composite score; rows sort by score when enabled.
Grade scoring:
------------------
Price ≥ each EMA +1 (max +6) · RS5>idx +2, RS21>idx +1 · OBV>EMA +2, OBV-EMA↑ +1 · RSI>50 +2, RSI>EMA +1, RSI slope↑ +2 / ↓ −2 · MACD hist: ≥0&rising +2, ≥0&falling +1, <0&falling −2, <0&rising −1 · +DI>−DI +1, +DI slope↑ +1 · ADX: >50 −2, 25–50 +2, 20–25 +1, ADX slope↑ +1 · ST(5,1) +1, ST(8,2) +1 · Ichimoku: above cloud +1, below −1, HH “laser” +2 / LL −2 · BB zone: inside BB1 +1; above BB1 +2; BB3 widening +2; shrinking −2; flat 0.
Controls & workflow:
-------------------------
- Universe selector (incl. sector lists and Custom Watchlist).
- Show KSE index rows (off by default).
- Slope Lookback (arrows): one control for RSI/ADX/DMI/OBV/BB3 slope checks.
- Closed bars for LM/LW H/L (off by default).
- Dark Mode (off by default): optimized table contrast for black charts.
- Show Grades toggle.
How to use:
---------------
1) Pick your universe and timeframe.
2) Adjust Slope Lookback (default 1) if you want a stricter/looser slope test.
3) Sort by Grade (on) to find leaders/laggards, then open charts for entries/exits using your own process.
Notes:
--------
- Timeframe-aware: all calculations—including Δ% and RS windows—use the active chart TF.
- Educational research tool. Not investment advice. No alerts.
Script protetto
Questo script è pubblicato come codice protetto. Tuttavia, è possibile utilizzarlo liberamente e senza alcuna limitazione – per saperne di più clicca qui.
Declinazione di responsabilità
Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.
Script protetto
Questo script è pubblicato come codice protetto. Tuttavia, è possibile utilizzarlo liberamente e senza alcuna limitazione – per saperne di più clicca qui.
Declinazione di responsabilità
Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.