OPEN-SOURCE SCRIPT
Aggiornato Wonra Alchemist SNR Engine

Wonra 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.
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.
Note di rilascio
FVGs receive box.set_right(bar_index) at every bar, meaning they all grow continuously. The filling detection is also too strict: it requires complete penetration through the body, whereas the space becomes filled when it passes through the price.Note di rilascio
Engulfing zones were drawn on the engulfing candle. Wrong one. The order blockis the candle that got engulfed, because that is where the orders were sitting.
And filled gaps kept stretching across the chart instead of stopping where
they filled. They stop now.
Note di rilascio
Reading it the way the method draws it.Levels sit on the close. The junction of one close and the next open tells you
where a level is, and the close is the price you draw. It was landing between
the two.
Every line names itself: R, S, RBS, SBR, OCL, LS, APEX. R and S used to mean
the flipped levels, so a line reading S was a support that had already become
a resistance. The opposite of what anyone would read from it.
The apex is drawn. The engine always knew where the head of a Quasimodo was
and never showed it.
The Quasimodo is read from five consecutive swings, in order. It could skip
over intermediate ones, and skipping the wrong one gave a shoulder joined to a
neck by a line passing straight above the real head. It now also needs price
still on the working side of the shoulder, and a move in front of it to
reverse.
The sloped pattern is gone. It was never part of the method.
Engulfing zones moved to the engulfed candle. The method calls this an order
block, and the order block is the last opposite candle before the move, not
the candle that did the moving.
Filled gaps stop at the bar that filled them instead of running to the right
edge forever. Weekend gaps are not imbalances.
Trendlines are anchored to closes, like the line chart they are drawn on.
Show Diagnostics plus Draw QM Structure will show you which swings any level
was built from.
Note di rilascio
qml zone fixedNote di rilascio
The POI pool.A trendline is not a trade on its own, and it never was here: a touch with
nothing at it produces nothing. What was wrong is what counts as something.
The method names four points of interest. Only one of them was being checked,
so a trendline arriving on a fresh OCL, or on a support that had turned into a
resistance, produced nothing at all. Both are on the list, both were already
drawn on the chart, and neither was ever asked about.
They count now. The mark says which one it met.
Freshness is still the condition. A level already worked through is not a POI,
whatever a line does at it.
Also: the swing threshold now defaults to 1.3 and its tooltip explains which
way to move it. It decides what the engine can see at all, and 1.6 was high
enough that structures dissolved when the timeframe went up.
Note di rilascio
The levels have been labeled as OCL on the chart for a while, but in an earlier version this setting was called "Gap SNR". Therefore, it has been called OCL for now.Note di rilascio
Small fix: trendlines were anchoring to the wrong end of the body when thepivot candle went the opposite way to the trend.
Rising lines hold the bottom of the body now, falling lines the top. Wicks
still ignored.
Note di rilascio
Trendline bug fixedScript open-source
Nello spirito di TradingView, l'autore di questo script lo ha reso open source, in modo che i trader possano esaminarne e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricordiamo che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.
Script open-source
Nello spirito di TradingView, l'autore di questo script lo ha reso open source, in modo che i trader possano esaminarne e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricordiamo che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.