OPEN-SOURCE SCRIPT

3TF Supertrend Resonance— 4H/1H/15m+ 3TP/SL

501
MTF Supertrend — 4H / 1H / 15m Confluence + Dynamic TP/SL + Adaptive Trend/Range Filters

This script is a multi-timeframe Supertrend confluence system designed for traders who operate on lower timeframes (15m / 1m) but want higher-timeframe structure, trend confirmation, and dynamic TP/SL projections.

It combines 4H + 1H + 15m Supertrend, trend alignment detection, range filtering, and auto-projected risk-based targets, providing a complete directional framework for both scalping and intraday swing entries.

👉1. Multi-Timeframe Supertrend Framework (4H / 1H / 15m)

The script calculates Supertrend levels and direction on three major timeframes:
-4H Supertrend
-1H Supertrend
-15m Supertrend

Users can choose between:
-Confirmed HTF values (no repaint)
-Live HTF values (more sensitive but may repaint)

Each Supertrend level is plotted on the current chart as a horizontal line, extended far to the left and slightly to the right, with optional lightweight labels showing direction and price.

These levels function as HTF dynamic support/resistance during intraday trading.


👉2. Confluence Detection (4H = 1H = 15m)

A trend confluence occurs when:
-4H direction = 1H direction = 15m direction

When the three timeframes align:
A full-height vertical line marks the first candle of confluence (color-coded bullish/bearish).

An alert is triggered:
“Triple-TF Trend Confluence — First Candle”

This identifies the earliest moment when the market shifts into unified directional behavior.

👉3. Trend Background Coloring (15m + 1m)

When confluence is active:
-Bullish confluence → Green background
-Bearish confluence → Red background

Background visualization is applied on:
-15m timeframe (main directional chart)
-1m timeframe (scalping entries with HTF alignment)

This ensures lower-timeframe decisions always stay aligned with higher-timeframe direction.

👉4. Weak-Trend / Range Detection (Only on 15m)

Even if all three timeframes are aligned, momentum may be weak.
Range/weak-trend detection activates when:
-Confluence = true
-AND (ADX < threshold OR Choppiness > threshold)

On 15m charts:
A grey overlay appears, covering green/red confluence colors.
First candle entering range shows a vertical grey mark (optional).

Alert:
“Confluence but Weak Momentum — First Candle”

This identifies moments where the market is aligned but lacking trend strength — a “trend that doesn’t move.”

👉5. Dynamic TP/SL Projection (1.5R / 3R / 4.5R)

Using the current timeframe’s Supertrend as a structural stop-loss:

SL = current Supertrend line
Risk = | Close - SL |

The script auto-calculates:
TP1 = 1.5 × risk
TP2 = 3.0 × risk
TP3 = 4.5 × risk

All projected upward for bullish trends and downward for bearish trends.

Displayed visually:
Dotted short-range lines for SL, TP1, TP2, TP3
Lightweight left-side labels showing:
SL price + distance
Individual TP prices
This provides an immediate R-multiple framework for trade planning.

👉6. 15m Supertrend Flip Indicator (Minimalistic)

When the 15m Supertrend changes direction:
A tiny circle marker is plotted:
-Bullish flip → below the bar, green
-Bearish flip → above the bar, red

Alerts:
“15m ST Flip Up (Bear → Bull)”
“15m ST Flip Down (Bull → Bear)”
This highlights early shifts in short-term structure before confluence or major trend changes occur.

👉7. Alerts Included

The script provides alerts for:
-Triple-TF Trend Confluence — First Candle
-Weak Trend / Range Start
-15m Supertrend Flip Up
-15m Supertrend Flip Down
These are practical for automated notifications when key structural conditions appear.

Summary
This script provides:

✅ Higher-Timeframe Context

4H, 1H, and 15m Supertrend levels + direction.

✅ Directional Certainty

Triple-timeframe confluence with visual + alert confirmation.

✅ Smart Background Guidance

Color-coded trend zones for 15m & 1m.

✅ Range / Weak Trend Filtering

Avoid false trends using ADX + Choppiness.

✅ Actionable TP/SL Framework

Auto-projected 1.5R / 3R / 4.5R + SL lines based on Supertrend structure.

✅ Precise Intraday Signals

15m Supertrend flips marked with minimalistic dots.

Declinazione di responsabilità

Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.