OPEN-SOURCE SCRIPT

Weather Score — subscores (0–10) + Total (30/40)

50
Weather Score — Readiness + Signals (purple/pink) 🌈

What it is:
A compact market “weather” gauge that scores Trend, Momentum, Volatility, and Flow from 0–10 each, then combines them into a total readiness score (/30 or /40 depending on which modules you enable). It paints a draggable badge, a mini table, optional legend, and fires GO/NO-GO + Volatility OUT/IN signals with alerts.

How the score works

Trend (EMA50/200 + slopes): adds points when price is above EMAs and their slopes are rising.

Momentum (RSI • Stoch • MACD hist): blended weighting for balanced momentum read.

Volatility (BB width percentile): quiet regimes score higher (breakouts favored); bonus when leaving quiet.

Flow (VWAP/MA anchor): where price sits within ±2×ATR of the anchor. Intraday uses VWAP; higher TFs use SMA(mvLen).

Total is normalized to 0–100% and mapped to a weather state: 🌧 Rainy → 🌫 Storm Clearing → ⛅ Clearing → ☀️ Sunny → 🌈 Blue Sky.

Robustness: Flow returns a neutral 50 until ATR/anchor are ready (so you don’t see na on fresh charts).

Signals (on chart + alertable)

BUY (GO): readiness crosses up your goPct threshold.

SELL / Exit (NO-GO): readiness crosses down your nogoPct threshold.

Go OUT (Expansion): BB-percentile crosses up the quiet threshold.

Go INSIDE (Contraction): BB-percentile crosses down the quiet threshold.
Optional: paints bars when GO/NO-GO is active, and drops tiny labels at flips.

Visuals & UI

Badge: draggable or auto-locked to last bar, with ATR-based Y-offset and X-offset (bars). Color follows score via purple/pink gradient.

Mini Table: module subscores, quick notes, and totals.

Legend (top-center): quick read of weather bands & emojis.

Alerts

Prebuilt alert conditions for: BUY (GO), SELL (NO-GO), Go OUT, Go INSIDE, plus simple GO/NO-GO rules.

Messages in alertconditions are constant (TradingView requirement); the script also emits runtime alert() pings on bar close with richer text if the indicator is running.

Thông báo miễn trừ trách nhiệm

Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.