OPEN-SOURCE SCRIPT
Telah dikemas kini Median TR SuperTrend | RakoQuant

Median TR SuperTrend | RakoQuant
A Robust Trend-Following Regime Indicator for Daily Crypto Markets
The Median TR SuperTrend is a modern trend-following indicator designed to help students and traders clearly identify the dominant market regime on higher timeframes (especially 1D crypto).
This tool is inspired by the classic SuperTrend framework, but enhanced with a more robust volatility engine, making it better suited for the extreme wick behavior and noise typical in cryptocurrency markets.
What This Indicator Does:
The Median TR SuperTrend answers one simple question:
Are we currently in a bullish trend regime or a bearish trend regime?
It is not meant for rapid scalping or frequent signals.
Instead, it is built to provide:
Clear directional context
Trend continuation bias
Regime-based positioning
Noise reduction on higher timeframes
This makes it ideal for students learning disciplined trend-following.
Core Concept: Trend Following, Not Prediction
This indicator does not attempt to predict tops or bottoms.
It follows trends by reacting only when price establishes a true breakout beyond a volatility-adjusted band.
That means:
Strong trends are captured early
Choppy markets are filtered
Signals are based on regime shifts, not candle-to-candle noise
What Makes It “Robust”?
Traditional SuperTrend systems use ATR (Average True Range) to define volatility.
Crypto markets, however, often produce outlier candles (wicks, liquidations, spikes) that distort ATR.
This version replaces ATR with:
Median True Range (MTR)
Median TR is more resistant to extreme one-off candles, providing:
Smoother volatility estimates
More stable trend bands
Less sensitivity to random spikes
This creates a more reliable trend structure in high-volatility environments.
How It Works (Simple Breakdown)
1. Median Baseline
The indicator begins by calculating a rolling median of price, forming a stable central trend reference.
2. Robust Volatility Bands
A volatility envelope is created using Median True Range:
Upper band = baseline + multiplier × MTR
Lower band = baseline − multiplier × MTR
3. SuperTrend Regime Logic
Only one band is active at a time:
Bull regime → trailing lower band
Bear regime → trailing upper band
Trend flips occur only when price breaks beyond the active band.
Visual Interpretation
Neon Aqua Band
Bullish regime
Trend-following long environment
Neon Magenta Band
Bearish regime
Defensive or short environment
Filled Trend Zone
Shows the active trend space clearly without clutter.
This indicator is designed for learning:
Market structure
Regime trading
Patience and higher timeframe discipline
Recommended workflow:
Use Median TR SuperTrend on 1D
Trade only in the direction of the active regime
Combine with a trigger tool if needed (RSI, momentum, breakout)
Ideal Markets
BTC, ETH, SOL
Daily swing trend environments
Portfolio regime filtering (RSPS / LTPI-style frameworks)
Disclaimer
This indicator is a regime and trend-following tool, not a complete trading system.
It should be used as part of a broader strategy with:
Risk management
Position sizing
Confirmation logic
A Robust Trend-Following Regime Indicator for Daily Crypto Markets
The Median TR SuperTrend is a modern trend-following indicator designed to help students and traders clearly identify the dominant market regime on higher timeframes (especially 1D crypto).
This tool is inspired by the classic SuperTrend framework, but enhanced with a more robust volatility engine, making it better suited for the extreme wick behavior and noise typical in cryptocurrency markets.
What This Indicator Does:
The Median TR SuperTrend answers one simple question:
Are we currently in a bullish trend regime or a bearish trend regime?
It is not meant for rapid scalping or frequent signals.
Instead, it is built to provide:
Clear directional context
Trend continuation bias
Regime-based positioning
Noise reduction on higher timeframes
This makes it ideal for students learning disciplined trend-following.
Core Concept: Trend Following, Not Prediction
This indicator does not attempt to predict tops or bottoms.
It follows trends by reacting only when price establishes a true breakout beyond a volatility-adjusted band.
That means:
Strong trends are captured early
Choppy markets are filtered
Signals are based on regime shifts, not candle-to-candle noise
What Makes It “Robust”?
Traditional SuperTrend systems use ATR (Average True Range) to define volatility.
Crypto markets, however, often produce outlier candles (wicks, liquidations, spikes) that distort ATR.
This version replaces ATR with:
Median True Range (MTR)
Median TR is more resistant to extreme one-off candles, providing:
Smoother volatility estimates
More stable trend bands
Less sensitivity to random spikes
This creates a more reliable trend structure in high-volatility environments.
How It Works (Simple Breakdown)
1. Median Baseline
The indicator begins by calculating a rolling median of price, forming a stable central trend reference.
2. Robust Volatility Bands
A volatility envelope is created using Median True Range:
Upper band = baseline + multiplier × MTR
Lower band = baseline − multiplier × MTR
3. SuperTrend Regime Logic
Only one band is active at a time:
Bull regime → trailing lower band
Bear regime → trailing upper band
Trend flips occur only when price breaks beyond the active band.
Visual Interpretation
Neon Aqua Band
Bullish regime
Trend-following long environment
Neon Magenta Band
Bearish regime
Defensive or short environment
Filled Trend Zone
Shows the active trend space clearly without clutter.
This indicator is designed for learning:
Market structure
Regime trading
Patience and higher timeframe discipline
Recommended workflow:
Use Median TR SuperTrend on 1D
Trade only in the direction of the active regime
Combine with a trigger tool if needed (RSI, momentum, breakout)
Ideal Markets
BTC, ETH, SOL
Daily swing trend environments
Portfolio regime filtering (RSPS / LTPI-style frameworks)
Disclaimer
This indicator is a regime and trend-following tool, not a complete trading system.
It should be used as part of a broader strategy with:
Risk management
Position sizing
Confirmation logic
Nota Keluaran
### BTC 1D Example
Aqua = Bull Regime
Magenta = Bear Regime
Designed as a Daily trend-following regime filter for crypto markets.
Nota Keluaran
Update: Intraday Mode AddedAdded optional Intraday preset (30m–4H)
Includes smoothing filter to reduce chop
Daily/Swing behavior remains unchanged
Users can switch modes in the settings panel
Nota Keluaran
V3Skrip sumber terbuka
Dalam semangat TradingView sebenar, pencipta skrip ini telah menjadikannya sumber terbuka, jadi pedagang boleh menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupuan anda boleh menggunakan secara percuma, ingat bahawa penerbitan semula kod ini tertakluk kepada Peraturan Dalaman.
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.
Skrip sumber terbuka
Dalam semangat TradingView sebenar, pencipta skrip ini telah menjadikannya sumber terbuka, jadi pedagang boleh menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupuan anda boleh menggunakan secara percuma, ingat bahawa penerbitan semula kod ini tertakluk kepada Peraturan Dalaman.
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.