OPEN-SOURCE SCRIPT
Adaptive Trend Intelligence + SMC + RVOL + ML - FloAlgo

This indicator combines an Adaptive SuperTrend with Smart Money Concepts (SMC) market structure, Relative Volume (RVOL) filtering, and an online Machine Learning model to produce high-confidence trend-following signals.
How It Works
Adaptive SuperTrend — A SuperTrend band whose ATR multiplier scales automatically based on the short/long volatility ratio. In quiet markets the band tightens; in expansions it widens. An optional noise filter requires price to hold on the new side for N bars before a flip is accepted, eliminating whipsaws.
SMC Market Structure Engine — Uses a Stochastic Momentum Oscillator to detect overbought/oversold pivots and build an alternating High/Low swing chain. From those swings it tracks Dow-Theory labels (HH, HL, LH, LL), draws a zigzag, plots S/R zones, and detects BOS (Break of Structure) when price closes beyond the previous major swing confirming trend continuation, and CHoCH (Change of Character) when price closes beyond the prior opposing major swing signaling a trend flip. Both events require an established trend direction and fire only against the correct structural level, preventing false signals on internal corrections.
RVOL Filter — Computes directional buy/sell volume from candle structure and ranks it against a rolling percentile. Signals are suppressed unless the directional volume percentile clears a configurable threshold, keeping entries to high-participation moves only.
Online ML Model — A logistic regression model with L2 regularisation trained incrementally on every confirmed SuperTrend flip. It learns 17 features per signal including candle shape, volume, momentum, ATR slope, RSI, Bollinger position, RVOL, and SMC bias, then resolves each trade when the next flip occurs. Probability is displayed in the info table and can gate signals via a minimum confidence threshold.
Visual Elements
Key Settings
How It Works
Adaptive SuperTrend — A SuperTrend band whose ATR multiplier scales automatically based on the short/long volatility ratio. In quiet markets the band tightens; in expansions it widens. An optional noise filter requires price to hold on the new side for N bars before a flip is accepted, eliminating whipsaws.
SMC Market Structure Engine — Uses a Stochastic Momentum Oscillator to detect overbought/oversold pivots and build an alternating High/Low swing chain. From those swings it tracks Dow-Theory labels (HH, HL, LH, LL), draws a zigzag, plots S/R zones, and detects BOS (Break of Structure) when price closes beyond the previous major swing confirming trend continuation, and CHoCH (Change of Character) when price closes beyond the prior opposing major swing signaling a trend flip. Both events require an established trend direction and fire only against the correct structural level, preventing false signals on internal corrections.
RVOL Filter — Computes directional buy/sell volume from candle structure and ranks it against a rolling percentile. Signals are suppressed unless the directional volume percentile clears a configurable threshold, keeping entries to high-participation moves only.
Online ML Model — A logistic regression model with L2 regularisation trained incrementally on every confirmed SuperTrend flip. It learns 17 features per signal including candle shape, volume, momentum, ATR slope, RSI, Bollinger position, RVOL, and SMC bias, then resolves each trade when the next flip occurs. Probability is displayed in the info table and can gate signals via a minimum confidence threshold.
Visual Elements
- SuperTrend line with bull/bear fill
- ▲ / ▼ signal arrows and labels
- BOS / CHoCH labels at structure breaks
- HH / HL / LH / LL Dow labels at each pivot
- Zigzag lines connecting momentum pivots
- S/R zone boxes, colour-coded and fading on break
- Info table showing Signal, Trend, ML Confidence, RVOL, Momentum, Volatility, Quality, MS Bias, and last Structure event
Key Settings
- ATR Length — lookback for ATR calculation
- ATR Multiplier — base band width
- Adaptive Multiplier — auto-scales multiplier with volatility ratio
- Noise Filter (bars) — bars price must hold before flip is confirmed
- RVOL Lookback — rolling window for volume percentile ranking
- RVOL Min Percentile % — minimum directional volume percentile to allow a signal
- Min ML Probability % — minimum ML model confidence to allow a signal
- Stochastic Length — sensitivity of the momentum pivot oscillator
- Overbought / Oversold — stochastic zone thresholds for pivot detection
- Filter Signals by MS — gate signals to align with SMC trend direction
- Max S/R Zones per Side — maximum supply/demand boxes kept on chart
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。