Holdfast SMC — Setup & Guide
Market structure, order blocks and higher-timeframe levels, for NinjaTrader 8, MetaTrader 5 and TradingView.
Free. No license key, no expiry, nothing held back.
What you received
| File | What it is |
|---|---|
HoldfastSmc.zip |
The NinjaTrader 8 indicator |
HoldfastSmc.mq5 |
The MetaTrader 5 build |
HoldfastSmc.pine |
The TradingView build |
| This guide | Keep it |
1. What it draws
Swing points. HH, HL, LH and LL, marked at the bar that made them.
Breaks. A line at the level price closed through, labeled BOS when the break continues the direction the structure already held, and CHoCH when it goes against it. A change of character is the more interesting of the two: it is the first break in the other direction.
Order blocks. The bar the losing side last held before a break went through. It is drawn as a zone from that bar forward, and it disappears when price closes back through it.
Liquidity sweeps. A bubble where price took a level and gave it straight back — a wick through an order block or a swing high or low, with the close back on the side it came from. Sized by the volume behind the bar.
Previous highs and lows. Daily, weekly and monthly levels, drawn from the bar that made each one.
2. Two tiers, and why
The structure engine runs twice over the same bars with two different lookbacks.
- Internal — the near structure. Short lookback, many pivots, the breaks that happen inside a move.
- Swing — the context. Long lookback, few pivots, the breaks that mean the move itself has changed.
Both produce breaks and blocks; only the swing tier names swing points and marks strong/weak levels. The internal tier finds the same pivots far more often, and labelling every one of them is what makes a chart unreadable.
Where an internal level sits exactly on a swing level, it is one event, not two.
3. Two engines
Beyond the two tiers, the indicator can run a second engine on another timeframe entirely.
- Primary runs on your chart’s bars and draws everything.
- Secondary runs on whatever timeframe you point it at, and draws order blocks only.
The asymmetry is deliberate. A higher timeframe’s order block is a price you might trade against. Its break lines and swing labels are the same shapes the primary is already drawing, one timeframe out of step, and two sets of them on one chart is noise.
Set both secondary block dropdowns to None and the second series is never loaded, so leaving that column off costs nothing.
4. Install
NinjaTrader 8
- Tools → Import → NinjaScript Add-On…
- Select
HoldfastSmc.zip. Do not unzip it first. - Click OK, then restart NinjaTrader when prompted.
- Right-click a chart → Indicators → Holdfast SMC → Add.
It calculates on every tick, so the blocks, the levels and the signal plots track price live. Structure itself is still a statement about closed bars: the engine reads the last bar that has finished and steps once per bar, because on every tick it would invent pivots the bar never made. You do not have to set any of this — the indicator handles it.
MetaTrader 5
- File → Open Data Folder, then open
MQL5\Indicators. - Copy
HoldfastSmc.mq5in. - View → Navigator, right-click Indicators, Refresh, then double-click the indicator.
TradingView
- Open the Pine Editor, paste
HoldfastSmc.pine, and click Add to chart.
5. Order blocks
A block is cut from the most extreme bar between the pivot and the break — the last bar the losing side held before it gave way.
The noisy-bar rule. A bar wide enough to be noise has its extremes read the other way round, so one violent bar cannot hand a block its whole range. Order block filter chooses what “wide” is measured against: ATR, or the running mean range of the session.
Mitigation removes a block when price has gone through it. Order block mitigation decides whether that means a close beyond it or a wick.
Entry is the bar’s range touching the block at all. It fires once per block: a block that is entered, left and re-entered does not fire twice.
Where two blocks cross (MetaTrader). Blocks that would paint the same thing — same engine, same tier, same side — are one zone to look at, not two, so the crossing is painted once and does not darken. What tells them apart is their borders, which are drawn per block and never faded. Blocks that genuinely differ — a swing over an internal, one timeframe over another, bullish over bearish — still blend where they cross, because that crossing is the confluence worth seeing. On NinjaTrader and TradingView every crossing blends, including same-type ones.
Block time. Each block can show when it was created — Off, On (in the label) or Hover (in a tooltip, with a line through the bar that produced it). Hover keeps the label clean, which matters once several blocks share a price.
6. Liquidity sweeps
A sweep is price taking a level and giving it straight back. It is marked with a bubble centered on the swept extreme — the bar’s low, or its high — sized by the volume behind the bar, with the figure written clear of it.
It has to be a wick. The bar’s whole body must sit on the side price came from, with only the wick beyond the level. A bar whose body is through the level did not take it and give it back — it went through and stayed, which is a break, not a sweep. That is the difference between a mark on a rejection wick and a mark stranded in the middle of a bar.
Sweep source decides what counts as a level.
- Order blocks watches the far edge of every live block, on both engines. A bullish block swept below and held is demand that did its job.
- Swing levels watches the last uncrossed swing high and swing low. That is where the resting orders actually are, so it marks far fewer bars and each one means more. A level price has already closed through is no longer liquidity, so it is dropped the moment that happens.
- Both runs the two together.
Telling the two apart. A sweep off a swing level is drawn as a ring; a sweep off a block edge is a filled disc. The color is not used for this — it is already saying which way the sweep went, and size is already saying how much volume was behind it, so the outline is the one channel left. Both keep the same outside diameter for a given volume, so they stay comparable.
Either way you get one bubble per bar per direction. A level four blocks and a swing high all agree on is exactly the confluence worth seeing, and four bubbles drawn on top of one another is exactly what hides it. When a bar takes a block edge and a swing level at once, the ring wins — it is the stronger claim of the two.
Sweep swing lookback sets the bars either side of a pivot for those levels. They are the sweep’s own levels, not the structure engine’s: what counts as liquidity worth taking is a different question from what counts as structure, and tying the two would mean the only way to change one is to change the other. Longer is fewer and more significant levels.
Minimum wick is the sensitivity dial. It is how far past the level the wick has to reach before it counts, as a share of the bar’s whole range. Zero takes any pierce; raise it to throw away the one-tick clips and keep the sweeps that actually went looking for something.
Sweep block tiers limits the block source to one tier. The internal tier holds many more blocks, so Swing is the quieter chart. It is ignored when the source is swing levels alone.
Size is volume. The bubble is sized by the bar’s volume against the heaviest bar in the Volume lookback, in five steps. A sweep on thin volume and a sweep on the heaviest bar of the week are not the same event and should not look the same. Bubble sensitivity multiplies that ratio before it picks a size: above one makes ordinary volume draw a big bubble, below one reserves the big ones for genuinely heavy bars. Where a venue publishes no real volume the tick count is used instead — the bubble is sized by a ratio, and both sides of it are read the same way.
Show volume writes the figure beside the bubble.
Mitigation interacts with this. Under Close mitigation a swept block survives by definition, because the close came back inside it. Under High/Low the wick alone spends the block — so the sweep is tested before mitigation, and the rejection is still marked on the bar the block died on.
Sweeps kept is how many of each direction stay on the chart. In Present mode only the latest of each is kept.
On TradingView this spends from the same 500-label budget the swing points and the BOS/CHoCH tags draw on, which is why the default is deliberately small.
7. Layering
The whole indicator draws behind the price bars, and there is no switch for it. Blocks and structure are context; the candles are what you are reading, so a candle always wins where the two overlap — including where it crosses a break line.
On MetaTrader the blocks are already drawn in the background and the lines in front. On TradingView a script cannot set this: right-click the symbol, Visual Order, Bring to Front.
8. Settings worth knowing
| Setting | What it does |
|---|---|
| Internal lookback / Swing lookback | The two tiers. Five and fifty are the usual starting points. The lookback is what decides a tier’s span, and therefore how wide the blocks it cuts are. |
| Block counts | How many blocks of each tier stay on the chart. |
| Opacity, per tier | Internal blocks default solid-ish, swing blocks lighter. Zero gives a block that is border alone. |
| Bullish / bearish color, per engine | One pair per engine, not per element. Two engines in the same two colors is two engines you cannot tell apart. |
| Block label | The tier and timeframe on the block, e.g. 5m INT.
Labels that collide at one price are joined into one line rather than
smeared over each other. |
| Sweeps / Sweep source | Liquidity sweeps, and whether they are measured against order blocks, the swing levels, or both. |
| Highs & lows MTF | Previous daily, weekly and monthly levels, drawn from the bar that made each extreme. |
| Alerts | Block creation and block entry, per tier and per direction, with a shared re-arm, plus one per direction for sweeps. |
9. How to use it
Structure is context, and the blocks are the part you can act on.
- Read the swing tier first. It says what the move is doing. A CHoCH there is the event worth waiting for.
- Use the internal tier for timing, not for direction. Internal breaks happen constantly inside a healthy trend.
- Trade the blocks the structure agrees with. A bullish block in a structure that just changed character upward is a different proposition from the same block against a falling swing structure.
- A block is a zone, not a line. Its edges are the extremes of one bar, and price reaching into it is the event, not price reaching some exact price inside it.
10. Troubleshooting
Nothing is drawn. The engine needs its longest lookback plus a few bars of history before it can say anything. On a fifty-bar swing lookback, that is fifty-odd bars.
Too many blocks. Lower the block counts, or raise the internal lookback — a longer lookback means fewer pivots, fewer breaks and fewer blocks.
No sweep bubbles. Check Sweeps is not None. If the source is Swing levels alone, they are rare by design — a sweep only counts against a swing level price has not already broken. Widen it to Both to see the block sweeps too.
The secondary engine draws nothing. Check both secondary block dropdowns are not None, and that its timeframe is different from the chart’s — or, if it is the same, that its lookbacks differ. Same series and same lookbacks is the same engine twice, and it stays off.
11. What it pairs with
- Holdfast Liquidity Levels — whether real resting size sits at the block, which price data cannot show.
- Holdfast Trend Ribbon — which way the market is leaning into a break.
- Holdfast ATR Band — whether the distance to the next block is ordinary or a stretch.
holdfastlevels.com