INVITE-ONLY SCRIPT
Telah dikemas kini

SHDW AlphaDesk|Pro

381
Short summary
Institutional multi-timeframe trend map that shows a clean Bull / Bear regime for 5m → 1M at a glance, using price structure, trend filters and momentum.

---

Concept

SHDW AlphaDesk|Pro is a desk-style trend regime dashboard.
The goal is simple: when you open a chart, you instantly know if the asset is trading in a bullish or bearish environment on each major timeframe.

The script does not try to be a signal generator or an automated strategy.
Instead, it focuses on three pillars:

* Price behaviour: swing structure and directional context.
* Trend filters: dynamic moving averages and a trend-strength filter.
* Momentum: classic RSI and optional RSI price levels on the chart.

All of this is condensed into a compact table that shows, for every timeframe from 5m to 1M:

* `Trend` → Bull or Bear regime
* `RSI` → 14-period RSI value

The output is always binary (Bull or Bear) to keep the message clear and help avoid hesitation or “neutral” noise.

---

Profiles
syot kilat
The engine is pre-calibrated with three institutional profiles:

* Scalping/Intraday (Crypto): more reactive, tuned for intraday flow, faster regime changes.
* Swing/Conservative (Crypto): smoother behaviour, designed for position and swing trading.
* Institutional (Stocks): slower and more conservative, anchored to higher-timeframe trend for equity and index flows.

All key parameters behind the scenes are handled automatically by the selected profile, so you can switch behaviour without tweaking numbers manually.

---

What the script shows

On every bar:

* A multi-timeframe dashboard on the right side with TF / Trend / RSI.
syot kilat
* Optional EMA/SMA overlays on the price chart for visual alignment with the regime.
syot kilat
* Optional RSI Levels mapped into price, giving approximate areas where RSI would reach common overbought/oversold zones.
syot kilat

There is no trade entry, exit or risk sizing logic.
The script is a trend-reading and context tool, not a full trading system.

---

How to use (institutional view)

A practical way to use SHDW AlphaDesk|Pro is:

1. Start from the top-down.

* Check 1M → 1W → 1D to establish the dominant regime (Bull or Bear).
* Only then look at intraday timeframes (12h, 4h, 1h, 15m, 5m).

2. Trade in the direction of the regime.

* Prefer long setups when the higher-timeframe column is Bull.
* Prefer short setups when the higher-timeframe column is Bear.

3. Use pivots and RSI.

syot kilat
* The snapshot explains how a pivot on a lower timeframe can confirm or anticipate structure on the next higher timeframe (for example, a bullish pivot on 5m confirming a higher low on 15m, etc.).
* Oversold (RSI ≤ 30) on a lower TF often warns that a higher low may be forming one step above.
* Overbought (RSI ≥ 70) on a lower TF often warns that a lower high may be forming one step above.

4. Watch for trend breaks.

* When a significant low is lost (or a strong bearish pivot appears) on a timeframe, zoom out to the next one and re-evaluate the regime there.
* On very high timeframes, a clean break of a major structural low is treated as a bear-market context.

5. Combine with your own execution.

* Use the dashboard to align direction and timing, then apply your own entry models, risk management and trade management rules.

---

Important notes

* This tool is intended for educational and informational purposes only and should be combined with independent analysis and risk management.
Nota Keluaran
1. What’s new

A. Regime change alerts

You can now create alerts when the dashboard flips trend on the chart’s timeframe:

* “Bull Regime Started” – fires when the state changes from Bear to Bull.
* “Bear Regime Started” – fires when the state changes from Bull to Bear.

These alerts use the same internal regime state that drives the dashboard cell (Bull/Bear), so there is no separate signal logic.

---

B. Structural swing alerts (context only)

Optional alerts that notify when the regime is intact but structure is evolving:

* “Higher Low Confirmed (Bull Regime)” – HH→HL sequence confirmed while regime is Bull.
* “Lower High Confirmed (Bear Regime)” – LL→LH sequence confirmed while regime is Bear.
* “Bull Regime – Pullback (Searching HL)” – Bull regime remains active while price trades in a corrective leg after a swing high.
* “Bear Regime – Pullback (Searching LH)” – Bear regime remains active while price trades in a corrective leg after a swing low.

These are informational context alerts, not trade entries. They are meant to help you monitor where the market is inside the current regime (impulse vs. pullback, HL/LH formation, etc.).

---

2. How to use the alerts (institutional view)

A typical workflow is:

1. Choose the timeframe that matters for your execution (e.g., 4h or 1D) and open the script on that chart.
2. Set a regime alert on that timeframe:
syot kilat
* Use “Bull Regime Started” if you trade only in the direction of up-trends.
* Use “Bear Regime Started” if you focus on short-side opportunities.
3. Add optional structure alerts if you want to be notified when:

* A higher low confirms inside an existing Bull regime (potential continuation long context).
* A lower high confirms inside an existing Bear regime (potential continuation short context).
* The market is in a pullback phase but the higher-timeframe regime has not flipped yet.

Execution, risk, and trade management remain entirely up to the user. The script is a trend-reading and context tool, not an automated strategy.

---

3. Clarification on methodology / originality

Although the panel displays classic tools (RSI value and optional EMA/SMA overlays), the core logic of SHDW AlphaDesk|Pro is not a basic EMA/RSI indicator.

The internal engine is:

* A price-structure-based trend regime dashboard,
* built around multi-timeframe HH/HL vs. LH/LL swing structure,
* filtered by dynamic EMAs and an ADX-style trend-strength filter,
* with behaviour calibrated by three institutional profiles (Scalping / Swing / Institutional).

RSI and EMAs are exposed only as *context* on the chart and in the table; the Bull/Bear regime itself is driven by proprietary structure and regime-persistence logic.

The script remains a public invite-only indicator with protected source, designed for educational and informational use and to be combined with the user’s own analysis and risk management.
Nota Keluaran
Changed

* Added explicit type annotations across inputs, parameters, and internal variables for stricter Pine v6 compliance and improved readability.
* Refactored the MA helper to compute EMA/SMA values explicitly before selecting the requested type (no logic change).
* Renamed/expanded DMI tuple outputs for clarity (`dmiPlus`, `dmiMinus`, `adxStrength`) while keeping ADX-strength filtering unchanged.
* Reorganized MTF dashboard variables/functions with typed signatures and clearer naming (no functional change).

Fixed

* Moved high-timeframe `regime` state to a broader scope inside `f_trend_regime()` to avoid any scope-related edge cases and ensure consistent persistence.
* Removed an unused `ema200_self` calculation in the alert engine (cleanup only).

Notes

* No intended changes to regime logic, thresholds, dashboard output, plots, or alert conditions; this update is primarily a maintenance/compatibility pass.
Nota Keluaran
What's New

This is a major engine rewrite. The regime detection system has been rebuilt from the ground up to follow institutional desk methodology — Dow Theory structural confirmation, multi-timeframe pivot mapping, and RSI awareness. The visual dashboard remains unchanged.

---

Core Engine — Structural State Machine (Rewritten)

The regime engine now uses a **correct Dow Theory state machine** to detect trend reversals:

| Reversal | Step 1 | Step 2 (Confirms) |
|---|---|---|
| **Bear (Descending Top)** | Lower High (LH) detected | Lower Low (LL) confirms reversal |
| **Bull (Ascending Bottom)** | Higher Low (HL) detected | Higher High (HH) confirms reversal |

**Previous behavior:** Required 3 steps with incorrect sequencing (LL first, then LH). This caused delayed and sometimes incorrect regime detection on higher timeframes.

**New behavior:** 2-step confirmation. LH is the *first* sign of weakness; LL *confirms*. HL is the *first* sign of strength; HH *confirms*. Faster and more accurate detection aligned with how institutional desks read market structure.

---

HTF Structural Override

Higher timeframe regimes now respond to the **structural state machine directly**, not just trend loss breaks.

- If pivot-confirmed structure (LH→LL or HL→HH) disagrees with the current regime → the regime flips **before** a trend loss break occurs.
- Trend loss detection (break of last significant level) remains active as a secondary confirmation.
- **Result:** Earlier detection of reversals on Weekly and Monthly timeframes.

---

Profile Differentiation (Recalibrated)

The three profiles now have **genuinely different behavior**, not just different thresholds:

Scalping / Intraday (Crypto)
- Uses **fast structure** (latest swing direction) — most responsive.
- Does not wait for full LH→LL or HL→HH confirmation.
- Trend loss detection active on all timeframes.
- Direction fallback: `structure (fast) → EMA → price vs EMA Fast`.
- ADX threshold: 18 · minATR: 0.25 · equalPct: 0.20%

Swing / Conservative (Crypto)
- Uses **slow structure only** — waits for confirmed LH→LL or HL→HH.
- No fast structure override on lower timeframes.
- Trend loss detection active on **HTF only** (no LTF noise).
- LTF direction requires **EMA + Structure confluence** (both must agree).
- Regime changes require ADX trending or strong structural flip.
- ADX threshold: 22 · minATR: 0.40 · equalPct: 0.10%

Institutional (Stocks)
- **Slow structure is primary** on all timeframes.
- On LTF: falls back to fast structure only when no confirmed trend exists.
- Trend loss detection active on all timeframes.
- Structure is **always** the primary direction signal; EMA is secondary.
- HTF fallback uses EMA 200 (not EMA 26) for maximum stability.
- ADX threshold: 25 · minATR: 0.60 · equalPct: 0.05%

---

RSI — Informational Only (No Regime Override)

**Previous behavior:** RSI oversold/overbought could flip a timeframe's regime through the MTF confirmation layer (e.g., Weekly Bear + RSI ≤ 30 + Monthly Bull → Weekly flipped to Bull). This caused false Bull readings during strong downtrends.

**New behavior:** RSI **never** overrides structural regime. It reinforces staging counters within the state machine (RSI oversold at HL reinforces ascending bottom staging, RSI overbought at LH reinforces descending top staging), but full structural confirmation (HH or LL) is always required.

The RSI column in the dashboard provides the operator with context to evaluate confluence manually — as an institutional desk would.

---

📊 Pivot Length Calibration

| Timeframe | Previous | New | Rationale |
|---|---|---|---|
| 5m | 3 | 3 | Unchanged |
| 15m | 4 | 4 | Unchanged |
| 1H–12H | 5 | 5 | Unchanged |
| Daily | 5 | 5 | Unchanged |
| **Weekly** | 5 | **3** | Detects W reversals in ~7 weeks vs ~11 weeks |
| **Monthly** | 5 | **2** | Detects M reversals in ~5 months vs ~11 months |

---

Alert Engine

All 10 alert conditions remain available and now use the corrected structural engine:

1. **Bull Regime Started** — Ascending bottom confirmed (HL→HH)
2. **Bear Regime Started** — Descending top confirmed (LH→LL)
3. **Higher Low Confirmed** — Ascending bottom structure detected
4. **Lower High Confirmed** — Descending top structure detected
5. **Bull Pullback (Searching HL)** — Price crosses below EMA in bull regime
6. **Bear Pullback (Searching LH)** — Price crosses above EMA in bear regime
7. **RSI Oversold – Ascending Bottom Potential** — RSI ≤ 30 with bull context
8. **RSI Overbought – Descending Top Potential** — RSI ≥ 70 with bear context
9. **Trend Loss (Bull → Break Down)** — Price broke last significant low
10. **Trend Loss (Bear → Break Up)** — Price broke last significant high

---

Technical Changes

- `f_trend_regime()` — Complete state machine rewrite (LH→LL / HL→HH)
- `f_mtfConfirm()` — Simplified to structural pass-through (RSI overrides removed)
- `f_pivotLen()` — Weekly 5→3, Monthly 5→2
- Profile `structDir` logic — Fully differentiated per profile
- Profile `dirCandidate` logic — Scalping (fast→EMA), Swing (confluence), Institutional (structure→EMA200)
- HTF `regime` — Now responds to `structDirSlow` state machine, not just trend loss breaks
- `scale` variable renamed to `sc` (Pine v6 reserved word fix)

---

No Visual Changes

The dashboard layout, colors, table structure, EMA/SMA overlays, and RSI Levels remain identical. This update is **logic-only**.

Penafian

Maklumat dan penerbitan adalah tidak bertujuan, dan tidak membentuk, nasihat atau cadangan kewangan, pelaburan, dagangan atau jenis lain yang diberikan atau disahkan oleh TradingView. Baca lebih dalam Terma Penggunaan.