Holdfast Trend Ribbon — Setup & Guide
A two-average trend ribbon for NinjaTrader 8, MetaTrader 5 and TradingView. It answers two questions at once: which way is this market leaning, and is the lean still intact?
Free. No license key, no expiry, nothing held back.
What you received
| File | What it is |
|---|---|
HoldfastTrendRibbon.zip |
The NinjaTrader 8 indicator |
HoldfastTrendRibbon.mq5 |
The MetaTrader 5 build |
HoldfastTrendRibbon.pine |
The TradingView build |
| This guide | Keep it |
1. The yellow state is the point
Most ribbons have two colors. This one has three, and the third is why it exists.
- Green — the fast average is above the slow one, and price is confirming it.
- Red — the fast average is below the slow one, and price is confirming it.
- Yellow — the reading is in question.
Yellow does not say the trend has reversed. It says the trend is no longer being confirmed, which is a weaker and more honest claim. It happens two ways:
- The averages converged — they are closer together than your threshold. There is no separation left to call a direction from.
- Price pulled back through the fast average — the averages still disagree, but price has gone the other way.
Those are different situations and the alert text names which one it was. The first is a trend running out of steam; the second is a pullback that may resume or may not.
2. Install
NinjaTrader 8
- Tools → Import → NinjaScript Add-On…
- Select
HoldfastTrendRibbon.zip. Do not unzip it first. - Click OK, then restart NinjaTrader when prompted.
- Right-click a chart → Indicators → Holdfast Trend Ribbon → Add.
MetaTrader 5
- File → Open Data Folder, then open
MQL5\Indicators. - Copy
HoldfastTrendRibbon.mq5in. - In MetaTrader: View → Navigator, right-click Indicators, Refresh, then double-click the indicator.
TradingView
- Open the Pine Editor, paste
HoldfastTrendRibbon.pine, and click Add to chart.
3. The anchor: a slower trend on a faster chart
The averages do not have to be measured on your chart’s bars. Anchor timeframe (5 minutes by default) makes them behave as though they were computed on a slower chart, so a 15-second chart can carry the 5-minute trend without a second chart open.
How it works. No second data series is loaded. The lookbacks are scaled by the ratio of the anchor to your chart period: on a 15-second chart, a 5-minute EMA(9) is reproduced as EMA(9 × 20 = 180). It tracks the real higher-timeframe curve closely and — because it updates on every bar — it moves smoothly instead of stepping in blocks as each anchor bar closes.
Set the anchor to Chart timeframe to turn the scaling off and read your own bars.
On MetaTrader and TradingView you get a choice: Multiplier does what NinjaTrader does, and Timeframe requests the real higher-timeframe series — exact, but it steps. Pick Multiplier if you want the platforms to match.
4. The third average
Show third EMA adds a slower line — 35 by default, drawn in orange. It is a level to watch, nothing more: it does not change the ribbon’s color.
Third EMA timeframe decides what it is measured on: the ribbon’s anchor, or your chart’s own bars. On a 15-second chart with a 5-minute anchor, those are two very different lines, and which one is useful is a matter of what you watch. Try both.
Third EMA affects trend is off by default. Switch it on and the slow average must also be on the correct side of the third before the ribbon commits to green or red. That is a stricter, later reading — the third average is always the last to be crossed — and it is there for anyone who wants confirmation over speed.
5. The second ribbon
Show second ribbon draws the same two averages on another anchor — 15 minutes by default — in a lighter shade, so you can see whether the bigger trend agrees with the one you are trading.
On NinjaTrader it is painted only where the main ribbon is not, so the two never blend into a third color. On MetaTrader and TradingView the platforms cannot clip one fill against another, so the second is drawn fainter instead.
Two things come from having it:
- Confluence. When the main ribbon flips into the direction the second ribbon already holds, both timeframes agree on the same bar. That has its own alert and its own signal plot.
- Only flip with the second ribbon. Off by default. Switched on, the main ribbon only turns green while the second is green and red while it is red; otherwise it reads yellow. It delays every flip, which is the trade.
6. Settings
Averages and anchor
| Setting | Default | What it does |
|---|---|---|
| Fast EMA length | 9 | Before the anchor multiplier. |
| Slow EMA length | 21 | Before the anchor multiplier. |
| Anchor timeframe / value | 5 Minute | What the averages behave as though they were measured on. |
Neutral zone
| Setting | Default | What it does |
|---|---|---|
| Threshold mode | Ticks | Ticks normalizes across instruments. Price takes a raw difference. TradingView and MetaTrader add ATR, which is the one to use if one template has to sit on futures, forex and crypto at once. |
| Threshold | 4 | How close the averages must be before the ribbon reads neutral. |
Display
| Setting | Default | What it does |
|---|---|---|
| Show ribbon fill | On | Fill between the averages. Off leaves the two lines. |
| Ribbon opacity | 30 | 100 is solid. |
| Show flip arrows | Off | An arrow under the bar where the ribbon turns bullish and over the bar where it turns bearish, clear of the candle and all three averages. |
| Fade weak trends | Off | Draws the ribbon faint when the averages are barely past the threshold and solid when they are well apart. |
Alerts
Trend flip, neutral/pullback, confluence, and second-ribbon flip — each with its own sound and a shared re-arm interval.
A flip is a change of committed direction, bullish to bearish or the reverse. A yellow stretch in between does not break the pairing, and returning to the same direction it already had is not a flip.
7. For a position sizer (NinjaTrader)
Six transparent plots carry a value only on the bar their event fires: FlipLong, FlipShort, ConfluenceLong, ConfluenceShort, PullbackLong, PullbackShort. Point a tool such as the XABCD position sizer at whichever pair you trade.
A pullback plot fires on the first bar of a yellow stretch caused by price, and is split by the direction it pulled back into — so a long-side tool never fires on a short-side pullback.
8. Troubleshooting
The ribbon is one color forever. Your threshold is probably too large for the instrument, in ticks that do not suit it. Drop it and watch the yellow appear.
The ribbon never goes yellow on pullbacks. Yellow from a pullback needs price to close back through the fast average. On a wide anchor, that average is a long way from price and rarely gets crossed. Shorten the anchor or the fast length.
The candles are hidden behind the ribbon. On NinjaTrader this cannot happen — the ribbon is always drawn underneath the price bars. On MetaTrader, check the chart’s own “chart on foreground” setting has not been switched back.
The second ribbon is missing. It needs enough history to warm up — on a fast chart with a slow anchor, that can be several hours of bars. Load more history.
9. What it pairs with
- Holdfast ATR Band — how far is far on this instrument, so a target can be judged against the market’s own scale.
- Holdfast Trend Strength — how orderly the move is, which the ribbon does not say.
- Holdfast Liquidity Levels — where real size is resting, which no price-based tool can see.
holdfastlevels.com