Machine Learning Adaptive SuperTrend MTF puts the regime-based SuperTrend from four timeframes on one MT4 or MT5 chart: D1, H4, H1 and M15 out of the box. Each line is calculated on its own timeframe's bars, with its own ATR history and its own volatility clusters. So the H4 line on your M15 chart really is the H4 line, not an M15 calculation stretched to look like one.

If you want one timeframe with the arrows and the cluster numbers, that's the single-timeframe Machine Learning Adaptive SuperTrend. This page is the multi-timeframe build.

EURUSD H1 on MT5 with the H1 and H4 lines; the H1 line turns bearish on 22 Oct, the H4 line four days later

What each line is

Every line runs the same engine as the single-timeframe version, just on its own bars.

  1. ATR over the last 100 bars of that timeframe goes into a rolling window.
  2. Three seeds sit at 75%, 50% and 25% of the way between the window's lowest and highest ATR.
  3. One k-means pass: every reading joins its nearest seed, each seed moves to the average of its group.
  4. The current bar takes the nearest of the three centroids, and the SuperTrend band is built from that centroid instead of the raw ATR.

That's why the lines move in steps. One wild candle doesn't widen the band unless it changes the regime. On the D1 line a step can hold for weeks.

The one-bar lag, and why I left it in

Here's the part most multi-timeframe indicators get wrong, and you'll only notice it live.

The usual way to draw an H4 line on an M15 chart is to take the H4 bar's value and paint it across the 16 M15 bars inside it. On history it looks perfect. The line flips exactly where price turned. But that value didn't exist until the H4 bar closed, so while those 16 bars were printing, the line showed something else, and it got redrawn afterwards. Your history ends up cleaner than anything you could have traded.

This one doesn't do that. Inside any H4 bar, the chart shows the SuperTrend of the last closed H4 bar, which is the level you actually had at that moment. When the H4 bar closes, the new level starts on the next bar and nothing behind it moves.

The cost is real. Next to an H4 chart, the H4 line looks one H4 bar late. On the D1 line that's a whole day. I'd rather show you the lag than hide it in the history.

XAUUSD H1 on MT4 with the D1, H4 and H1 lines stepping down through the late-October drop

Single-timeframe version This MTF version
Timeframes on one chart 1 Up to 4, any standard timeframe per line
Arrows and cluster numbers Yes No
Volatility regime comment Yes No
Alerts Trend flip, regime change Trend flip per line, tagged with its timeframe
Buffers for iCustom 2 8, two per line
Value shown on the current bar Previous closed bar Previous closed bar of that line's timeframe

Settings

Each of the four lines has its own group: Show line, Timeframe, Bullish Color, Bearish Color and Width. Defaults are D1 at width 4, H4 at 3, H1 at 2 and M15 at 1, so the bigger the timeframe, the heavier the line. Change any of them; the timeframe of a line is a setting, not fixed.

A line on a timeframe lower than the chart is hidden automatically. Put it on H1 and the M15 line disappears, with one line in the Experts log saying so. An M15 value can't be drawn bar by bar on an H1 chart, so I'd rather draw nothing than draw something misleading.

The SuperTrend and k-means settings are shared by all four lines: ATR Length 10, SuperTrend Factor 3, Training Data Length 100 and the three seed percentiles. Keep in mind what "100 bars" means per line. On D1 it's about five months of regimes. On M15 it's about 25 hours.

Lookback is counted in bars of each line's own timeframe. 1000 by default, and it has to be at least twice Training Data Length.

EURUSD M15 on MT5 with the H4, H1 and M15 lines and their timeframe labels at the right edge

Show timeframe name at line end puts a small D1 / H4 / H1 / M15 label next to each line on the newest bar, coloured to match.

What it draws, and what it doesn't

Up to four stepped lines, each split into a bullish and a bearish buffer, plus those four labels. That's the whole picture.

It doesn't draw arrows, cluster numbers or the "High / Medium / Low Volatility" comment. Four timeframes of arrows and numbers on one chart would bury the candles, and the single-timeframe version is still there when you want them.

The buffers are in a fixed order for an EA: 0 and 1 are line 1 up and down, 2 and 3 line 2, 4 and 5 line 3, 6 and 7 line 4. Empty is EMPTY_VALUE.

Alerts

One switch, Alert when a line flips. A line flips when its own timeframe's bar closes on the other side, and the message names that timeframe, like (@H4) mlst MTF: Buy signal. So the D1 line can alert at most once a day, and you'll know which line it was.

Notification type ships as Do not notificate, so nothing fires until you pick a channel. Popup, push and email on both platforms; Telegram on MT5.

Where it's weak

It's late by one bar of each timeframe, by design. See above. If you need the D1 flip the moment it happens, this isn't the tool.

The settings are shared. You can't give the D1 line factor 2 and the M15 line factor 4. Two copies on one chart work around it, but that's clumsy.

Scroll back far enough and the short lines end. With Lookback 1000, the M15 line covers about two weeks and the H1 line about two months. Older than that, they stop. Raise Lookback if you study history, and expect the first load to take longer.

It's still a SuperTrend. In a range every line flips back and forth, and the regime average only makes that less frequent.

Questions you'll have

Does Machine Learning Adaptive SuperTrend MTF repaint? No. Every line is calculated on closed bars of its own timeframe, and the chart shows the last closed value, so a level never changes after it's drawn.

Why is the H4 line one bar late compared with my H4 chart? Because on your lower chart it shows the H4 value that was known at the time, which is the previous closed H4 bar. That lag is what stops it repainting.

Why doesn't the M15 line show on my H1 chart? A line on a lower timeframe than the chart is hidden. Switch the chart to M15 or lower and it comes back.

Can I use other timeframes than D1, H4, H1 and M15? Yes. Each line has a timeframe setting. On MT4 you get the nine standard timeframes.

Why does a line stop when I scroll back? Lookback counts bars of that line's timeframe, 1000 by default. Raise it to see further.

Can an EA read Machine Learning Adaptive SuperTrend MTF? Yes, through iCustom. Eight buffers, two per line in line order, bullish first.

Is the single-timeframe version included? The same subscription covers both. It has its own page and its own download.

What chart timeframe works best? M15 or H1, with H4 and D1 above it. On D1 only the D1 line is left, and that's just the single-timeframe tool without the arrows.

MT4? Both platforms are included, one download each. Same lines, same settings, same buffer order.

Support

Send me a screenshot through the site with the symbol, the chart timeframe and which line looks wrong, and I'll tell you what it's showing. Updates are included for as long as your subscription runs.

Analysis tool. It places no trades and makes no profitability claim. Past price behaviour is not a guide to future price behaviour.