MOST is a trailing stop, and almost everybody hangs it on price. This one hangs it on the
RSI instead. That single change is what the whole tool is about, so it's worth explaining
before you look at a screenshot and wonder why the signal line lives in a sub-window.
Price trends are unbounded. Momentum isn't. RSI lives between 0 and 100, it mean-reverts by
construction, and a trailing stop built on top of it flips in a way that price-based MOST
never quite manages.
What MOST is, and what most versions do with it
| What MOST actually is | What most versions do | What this one does |
|---|---|---|
| A stop that ratchets: it only ever moves in the direction of the current trend | Recompute the band from scratch each bar, so it can loosen again mid-trend | longStop only rises while direction is up, shortStop only falls while it's down |
| The flip is a state machine, not a comparison | Flip whenever the line is crossed on the current tick | Direction flips only when the average clears the previous bar's opposite stop |
| The average underneath decides everything | Fixed EMA or SMA | Defaults to VIDYA: the EMA alpha is scaled by the absolute CMO over 9 samples |
| Divergence needs a pivot that has already been confirmed | Draw from the bar that's still forming | A pivot is only accepted after lookbackRight closed bars sit to its right |
| An alert is a per-bar event | Fire on every qualifying tick | A latch clears on the new bar and is set on the first alert inside it |
The row that costs you money is the third one. A fixed EMA on the RSI is smooth in a trend
and smooth in chop, which sounds fine until you count the crossovers. VIDYA scales its own
smoothing by how one-directional the last nine RSI moves were. In a clean run the average
tracks tightly and the flip comes early. In a range the CMO term collapses toward zero, the
average barely moves, and the crossovers you'd otherwise have taken simply don't happen.
What it draws
The MOST line and the RSI pair. Purple is MOST, green is the raw RSI, yellow is the
moving average of the RSI. The signal is the yellow line crossing purple. Levels sit at 30,
50 and 70, and the sub-window is pinned to a 1 to 100 scale so the geometry doesn't shift
around as you change symbols.

Signal arrows. A blue Wingdings arrow under the MOST line on a cross up, red above it on
a cross down. They're keyed by bar time, so a redraw replaces the arrow on that bar instead
of stacking a second one on top.

Divergence, on both panes at once. When the RSI makes a higher low while price makes a
lower low, you get an aqua line joining the two RSI pivots and a matching aqua line joining
the two price lows on the chart above. Bearish divergence is the same thing in orange. Having
both lines drawn at the same time is the part I'd miss if I went back to reading divergence by
eye, because the price leg is the half people talk themselves into.
An optional Bollinger band on the RSI. Standard deviation of the RSI over the same
averaging length, times your multiplier. Off by default.

And it draws no zones, no support and resistance, no entries, no stops and no targets. There's
no panel. It reads one timeframe, the one you put it on.
Why the history doesn't move
The ratchet state (longStop_prev, shortStop_prev and the direction flag) is committed
inside a if(newbar) block and nowhere else. So every closed bar was computed once, from
values that were themselves frozen at the close before it, and nothing ever goes back to
revise them.
The bar that's still forming does move, and I'd rather say so than sell you a word. The
current arrow can appear and disappear until that bar closes, because until it closes there's
no fact to be right about. Everything to the left of it is settled.
Divergence lines behave a little differently again. A pivot isn't accepted until
lookbackRight bars have closed to its right, so those lines show up five bars late by
default and then stay exactly where they were drawn.
Reading it
| On the chart | Read it as |
|---|---|
| Yellow above purple | Momentum trend is up, the stop is trailing below |
| Yellow crosses purple upward, blue arrow | The state machine has flipped long |
| Purple flat while yellow chops around it | VIDYA has gone quiet, the range is telling you to wait |
| Aqua pair (RSI up, price down) | Bullish divergence, both legs confirmed |
| Orange pair (RSI down, price up) | Bearish divergence, both legs confirmed |
Long: wait for the blue arrow, check that the purple line has actually started stepping up
rather than sitting flat, and prefer the entries where a recent aqua divergence pointed the
same way. Then drop to your execution chart, take your own confirmation, and manage it however
you normally do. Short is the same thing inverted.
Skip it when the purple line is horizontal and the yellow line is sawing through it. That's
the ratchet holding its level because momentum has no direction, and the crossings you get
there are noise wearing a signal's clothes. Skip it too on the first 40 or so bars after you
attach it or change an input, for the reason in the next section.
What this version can't do
Three things you should know before you buy rather than after.
The trailing distance is a percentage of the RSI's own value, not of a fixed range. The
band is average x percent / 100, so at an RSI average of 70 the default 9% gives you 6.3
points of room, and at 30 it gives you 2.7. The stop is more than twice as wide near
overbought as it is near oversold. In practice that biases it toward holding longs longer and
cutting shorts quicker, which some people will want and some will want to correct by lowering
the percentage. I've left it as the original formula rather than quietly "fixing" it, because
changing it would make this a different indicator from the one people came looking for.
It warms up, and there's no marker telling you when it's done. VIDYA carries its previous
value forward, the CMO needs nine samples, and the ratchet needs a direction before it means
anything. The first stretch of bars after you attach it is the indicator finding its feet.
Scroll back once so history loads, and don't trade the left-hand edge.
Divergence only compares the last two pivots. The arrays are capped at two, so a
three-push divergence draws as two overlapping two-point lines instead of one sweep from the
first push to the third. It's still visible. But it isn't drawn the way you'd draw it by hand.
You won't find a win rate table in this listing, and honestly I'd be careful with any
indicator listing that has one. It draws lines and fires alerts. What you do after that is the
part that decides your results.
The fiddly bit while building it wasn't the MOST logic at all. It was the divergence lines
needing to land on two different windows, the sub-window by id and the price chart by zero,
and I had the window id resolved in the wrong place for longer than I'd like to admit.
Questions you'll have
Which moving average should I use? Leave it on VAR. The other five are there because the
original script had them and somebody always wants SMA, but VIDYA is the reason the crossovers
behave.
M1? You can. I wouldn't. The CMO term needs a bit of history to mean anything and on M1
you're mostly measuring the spread.
Can I get the alerts on my phone? Yes, four ways: a terminal alert, an MT5 push
notification, email, or Telegram through your own bot token and channel id. One alert per bar,
whichever you pick.
MT4? Both platforms are included. Same logic, same defaults, one download each.
Does it repaint? Closed bars, no, and the mechanism is in the section above. The forming
bar moves until it closes, like every trailing stop that has ever existed.
Support
Message me through the site with a screenshot showing the sub-window, plus the symbol and
timeframe you're on. That's usually enough for me to tell you what happened. Updates are
included for as long as your subscription is running.
Analysis tool. It places no trades and makes no profitability claim. Past price behaviour is
not a guide to future price behaviour.