Skip to main content

ML Trend Signals (MLTS): A Self-Tuning SuperTrend Signal Guide

How Sahi's ML Trend Signals self-tunes a SuperTrend engine to fire Bull and Bear labels, and how to trade them.

Revati Krishna
Published: 3 Jul 2026, 05:30 PM IST (3 weeks ago)
Last Updated: 3 Jul 2026, 04:31 PM IST (3 weeks ago)
8 min read

Quick Answer

ML Trend Signals (MLTS) is an adaptive, self-tuning trend indicator built around a SuperTrend engine. It continuously runs a background test matrix that scores simulated trades and feeds the results to an optimizer, which adjusts the indicator's own sensitivity and band width to suit the current market. It plots only two things: a teal Bull ▲ label for a bullish entry and a red Bear ▼ label for a bearish entry. Wait for the bar to close before acting. It is free on SAHI, with no subscription required.

Overview

ML Trend Signals is an adaptive, self-tuning trend indicator built around a SuperTrend engine. Instead of running with fixed parameters, it runs a continuous background test matrix — opening and scoring simulated long and short positions every bar and feeding those results into an optimizer. The optimizer then gradually adjusts the indicator's own sensitivity and band width to suit the current market character, which is why it is described as "machine learning": it does not use a neural network, but it does update itself based on what has been working recently.

On the SAHI chart it draws exactly two things: a teal "Bull ▲" label that appears below a candle when a bullish signal fires, and a red "Bear ▼" label that appears above a candle when a bearish signal fires. There are no bands, ribbons, or lines plotted — the indicator is purely a signal marker. Its intelligence is entirely in the logic that decides when those labels appear.

How to Read the Indicator

Bull ▲ Label (teal, below the bar)

A teal "Bull ▲" label pinned below a candle is a bullish entry signal. It means the indicator's internal SuperTrend has either flipped from bearish to bullish (Reversal mode) or has confirmed a new price low within a downtrend that is now reversing (also Reversal mode), with RSI and volume filters satisfied. In plain terms: the indicator thinks a bottom has formed and upside momentum is building.

Always wait for the bar that carries the label to close before acting. A label that appears mid-candle can disappear if the bar closes unfavourably. A confirmed, closed label is the only reliable signal.

The label fires infrequently by design — Signal Spacing (default 10 bars) enforces a minimum gap between any two signals, so you will not see rapid-fire clusters. When a label does appear after a quiet period, it carries more weight than one that fires in the middle of a choppy run.

Bear ▼ Label (red, above the bar)

A red "Bear ▼" label pinned above a candle is a bearish entry signal. The logic mirrors the bull label: the SuperTrend has flipped bullish-to-bearish (Reversal mode) or has confirmed a new price high within an uptrend that is now reversing, again with filters satisfied. The indicator thinks a top has formed and downside momentum is building.

The same bar-close rule applies. Do not enter until the candle carrying the red label has fully closed. A partial candle can still reverse.

No bands or lines on the chart

Unlike most SuperTrend indicators, MLTS does not plot the upper and lower SuperTrend bands on the chart by default. The bands exist internally and drive the signal logic, but they are hidden so the chart stays clean. What you see are only the two label types described above. If you want to see the SuperTrend bands for context, you would need to add a separate SuperTrend indicator alongside MLTS.

Example Scenarios

Scenario 1 — Bull ▲ label fires at a low, buy a CE (bullish)

Nifty has been sliding for several sessions and is trading around 24,820. The 15-minute chart has been showing red candles, but RSI dipped below 30 three bars ago (satisfying the Cold Zone Memory filter). On the current bar, the internal SuperTrend flips from bearish to bullish and a new price low was registered in the lookback window — the two conditions needed for a Reversal buy signal. The bar closes as a green candle at 24,840 and a teal "Bull ▲" label locks in below it.

  • What you do: buy 1 lot of Nifty 24,900 CE at a premium of about ₹90.
  • Stop loss: if the next candle closes below 24,800 (under the recent swing low), the reversal has failed — exit. The premium would be around ₹60 there, a risk of roughly ₹30 per unit.
  • Target: the resistance band near 25,000; the CE premium would be roughly ₹155 there.
  • Why it works: the signal combines a SuperTrend flip with a confirmed RSI oversold condition — two independent filters agreeing that the downmove is exhausted.

Scenario 2 — Bear ▼ label fires at a high, buy a PE (bearish)

Nifty has been climbing and hits 25,100. RSI crossed above 70 four bars ago. The internal SuperTrend flips from bullish to bearish and a fresh price high was registered — conditions met for a Reversal sell signal. The bar closes as a red candle at 25,080 with a red "Bear ▼" label locking in above it.

  • What you do: buy 1 lot of Nifty 25,000 PE at a premium of about ₹105.
  • Stop loss: if the next candle closes above 25,120 (above the signal bar's high), the rejection has failed — exit. The premium would be about ₹70 there.
  • Target: back down to 24,940; the PE premium would be roughly ₹165 there.
  • Why it works: the SuperTrend flip at an RSI overbought extreme is a high-probability exhaustion pattern — sellers are stepping in where buyers were running out.

Scenario 3 — What to avoid

  • Do not act on a label that has not yet closed. The label appears as soon as the signal conditions are met intra-bar, but the bar can still reverse before it closes. Acting on a mid-candle label is one of the most common mistakes with this indicator.
  • Avoid the first signal after a long flat stretch. When there has been no signal for a long time (say, 30+ bars), the adaptive engine may still be calibrating to a new regime. The first label after a prolonged pause is lower quality than one that fires in an established signal rhythm.
  • Do not trade signals on very choppy, range-bound days. MLTS is a trend-reversal tool. On days when Nifty is oscillating within a tight 50-point band with no clear structure, the SuperTrend flips repeatedly and the labels can fire in quick succession with poor follow-through. If you see two opposing labels (Bull ▲ followed by Bear ▼ within a few bars), treat that as a chop warning and stay out.
  • Do not skip checking the Signal Type setting. In Breakout mode the label meaning reverses — "Bull ▲" means a breakout to new highs (buy momentum, not a bottom), and "Bear ▼" means a breakout to new lows. Using a Breakout-configured indicator with a reversal mindset will produce consistently wrong trades.

Settings Panel Guide

Signal Mode

  • Signal Type: whether the indicator looks for trend reversals or breakouts. Default is Reversal. Options: Reversal (fires when the SuperTrend flips direction — catching tops and bottoms), Breakout (fires when price pushes to a new high/low with the current trend — riding momentum). Choose one and tune around it; swapping between them frequently undermines the adaptive engine's learning. For Nifty intraday, Reversal is more practical on 15-minute charts.
  • Require Fresh Pivot: when enabled, a signal only fires if price actually made a new high or low before reversing. Default is on. Leave it on — it removes low-quality SuperTrend flips that happen on trivial price action.
  • Signal Spacing: minimum bars between any two signals. Default is 10. Increase to 15–20 on a 5-minute chart to prevent over-trading in choppy zones. Decrease to 5 on a daily chart where setups are naturally sparse.

Volatility Envelope

  • Lookback Window: how many bars are scanned to detect new price highs and lows. Default is 30. This is the core sensitivity control — lower values (10–15) fire more signals and catch smaller swings; higher values (50–80) fire fewer, only on large structural moves. The single most important setting to experiment with.
  • Smoothing Period: ATR period for the SuperTrend band. Default is 24. Lower values (10–15) make bands react faster to volatility but cause more whipsaws. Higher values (30–50) produce smoother, slower-flipping bands. Tune together with Band Width.
  • Band Width: ATR multiplier for band distance. Default is 1.4. This is the most impactful parameter in the whole indicator. Narrower values (0.8–1.2) generate more signals; wider values (2.0–3.0) generate fewer but more significant ones. Start with 1.4 on Nifty 15-minute and adjust after observing signal frequency.
  • Price Basis: which price feeds the SuperTrend. Default is hlcc4 (double-weighted close). Options: open, high, low, close, hl2, hlc3, ohlc4, hlcc4. Rarely needs changing from the default.
  • True Range Mode: when on (default), uses RMA-smoothed ATR. When off, uses EMA-smoothed true range, which reacts faster to sudden spikes. Leave on unless you specifically want faster volatility response.

Momentum Filter

  • Active: master toggle for the RSI confirmation filter. Default is on. When on, bull signals require RSI to have been oversold recently; bear signals require RSI to have been overbought recently. Turning this off increases signal frequency but removes momentum confirmation — not recommended for beginners.
  • Length: RSI calculation period. Default is 14. Lower values (7–10) make RSI more volatile, triggering the filter more easily. Higher values (20+) make RSI harder to reach overbought/oversold, reducing signal count.
  • Hot Zone Memory: how many bars back the indicator checks for an RSI overbought reading to confirm bear signals. Default is 50. Higher values are more lenient; lower values require a more recent overbought reading, making bear signal confirmation stricter.
  • Cold Zone Memory: same concept for bull signals — how many bars back the indicator looks for RSI to have been oversold. Default is 50. Reduce to 15–20 on faster timeframes if you want signals tied to fresher RSI extremes.

Flow Analysis

  • Sample Depth: how many recent bars of volume are averaged to define "normal" volume. Default is 3. Lower values react to very recent volume changes; higher values compare against a longer baseline.
  • Surge Threshold: volume must exceed this multiple of the average to count as a surge. Default is 1.2 (20% above average). Raise to 1.5–2.0 for a stricter filter that only passes on clearly above-average volume bars.
  • Require Surge: when on, signals only fire when volume is surging. Default is off. Enabling this dramatically reduces signal count but the surviving signals tend to coincide with real institutional activity. Consider enabling on BankNifty where volume patterns are more informative.

Signal Quality

  • Key Levels Only: when on, only signals at major structural turning points (where the high-to-low range exceeds a large ATR multiple) are allowed. Default is off. Enabling this is useful for swing traders who want only the biggest, most significant reversals and are happy with very few signals per week.
  • Key Level Depth (xATR): how many ATRs the high-to-low range must span to qualify. Default is 4.5. Only active when Key Levels Only is on. Higher values require even larger price structures.

Master Dial

  • Reactivity (1–20): the single meta-control for the entire adaptive engine. Default is 10. At 1, the engine is very conservative — large learning batches, slow parameter changes, tight caps. At 20, it is aggressive — small batches, fast adaptation, wide caps. New users should leave this at 10. Increase toward 15 only on Nifty 15-minute if signals feel too slow to adapt to regime changes.
  • Micro-Batch Processing: enables a fast, responsive adaptation layer on top of the global optimizer. Default is on. Leave on — it makes the engine react more quickly to recent performance changes.
  • Live Pressure Sensor: on live (real-time) bars, tracks up-tick vs down-tick volume flow to detect intrabar buying or selling pressure, then scales the optimizer's learning step accordingly. Default is on. Has no effect on historical bars. Leave on for live charts.

Auto-Tune Engine

  • Enable Auto-Tune: master switch for the entire self-tuning system. Default is on. When off, the indicator uses your static inputs forever — it becomes a traditional fixed-parameter SuperTrend. Leave on unless you specifically want a non-adaptive version.
  • Use Background Test Matrix (5×5): runs a continuous background simulation of 5 long and 5 short positions, held 5 bars each, to generate learning data for the optimizer. Default is on. The adaptive engine has nothing to learn from if this is off — leave it on.
  • Lock Envelope to Base (plot safety): when on (default), the SuperTrend bands displayed internally always use your original base inputs even if the adaptive engine has drifted the working parameters. On = visual consistency. Off = plotted internals reflect the adapted values, which can look erratic. Leave on.

Optimizer

  • Enable: turns the actual parameter update step on or off. Default is on. The test matrix still runs with this off, but results are discarded and nothing changes.
  • Step Size: base learning rate per optimizer cycle. Default is 0.25. Higher values adapt faster but risk overshooting. Lower values are more conservative. Works in combination with the Master Dial.
  • History Depth (per side): rolling window of recent trades used to compute performance statistics. Default is 30. Lower values make the optimizer react quickly to regime changes. Higher values give more stable statistics but are slower to adapt.
  • Win Ceiling: if rolling Accuracy exceeds this threshold, the optimizer tightens parameters (smaller bands). Default is 0.62. Raise to make it harder to trigger tightening.
  • Win Floor: if rolling Accuracy drops below this threshold, the optimizer loosens parameters. Default is 0.38. Lower to make it more tolerant of drawdown before loosening.
  • Normalize Returns by ATR: when on (default), the optimizer judges trade performance using ATR-normalized returns rather than raw price moves. Leave on — it keeps learning consistent across different volatility levels.
  • Momentum Smoothing: EMA factor for blending new parameter proposals into current values. Default is 0.35. Higher values apply changes faster; lower values smooth them over more bars.
  • Update Cooldown (bars): minimum bars between successive parameter updates. Default is 3. Prevents the optimizer from changing parameters on every single bar.
  • Deadband Width / Deadband Period: proposed changes smaller than these thresholds are discarded (0.01 for Band Width, 0.25 for the ATR period). Prevents meaningless micro-adjustments.
  • Quant Steps (Width / Guard / Target / Edge): proposals are rounded to these step sizes (0.05, 0.02, 0.02, 0.01 respectively) to stop parameters oscillating between nearly identical values.
  • Anchor Revert Interval / Strength: every 200 bars, adaptive parameters drift slightly back toward your base inputs, at 0.01 (1%) per revert event — a safety mechanism against unbounded drift.
  • P&L Cap per Trade (USD): caps any single trade result used for learning at this amount. Default is 750. Prevents one outlier trade from skewing the optimizer's statistics.

Risk Guard

  • Max Entries / Session: maximum signals allowed per calendar day session. Default is 20. Once reached, no new entries fire until the next session. Reduce to 5–8 for tighter intraday discipline.
  • Session Loss Limit (USD): if cumulative session simulation P&L drops below this amount, the signal engine pauses until the next session. Default is –1000. Adjust proportionally to the Sim Position setting.
  • Base Pause After Loss: bars to skip after a losing simulation trade before allowing another signal. Default is 5. Raise to 10–15 for longer cooldowns after losses.
  • Streak Limit: if consecutive simulation losses reach this count, all signals pause until session reset. Default is 3. Lower values are more protective.
  • Scale Pause by Loss Size: when on (default), larger losses cause proportionally longer cooldowns. Leave on.
  • Enforce on Test Matrix: when on, applies risk guard rules to the background test matrix as well. Default is off. Leave off so the test matrix always generates fresh learning data without pausing.

Context Memory

  • Enable Regime Grid: activates a 2D memory grid that maps market conditions (trend strength vs volatility) and remembers what parameter adjustments worked in each cell. Default is on. This is what lets the indicator adapt to different market regimes rather than treating all conditions the same.
  • Regime Bins / Volatility Bins: number of buckets along each axis. Default is 8 each. More bins give finer granularity but slower confidence build-up per cell.
  • Neighbor Blend Radius: Gaussian smoothing radius when reading grid cell recommendations. Default is 0.8. Higher values blend more neighboring cells — useful when data is sparse.
  • Decay Half-Life (trades): EWMA half-life for grid cell statistics. Default is 50. Lower values make cells forget old conditions faster.
  • Confidence Ramp (trades): trades needed before a cell reaches about 63% confidence. Default is 20.
  • Max Grid Influence: maximum weight the regime grid can have over the global optimizer. Default is 0.65.
  • Vol Ratio Ceiling: ATR/Average-ATR ratio at which the volatility axis saturates. Default is 2.5.

Decay Traces

  • Enable Trace Buffer: keeps a short-term memory buffer of recent trade results that fade over time. Default is on. If many recent trades had large adverse moves, stops are tightened automatically.
  • Buffer Depth: maximum traces held. Default is 30.
  • Fade Rate (per bar): each bar, each trace loses this fraction of its energy. Default is 0.02 (2% per bar).
  • Merge Interval (bars): every 200 bars, the strongest traces are consolidated into the regime grid for long-term storage.
  • Adverse Move Threshold: trades with a maximum drawdown exceeding this ATR multiple are flagged as "tail" events. Default is 0.8.
  • Guard Tighten Cap: maximum amount the stop-loss multiplier can be tightened based on tail event frequency. Default is 0.02.

State Snapshot

  • Restore String: paste a previously exported snapshot string here to restore learned adaptive parameters and regime grid cells after a chart reload. Leave blank unless restoring a saved state.
  • Export Now (toggle): toggle on to emit the current learned state as an alert string. One-shot — toggle it back off afterward. The snapshot appears in your alerts and can be copied into the Restore String field.
  • Import on Next Bar (toggle): when toggled on with a valid Restore String filled in, applies the saved state on the next confirmed bar. Default is on.
  • Max Cells in Export: how many regime grid cells to include in the exported snapshot. Default is 40.

Display & Sizing

  • RSI Hot Level / RSI Cold Level: overbought and oversold thresholds for signal confirmation. Defaults are 70 and 30.
  • Fast Ribbon / Slow Ribbon: internal fast and slow moving-average periods (9 and 21). Not plotted on the chart.
  • Edge Buffer (xATR): base breakout buffer distance. Default is 0.20. Only relevant in Breakout mode.
  • Guard (xATR) / Target (xATR): base stop-loss and take-profit distances for the test matrix (1.00 and 2.00), defining the base 1:2 risk/reward the optimizer starts from.
  • Sim Position (USD): hypothetical position size used by the test matrix for P&L calculations. Default is 1000. Scales dollar-based learning metrics; does not affect actual trading.

Risk Management

  • Show TP & SL: toggle for displaying TP and SL reference levels. Default is on.
  • TP/SL for: which signal type drives the displayed TP/SL levels. Default is Contrarian. Options: Contrarian (WPR reversal signals), AI Supertrend (adaptive SuperTrend signals), Both.
  • SL (toggle + %): enables a percentage-based trailing stop-loss and sets its distance. Default is off, 1%.
  • TP 1 / TP 2 / TP 3 (toggle + multiplier): enable each take-profit level and set its ATR multiple. Defaults are on at 1×, 2×, and 3×.

Frequently Asked Questions (FAQs)

All topics