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
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.