Trendline v4.2
Trendline v4.2 turns choppy, directionless price action into clearly marked reversal setups on NinjaTrader 8. Most tools fire an arrow every time RSI hits an extreme, even mid-trend. Trendline v4.2 waits for a genuine range first.
Key benefits
- Signals only where they belong - the default mode stays silent in trends and speaks up only in real ranges.
- A trade plan on every signal - Entry, an ATR-based stop and up to three targets are drawn instantly.
- Four engines in one - switch to EMA-stack or RSI-crossover modes to trade with the trend.
- Less signal spam - cooldown plus optional Stability Mode and Smart Signal Filter block repeats.
- Automation-ready alerts - structured JSON on bar close with symbol, entry, stop and targets.
How it works
A stepped, range-based average classifies the market as rising, falling or flat and colours your candles to match. In flat conditions it waits for RSI to reverse at the edge of the 50-bar range. Full rules are in the Manual.
What's included
- NinjaTrader 8 access to Trendline v4.2 (NinjaScript overlay)
- Four signal modes, adjustable Sensitivity and Signal Strength
- Automatic Entry / Stop Loss / TP1-TP3 with breakeven handling
- JSON alerts and ready-made NinjaTrader 8 alert conditions
- Written manual with marked-up chart examples
Best for
FX majors, gold, index CFDs and large-cap crypto on M15 to H4 - for intraday and swing traders who prefer mean-reversion entries with a defined stop.
Get started
Browse the ZynAlgo marketplace
Trading involves risk; no indicator predicts the market. Trendline v4.2 is an analysis tool, not financial advice.
Trendline v4.2
NinjaTrader 8 - NinjaScript - indicator (overlay)
How Trendline v4.2 approaches range-reversal setups
Trendline v4.2 is built around one question: is this market actually going somewhere right now, or is it just drifting? Rather than producing signals in every condition, its default engine deliberately stays quiet while a trend is running and only starts looking for entries once price has flattened out.
To make that judgement the indicator watches four things at once:
- A smoothed, range-based moving average that classifies the market as rising, falling or flat
- RSI - its level, and more importantly the bar on which it turns
- Where price sits inside the high-low range of the last 50 bars
- ATR(14), which sets how far the stop sits and how far the targets are spaced
Trendline v4.2 also ships three alternative engines for traders who prefer to trade with the trend: Mode 1 (pullback onto a stacked EMA set), Mode 2 (the bar three EMAs first stack in order) and Mode 3 (a fast/slow crossover calculated on RSI). Mode 4 is the default and is the mode this manual focuses on.
The result is a smaller number of more selective reversal signals on NinjaTrader 8, each one arriving with an Entry, a Stop Loss and up to three Take Profit levels already drawn on the chart.
Understanding the Sentiment Range MA
The Sentiment Range MA is the component that decides whether Trendline v4.2 is allowed to trade at all. It is a stepped average that holds its value while price stays inside an ATR-sized band and only re-centres when price pushes out of that band. Because it moves in steps rather than tracking every tick, its slope is a clean read on whether the market is genuinely trending or simply oscillating.

What it looks like on the chart:
- The Sentiment Range MA is never drawn as a line - it is expressed through candle colour, so the chart stays clean
- Rising average -> uptrend candles - falling average -> downtrend candles - flat average -> sideways candles
- The flat state is the one that matters: it marks stretches where price is rotating inside a range instead of advancing
- Candle colouring always comes from this Mode 4 average, even when you switch the indicator to Mode 1, 2 or 3
This is where a lot of traders go wrong. An oversold RSI reading feels like a buying opportunity in any market, so reversal signals get taken in the middle of a strong downtrend - where oversold simply means the trend is working. Trendline v4.2 removes that temptation by refusing to generate Mode 4 signals while the average is rising or falling.
How the Sentiment Range MA is defined

The pieces that build it, and what each one contributes:
- Wick-based candle range (high to low), smoothed over 5 bars - establishes the top and bottom edge the average reacts to
- Band width = average candle range over 200 bars x 8 - sets how far price must travel before the average is allowed to move
- Stepped anchor - the average re-centres on close only when the smoothed top or bottom breaks outside the current band, which is what removes the noise
- Double smoothing (a 27-period weighted average applied on top of a simple average) - produces the final, gently curving output
- Slope test against a 0.001% threshold - converts that output into the three states: rising, falling, or flat
- RSI(14), shifted by the Sensitivity setting - supplies the actual reversal trigger once the flat state is confirmed
- 50-bar high-low range - provides the top and bottom zones that a signal must occur in
- ATR(14) - used only for stop distance and target spacing, not for signal logic
When trading opportunities appear
In the default Mode 4, a BUY is printed only when all of the following are true on the same bar:
- The previous bar's RSI closed below 32
- That RSI reading was lower than the reading two bars ago - momentum was still falling
- The current RSI has turned back up above the previous bar's value
- Price is sitting in the bottom 30% of the last 50 bars' range
- The Sentiment Range MA is flat (sideways candles)
- At least 10 bars have passed since the last BUY
A SELL is the exact mirror: previous RSI above 68, higher than two bars ago, current RSI turning back down, price in the top 30% of the 50-bar range, flat Sentiment Range MA, and 10 bars since the last SELL.

On the chart the entry is marked by a green ▲ label below the bar for a BUY and a red ▼ label above the bar for a SELL. Read the label together with the RSI turn and the candle colour that produced it - that is the reason the signal fired.
Before a raw signal becomes a printed one it still has to clear the shared filters:
- Cooldown - a further 10-bar gap is enforced after every printed signal, in every mode
- Stability Mode (off by default) - blocks any new signal while a trade is still open
- Smart Signal Filter (off by default) - forces signals to alternate, so a BUY cannot follow a BUY
- Follow Trend (off by default) - permits BUY only above the 200 EMA with RSI(14) over 50, and SELL only below it with RSI under 50. Note that switching this on works against Mode 4's mean-reversion character
- Multi-timeframe filter - applied to Modes 1-3 only; Mode 4 skips it because the Sentiment Range MA already performs that job
Every printed signal draws its own levels. Entry is the close of the signal bar. The stop sits ATR(14) x 2.8 away from entry (the Distance setting), and each target is a multiple of that risk: TP1 at 1R and enabled by default, TP2 at 4.5R and TP3 at 6.5R available but switched off. With TP2 or TP3 turned on, a breakeven stop activates once TP1 is reached. Any trade still open after 200 bars is closed out at the current price.
Is Trendline v4.2 right for you?
Trendline v4.2 suits you if you recognise yourself here:
- You trade ranges and reversals rather than chasing breakouts
- You work on intraday to swing timeframes - M15 through H4 is the natural home for the default settings
- You trade liquid instruments that spend real time going sideways: FX majors, gold, index CFDs, large-cap crypto
- You want a defined stop and target on every signal instead of deciding levels in the moment
- You would rather wait for a handful of well-located setups than act on every oversold reading
If you are a pure trend-follower who wants to be in every move, the default mode will feel too quiet - start with Mode 1 or Mode 2 instead.
Trendline v4.2 is deliberately built to say no more often than it says yes. Its value is in the setups it filters out, not the number of arrows it prints.
Browse the ZynAlgo marketplace
Trading involves risk. Signals are analytical tools, not financial advice, and past behaviour does not predict future results.
- Trendline v1Jul 21, 2026
Initial release
Why Range-Reversal Setups Need More Than an Oversold RSI Reading
An oversold RSI can appear anywhere, in a healthy trend or a range. Trendline v4.2 for NinjaTrader 8 uses a stepped average to tell the difference and only triggers reversal signals when the market is actually sideways.
Why Mean Reversion Signals Fire During Strong Trends And Stop Working
Range-reversal indicators print oversold signals in the middle of downtrends, and most traders take them anyway. Here's how one tool uses a stepped moving average to stay quiet until the market actually flattens.



















