Wonra Alchemist SNR EngineWonra Alchemist SNR Engine
An implementation of Malaysian SNR (MSNR) and the Quasimodo reversal pattern, built as one engine because in that method the pieces are not independent indicators. A level means nothing without knowing which way the story is running, and the story is told by levels. This publishes the whole reading rather than one part of it.
Everything below is visible in the source. This is published open-source so the code is the final word on any of it.
How levels are found
Malaysian SNR ignores wicks. A level is marked by joining one candle's close to the next candle's open, and the space between those two prices is the level itself. Where the two meet you get a hairline; where they do not, the space between them never traded, and that untraded space is what the method calls a GAP. The engine treats both as one construct: a level is a band, and a gap is a band you can see.
That has consequences the code follows through on:
A touch registers at either edge of the band.
A break requires a close through the far edge. Closing inside the band has broken nothing, because nothing in there ever traded.
Levels are seeded from confirmed swings (an ATR-threshold zigzag, so minor noise does not create a level of its own) and from close-to-open gaps above a size floor.
How a level earns weight
Two things strengthen a level, and the second is the one most tools ignore.
Touches. Price left the level, came back and was refused. Leaving is required: price hovering at a price does not add a touch every bar.
Misses. Price swung toward the level and turned before reaching it. In MSNR a miss validates a level rather than doing nothing, and the reasoning is that the resting liquidity was never taken, so all of it is still there. A level with three misses is not the same as one with three taps, and the label shows them separately.
Role flip (SBR / RBS)
A level closed through does not disappear, it changes sides. Broken support becomes resistance and broken resistance becomes support, keeping its history. This is the SBR/RBS part of the method and it is why the chart does not empty out over a session.
Quasimodo (QM / QML)
The engine looks for the QM shape: a shoulder, a head beyond it, and a return. For a bullish QM the head must be a lower low than the left shoulder; the level drawn is the left shoulder, not the head, which is where the pattern is traded from. Each candidate must also produce a structure break before it is accepted, and combinations are scanned across several swings so a pattern is still found when a minor swing sits inside it.
Supply zones extend up from the QM level and demand zones extend down from it, on one side only, so price is not counted as having reached a zone while it is still short of the level.
Storyline (direction)
MSNR determines direction from higher-timeframe levels, and the engine follows the four rules the method states:
Direction comes from higher-timeframe levels, read from bodies, not from wick extremes.
A storyline begins with a rejection: a close back below resistance, or back above support.
It is confirmed by a breakout on a lower timeframe. The engine distinguishes the two kinds the method names — an internal breakout of a level formed after the rejection, and an external breakout of one that already existed — and reports which occurred.
Levels against the established direction are roadblocks: the places pullbacks are expected to stop on the way. They are marked rather than hidden, because they are the one thing the method tells you to expect.
Engulfing zones (EG / EF)
An engulfing candle above a size floor creates a zone. The rule that makes it worth having is what happens when it fails: a bullish zone that price closes through becomes a failed zone read the other way, at the same prices, because that is where the other side proved itself. Broken twice and it is discarded, having now been wrong in both directions.
Imbalances
Three-candle gaps, drawn as neutral background. Zones spanning a market closure are discarded — a weekend is not unfinished business between buyers and sellers, it is a closed market, and it happens to leave the largest and most eye-catching gap on the chart.
Scoring
Confirmed patterns are scored 0-100 from what the engine already knows about them: the size of the structure, the quality of the break, whether liquidity was swept and how cleanly, whether an imbalance sits inside the zone, and how proven the levels involved are. The score sets how loudly a pattern is drawn. Nothing is deleted for scoring low.
Why this is one script and not several
Because in this method the parts are not separable. The storyline decides which levels are tradeable and which are roadblocks. The QM level is only a setup when it agrees with the storyline. A level's weight comes from its own touch and miss history. Splitting these into separate indicators would produce three scripts that each need the other two to say anything, which is the situation this replaces.
How to use it
The panel gives the current reading: storyline direction and which breakout confirmed it, how many fresh zones are live on each side, the nearest zone in ATR, and whether a confluence is being watched.
Fresh zones are the tradeable ones. A zone that has been used is faded, not removed, so the history stays readable.
Zone reactions are marked where they happen. A diamond marks a reaction from a level that had already proven itself.
Levels against the storyline are marked RB. Expect a pause there, not a reversal.
Higher timeframes for direction, lower for entry timing. The storyline timeframe is automatic and can be set manually.
Credits
The concepts are not mine. Malaysian SNR, the storyline structure, roadblocks, fresh and unfresh levels, the MISS, SBR/RBS and the Quasimodo entry come from Malaysian SNR and Alchemist educational material that circulates publicly. This is an implementation of that method, not a new one.
The Strong FVG section is taken from "Customizable Strong FVGs" by Fleezzuss, published open-source under the Mozilla Public License 2.0. The three-candle detection, the sensitivity modes and the zone lifecycle are their work. This script is published open-source under the same licence because of it.
Added on top: a gap is not drawn when it would sit on one already on the chart, so consecutive impulse candles stop stacking zones at the same price; gaps spanning a market closure are discarded, because a weekend is a closed market rather than an imbalance; and the palette is neutral so imbalances sit behind the levels instead of competing with them.
Not financial advice. This is an analysis tool. It does not predict outcomes and does not tell you to buy or sell. Every level can fail.
Indicator


