PROTECTED SOURCE SCRIPT
Nasdaq Sentiment Dashboard

Builds a composite sentiment state — RISK-ON / NEUTRAL / RISK-OFF — using three legs:
Volatility: CBOE VXN vs its moving average and absolute thresholds (risk-on when low & below MA; risk-off when high & above MA).
Breadth (quality of participation): QQEW/QQQ ratio vs its MA (equal-weight beating cap-weight = healthier breadth).
Advance/Decline (intraday breadth): advdec.nq vs its MA, with a magnitude filter (ignores tiny A/D days).
How it works
Pulls each series on your chosen signal timeframe (default Daily).
Creates binary signals per leg:
Vol: volOn if VXN < MA and < vxnLower; volOff if VXN > MA and > vxnUpper.
Breadth: brOn if QQEW/QQQ is above its MA by a deadband; brOff if below.
A/D: adOn if A/D > MA and above adMin; adOff if below MA and < -adMin.
Scores each leg (+1 on, −1 off, 0 neutral) → sums to −3…+3.
State rule (default): RISK-ON if score ≥ +2, RISK-OFF if ≤ −2, else NEUTRAL (i.e., need 2 of 3 to agree).
Detects flips (changes in state) and provides alert conditions that fire only on the flip bar.
What you see
Lines for VXN & MA, QQEW/QQQ & MA, A/D & MA.
Background color shows current composite state.
Triangle markers on the flip bar (up for ON, down for OFF).
A top-right table summarizing state, each leg vs its MA, and the composite score.
How to tune
Vol thresholds: vxnLower / vxnUpper.
Breadth whipsaw control: deadbandBps around the ratio’s MA.
A/D sensitivity: adMin and adMaLen.
Stricter regime: require all 3 to agree by changing the state line to score == 3 / -3.
Volatility: CBOE VXN vs its moving average and absolute thresholds (risk-on when low & below MA; risk-off when high & above MA).
Breadth (quality of participation): QQEW/QQQ ratio vs its MA (equal-weight beating cap-weight = healthier breadth).
Advance/Decline (intraday breadth): advdec.nq vs its MA, with a magnitude filter (ignores tiny A/D days).
How it works
Pulls each series on your chosen signal timeframe (default Daily).
Creates binary signals per leg:
Vol: volOn if VXN < MA and < vxnLower; volOff if VXN > MA and > vxnUpper.
Breadth: brOn if QQEW/QQQ is above its MA by a deadband; brOff if below.
A/D: adOn if A/D > MA and above adMin; adOff if below MA and < -adMin.
Scores each leg (+1 on, −1 off, 0 neutral) → sums to −3…+3.
State rule (default): RISK-ON if score ≥ +2, RISK-OFF if ≤ −2, else NEUTRAL (i.e., need 2 of 3 to agree).
Detects flips (changes in state) and provides alert conditions that fire only on the flip bar.
What you see
Lines for VXN & MA, QQEW/QQQ & MA, A/D & MA.
Background color shows current composite state.
Triangle markers on the flip bar (up for ON, down for OFF).
A top-right table summarizing state, each leg vs its MA, and the composite score.
How to tune
Vol thresholds: vxnLower / vxnUpper.
Breadth whipsaw control: deadbandBps around the ratio’s MA.
A/D sensitivity: adMin and adMaLen.
Stricter regime: require all 3 to agree by changing the state line to score == 3 / -3.
Skrip dilindungi
Skrip ini diterbitkan sebagai sumber tertutup. Akan tetapi, anda boleh menggunakannya dengan percuma dan tanpa had – ketahui lebih lanjut di sini.
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.
Skrip dilindungi
Skrip ini diterbitkan sebagai sumber tertutup. Akan tetapi, anda boleh menggunakannya dengan percuma dan tanpa had – ketahui lebih lanjut di sini.
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.