SuperTrend

6 123
SuperTrend

An adaptive SuperTrend that adjusts its own band width and its own confirmation requirement to current market conditions, then grades every flip so you can see how much evidence was behind it.

WHAT MAKES IT DIFFERENT

A standard SuperTrend uses one fixed multiplier and flips the moment price closes through the band. That works in clean trends and whipsaws in chop. This version changes three things.

The band breathes with volatility. Current ATR is compared with its own 50-bar average. When volatility is elevated the multiplier widens (up to 1.4 times the base factor), and when volatility is compressed it tightens (down to 0.75 times). You set a base factor and the script scales it.
Confirmation adapts to how cleanly price is moving. The script measures Kaufman's Efficiency Ratio: net price change divided by the total distance travelled. A reading near 1 means price is moving in a straight line, and a reading near 0 means it is going nowhere. When efficiency is low, a flip must hold for more bars before it is confirmed. When efficiency is high, fewer bars are needed.
Every flip gets a quality score from 0 to 100 and a grade. The score combines efficiency (50%), how normal volatility is (30%), and 5-bar momentum relative to ATR (20%). 70 and above is grade A, 50 to 69 is grade B, below 50 is grade C.

WHAT YOU SEE

SuperTrend line with an optional glow.
Gradient shading between the line and price. The shading deepens as the trend ages and becomes more efficient.
Candles colored by the confirmed trend direction.
Flip labels showing LONG or SHORT, the grade, and the closing price.
Dashboard: direction, trend age in bars, conviction, efficiency (Trending, Mixed or Choppy), volatility regime (Elevated, Normal or Compressed), the live adaptive factor, the quality score and grade of the most recent flip, distance from the line in percent, and counts of long and short flips. The header shows the current factor (F) and confirmation bars (C).

Note that the line itself moves as soon as price closes through the band. The color, label and alert wait until the flip is confirmed.

HOW TO USE

Read direction from the color. Teal is a confirmed uptrend, red is a confirmed downtrend.
When a label appears, check the grade. A grade A flip happened in an efficient market with normal volatility and real momentum. A grade C flip happened in poor conditions and deserves more caution. The same score stays on the dashboard under "Last Flip" until the next flip.
Check Efficiency on the dashboard. "Choppy" means SuperTrend signals of any kind are less reliable, which is why the script is asking for more confirmation bars.
Watch Conviction and the shading. Both build as a trend persists and stays clean. Fading shading on an old trend is an early sign of deterioration.
Use Distance to judge how extended price is. A large gap from the line means a flip is far away and a pullback toward the line is possible.
Use the line as a reference level for trailing, alongside your own risk management.

SETTINGS

ATR Length (14): lookback for volatility.
Base Factor (3.5): starting multiplier, scaled automatically by the volatility regime.
ER Length (10): lookback for the Efficiency Ratio.
Confirm Bars (2): base confirmation, raised in chop and lowered in clean trends.
Visuals: toggle glow, shading, candle coloring, flip labels and dashboard.
Palette and dashboard position.

ALERTS

Long Signal, Short Signal, Any Flip. Signals are evaluated on the current bar and can change until the bar closes, so set alerts to "Once Per Bar Close."

NOTES

The Efficiency Ratio is the work of Perry Kaufman. This script is a tool for reading trend conditions. It does not predict price, and past behavior does not guarantee future results. It is not financial advice.

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.