OPEN-SOURCE SCRIPT
Trend/Range Composite (Single-Line) v1.4

🔹 Step 1: Add it to your chart
Copy the whole script.
In TradingView → Pine Editor → paste it.
Click Add to chart.
It will show a white line in a subwindow, plus thresholds at 40 and 60, and a colored background.
Optional: You’ll see a status box (top-right of chart) with details like ADX, ATR, slope, etc.
🔹 Step 2: Understand the Score
The indicator compresses all signals into a 0–100 “Trend Strength Score”:
≥ 60 = TREND (teal background)
→ Market is trending, consider trend strategies like vertical spreads, runners, breakouts.
≤ 40 = RANGE (orange background)
→ Market is choppy/sideways, consider range strategies like butterflies, condors, mean-reversion fades.
40–60 = MIXED (gray background)
→ Indecision / chop. Best to reduce size or wait for clarity.
🔹 Step 3: Use with Your Trading Plan
Intraday (5m, 15m, 30m)
Score < 40 → play support/resistance bounces, fade extremes.
Score > 60 → play momentum breakouts or pullback continuations.
Daily chart
Good for swing context (is this month trending or just chopping?).
🔹 Step 4: Alerts
You can set TradingView alerts:
Cross above 60 → market entering trend mode.
Cross below 40 → market entering range mode.
Useful if you don’t want to watch constantly.
🔹 Step 5: Confirm with Price Levels
The score tells you “trend vs range”, but you still need levels:
If score < 40 → mark PDH / PDL (previous day high/low), VAH/VAL, VWAP. Expect rejections/fades.
If score > 60 → watch for breakouts beyond PDH/PDL or supply/demand zones.
Copy the whole script.
In TradingView → Pine Editor → paste it.
Click Add to chart.
It will show a white line in a subwindow, plus thresholds at 40 and 60, and a colored background.
Optional: You’ll see a status box (top-right of chart) with details like ADX, ATR, slope, etc.
🔹 Step 2: Understand the Score
The indicator compresses all signals into a 0–100 “Trend Strength Score”:
≥ 60 = TREND (teal background)
→ Market is trending, consider trend strategies like vertical spreads, runners, breakouts.
≤ 40 = RANGE (orange background)
→ Market is choppy/sideways, consider range strategies like butterflies, condors, mean-reversion fades.
40–60 = MIXED (gray background)
→ Indecision / chop. Best to reduce size or wait for clarity.
🔹 Step 3: Use with Your Trading Plan
Intraday (5m, 15m, 30m)
Score < 40 → play support/resistance bounces, fade extremes.
Score > 60 → play momentum breakouts or pullback continuations.
Daily chart
Good for swing context (is this month trending or just chopping?).
🔹 Step 4: Alerts
You can set TradingView alerts:
Cross above 60 → market entering trend mode.
Cross below 40 → market entering range mode.
Useful if you don’t want to watch constantly.
🔹 Step 5: Confirm with Price Levels
The score tells you “trend vs range”, but you still need levels:
If score < 40 → mark PDH / PDL (previous day high/low), VAH/VAL, VWAP. Expect rejections/fades.
If score > 60 → watch for breakouts beyond PDH/PDL or supply/demand zones.
Script de código aberto
No verdadeiro espirito do TradingView, o autor desse script o publicou como código aberto, para que os traders possam entendê-lo e verificá-lo. Parabéns ao autor Você pode usá-lo gratuitamente, mas a reutilização desse código em publicações e regida pelas Regras da Casa.
Aviso legal
As informações e publicações não devem ser e não constituem conselhos ou recomendações financeiras, de investimento, de negociação ou de qualquer outro tipo, fornecidas ou endossadas pela TradingView. Leia mais em Termos de uso.
Script de código aberto
No verdadeiro espirito do TradingView, o autor desse script o publicou como código aberto, para que os traders possam entendê-lo e verificá-lo. Parabéns ao autor Você pode usá-lo gratuitamente, mas a reutilização desse código em publicações e regida pelas Regras da Casa.
Aviso legal
As informações e publicações não devem ser e não constituem conselhos ou recomendações financeiras, de investimento, de negociação ou de qualquer outro tipo, fornecidas ou endossadas pela TradingView. Leia mais em Termos de uso.