OPEN-SOURCE SCRIPT
CoffeeShopCrypto Supertrend Liquidity Engine

Most SuperTrend indicators use fixed ATR multipliers that ignore context—forcing traders to constantly tweak settings that rarely adapt well across timeframes or assets.
This Supertrend is a nodd to and a more completion of the work
done by Olivier Seban ( @olivierseban )
This version replaces guesswork with an adaptive factor based on prior session volatility, dynamically adjusting stops to match current conditions. It also introduces liquidity-aware zones, real-time strength histograms, and a visual control panel—making your stoploss smarter, more responsive, and aligned with how the market actually moves.
📏 The Multiplier Problem & Adaptive Factor Solution

Traditional SuperTrend indicators rely on fixed ATR multipliers—often arbitrary numbers like 1.5, 2, or 3. The issue? No logical basis ties these values to actual market conditions. What works on a 5-minute Nasdaq chart fails on a daily EUR/USD chart. Traders spend hours tweaking multipliers per asset, timeframe, or volatility phase—and still end up with stoplosses that are either too tight or too loose. Worse, the market doesn’t care about your setting—it behaves according to underlying volatility, not your parameter.
This version fixes that by automating the multiplier selection entirely. It uses a 4-zone model based on the current ATR relative to the previous session’s ATR, dynamically adjusting the SuperTrend factor to match current volatility. It eliminates guesswork, adapts to the asset and timeframe, and ensures you’re always using a context-aware stoploss—one that evolves with the market instead of fighting it.
ATR EXAMPLE
Let’s say prior session ATR = 2.00
Now suppose current ATR = 0.32
This places us in Zone 1 (Very Low Volatility)
It doesn’t imply "overbought" or "oversold" — it tells you the market is moving very little, which often means:
Lower risk | Smaller stops | Smaller opportunities (and losses)
🔁 Liquidity Zones vs. Arbitrary Pullbacks

The standard SuperTrend stop loss line often looks like price “barely misses it” before continuing its trend. Traders call this "stop hunting," but what’s really happening is liquidity collection—price pulls back into a zone rich in orders before continuing. The problem? The old SuperTrend doesn’t show this zone. It only draws the outer limit, leaving no visual cue for where entries or continuation moves might realistically originate.
This script introduces 2 levels in the Liquidity Zone. One for Support and one for Stophunts, which draw dynamically between the current price and the SuperTrend line. These levels reflect where the market is most likely to revisit before resuming the trend. By visualizing the area just above the Supertrend stop loss, you can anticipate pullbacks, spot ideal re-entries, and avoid premature exits. This bridges the gap between mechanical stoploss logic and real-world liquidity behavior.
⏳ Prior Session ATR vs. Live ATR

Using real-time ATR to determine movement potential is like driving by looking in your rearview mirror. It’s reactive, not predictive. Traders often base decisions on live ATR, unaware that today’s range is still unfolding—creating volatility mismatches between what’s calculated and what actually matters. Since ATR reflects range, calculating it mid-session gives an incomplete and misleading picture of true volatility.
Instead, this system uses the ATR from the previous session, anchoring your volatility assumptions in a fully-formed price structure. It tells you how far price moved in the last full market phase—be it London, New York, or Tokyo—giving you a more reliable gauge of expected range today. This is a smarter way to estimate how far price could move rather than how far it has moved.
The Smoothing function will take the ATR, Support, Resistance, Stophunt Levels, and the Moving Avearage and smooth them by the calculation you choose.
It will also plot a moving average on your chart against closing prices by the smoothing function you choose.
🧭 Scalping vs. Trending Modes
The market moves in at least 4 phases. Trending, Ranging, Consolidation, Distribution.
Every trader has a different style—some scalp low-volatility moves during off-hours, while others ride macro trends across days. The problem with classic SuperTrend? It treats every market condition the same. A fixed system can’t possibly provide proper stoploss spacing for both a fast scalp and a long-term swing. Traders are forced to rebuild their system every time the market changes character or the session shifts.
This version solves that with a simple toggle:

Scalping or Trend Mode. With one switch, it inverts the logic of the adaptive factor to either tighten or loosen your trailing stops. During low-liquidity hours or consolidation phases, Scalping Mode offers snug stoplosses. During expansion or clear directional bias.

Trend Mode lets the trade breathe. This is flexibility built directly into the logic—not something you have to recalibrate manually.
📉 Histogram Oscillator for Move Strength
In legacy indicators, there’s no built-in way to gauge when the move is losing power. Traders rely on price action or momentum indicators to guess if a trend is fading. But this adds clutter, lag, and often contradiction. The classic SuperTrend doesn’t offer insight into how strong or weak the current trend leg is—only whether price has crossed a line.
This version includes a Trending Liquidity Histogram —a histogram that shows whether the liquidity in the SuperTrend zone is expanding or compressing. When the bars weaken or cross toward zero, it signals liquidity exhaustion. This early warning gives you time to prep for reversals or anticipate pullbacks. It even adapts visually depending on your trading mode, showing color-coded signals for scalping vs. trending behavior. It's both a strength gauge and a trade timing tool—built into your stoploss logic.
Histogram in Scalping Mode

Histogram in Trending Mode

📊 Visual Table for Real-Time Clarity
A major issue with custom indicators is opacity—you don’t always know what settings or values are currently being used. Even worse, if your dynamic logic changes mid-trade, you may not notice unless you go digging into the code or logs. This can create confusion, especially for discretionary traders.
This SuperTrend solves it with a clean visual summary table right on your chart. It shows your current ATR value, adaptive multiplier, trailing stop level, and whether a new zone size is active. That means no surprises and no second-guessing—everything important is visible and updated in real-time.
This Supertrend is a nodd to and a more completion of the work
done by Olivier Seban ( @olivierseban )
This version replaces guesswork with an adaptive factor based on prior session volatility, dynamically adjusting stops to match current conditions. It also introduces liquidity-aware zones, real-time strength histograms, and a visual control panel—making your stoploss smarter, more responsive, and aligned with how the market actually moves.
📏 The Multiplier Problem & Adaptive Factor Solution
Traditional SuperTrend indicators rely on fixed ATR multipliers—often arbitrary numbers like 1.5, 2, or 3. The issue? No logical basis ties these values to actual market conditions. What works on a 5-minute Nasdaq chart fails on a daily EUR/USD chart. Traders spend hours tweaking multipliers per asset, timeframe, or volatility phase—and still end up with stoplosses that are either too tight or too loose. Worse, the market doesn’t care about your setting—it behaves according to underlying volatility, not your parameter.
This version fixes that by automating the multiplier selection entirely. It uses a 4-zone model based on the current ATR relative to the previous session’s ATR, dynamically adjusting the SuperTrend factor to match current volatility. It eliminates guesswork, adapts to the asset and timeframe, and ensures you’re always using a context-aware stoploss—one that evolves with the market instead of fighting it.
ATR EXAMPLE
Let’s say prior session ATR = 2.00
Now suppose current ATR = 0.32
This places us in Zone 1 (Very Low Volatility)
It doesn’t imply "overbought" or "oversold" — it tells you the market is moving very little, which often means:
Lower risk | Smaller stops | Smaller opportunities (and losses)
🔁 Liquidity Zones vs. Arbitrary Pullbacks
The standard SuperTrend stop loss line often looks like price “barely misses it” before continuing its trend. Traders call this "stop hunting," but what’s really happening is liquidity collection—price pulls back into a zone rich in orders before continuing. The problem? The old SuperTrend doesn’t show this zone. It only draws the outer limit, leaving no visual cue for where entries or continuation moves might realistically originate.
This script introduces 2 levels in the Liquidity Zone. One for Support and one for Stophunts, which draw dynamically between the current price and the SuperTrend line. These levels reflect where the market is most likely to revisit before resuming the trend. By visualizing the area just above the Supertrend stop loss, you can anticipate pullbacks, spot ideal re-entries, and avoid premature exits. This bridges the gap between mechanical stoploss logic and real-world liquidity behavior.
⏳ Prior Session ATR vs. Live ATR
Using real-time ATR to determine movement potential is like driving by looking in your rearview mirror. It’s reactive, not predictive. Traders often base decisions on live ATR, unaware that today’s range is still unfolding—creating volatility mismatches between what’s calculated and what actually matters. Since ATR reflects range, calculating it mid-session gives an incomplete and misleading picture of true volatility.
Instead, this system uses the ATR from the previous session, anchoring your volatility assumptions in a fully-formed price structure. It tells you how far price moved in the last full market phase—be it London, New York, or Tokyo—giving you a more reliable gauge of expected range today. This is a smarter way to estimate how far price could move rather than how far it has moved.
The Smoothing function will take the ATR, Support, Resistance, Stophunt Levels, and the Moving Avearage and smooth them by the calculation you choose.
It will also plot a moving average on your chart against closing prices by the smoothing function you choose.
🧭 Scalping vs. Trending Modes
The market moves in at least 4 phases. Trending, Ranging, Consolidation, Distribution.
Every trader has a different style—some scalp low-volatility moves during off-hours, while others ride macro trends across days. The problem with classic SuperTrend? It treats every market condition the same. A fixed system can’t possibly provide proper stoploss spacing for both a fast scalp and a long-term swing. Traders are forced to rebuild their system every time the market changes character or the session shifts.
This version solves that with a simple toggle:
Scalping or Trend Mode. With one switch, it inverts the logic of the adaptive factor to either tighten or loosen your trailing stops. During low-liquidity hours or consolidation phases, Scalping Mode offers snug stoplosses. During expansion or clear directional bias.
Trend Mode lets the trade breathe. This is flexibility built directly into the logic—not something you have to recalibrate manually.
📉 Histogram Oscillator for Move Strength
In legacy indicators, there’s no built-in way to gauge when the move is losing power. Traders rely on price action or momentum indicators to guess if a trend is fading. But this adds clutter, lag, and often contradiction. The classic SuperTrend doesn’t offer insight into how strong or weak the current trend leg is—only whether price has crossed a line.
This version includes a Trending Liquidity Histogram —a histogram that shows whether the liquidity in the SuperTrend zone is expanding or compressing. When the bars weaken or cross toward zero, it signals liquidity exhaustion. This early warning gives you time to prep for reversals or anticipate pullbacks. It even adapts visually depending on your trading mode, showing color-coded signals for scalping vs. trending behavior. It's both a strength gauge and a trade timing tool—built into your stoploss logic.
Histogram in Scalping Mode
Histogram in Trending Mode
📊 Visual Table for Real-Time Clarity
A major issue with custom indicators is opacity—you don’t always know what settings or values are currently being used. Even worse, if your dynamic logic changes mid-trade, you may not notice unless you go digging into the code or logs. This can create confusion, especially for discretionary traders.
This SuperTrend solves it with a clean visual summary table right on your chart. It shows your current ATR value, adaptive multiplier, trailing stop level, and whether a new zone size is active. That means no surprises and no second-guessing—everything important is visible and updated in real-time.
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
Website = coffeeshopcrypto.net
Discord = discord.gg/EAncX5TpfB
Discord = discord.gg/EAncX5TpfB
Declinazione di responsabilità
Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
Website = coffeeshopcrypto.net
Discord = discord.gg/EAncX5TpfB
Discord = discord.gg/EAncX5TpfB
Declinazione di responsabilità
Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.