A standard deviation channel expects price to poke outside it now and then. The Raff Regression Channel takes the opposite view. It fits the same best-fit line through the last N bars, then pushes its edges out to the farthest candle in the window, so the channel holds the whole trend. Its edges are the trend's own extremes, and price testing one is price testing the furthest it has gone.
- Takes
- Nothing. It reads its series' candles
- Gives
- A trend line with edges at the window's extremes, plus its slope, width, fit and touches
- Reach for it
- You want a trend's outer limits, not its statistical spread
How it works
The midline is fitted exactly as in the Linear Regression Channel: a least-squares line through the Midline Source (the close by default) over Lookback Bars. Only the width is different. Instead of counting standard deviations, the node looks at every candle in the window, measures how far it reaches above and below the line, and sets the edges at the farthest reach.
Boundary decides what a reach is. Candle Bodies, the default, measures from the top and bottom of each body, so wicks can stick out past the edges. Candle Wicks measures from the highs and lows, so nothing in the window crosses the channel.
Symmetry decides how the two sides relate:
| Symmetry | Upper edge | Lower edge | Midline |
|---|---|---|---|
| Symmetric (default) | Line plus the larger of the two reaches | Line minus the same distance | The regression line |
| Asymmetric | Line plus the farthest reach above | Line minus the farthest reach below | Halfway between the edges |
Mind the last column. In Asymmetric mode the midline is the middle of the channel, not the regression line, so it can sit above or below the fit. Slope is the regression line's slope in both modes. For the same lookback and source, Slope and R-Squared (Fit) come out exactly as they do on the Linear Regression Channel; only the edges and the width differ.
As with the other channel, every line comes twice. The Completed lines are the channel at the last completed bar. The Projected lines, marked (Live), extend it one bar into the bar that's forming. Compare Current Price with the Projected ones.
Why there's no breakout output
The channel is drawn to contain its window, and the window includes the bar that just closed. With Candle Bodies, that bar's close is inside the completed channel by construction; with Candle Wicks, the whole bar is. A close beyond a channel it helped draw can't happen, so this node has no Breakout Above or Below.
To catch a break, ask about the bar that's forming instead. Projected Upper Band (Live) is the channel carried one bar ahead, so price trading above it has gone further from the trend line than anything in the window. For the moment it happens, use a Crossover on the Intrabar clock.
Touches
Touched Upper Band is true for the bar after a candle whose high reached the upper edge, and Touched Lower Band likewise for a low. What that means depends on Boundary. With Candle Bodies, it's a wick reaching past the farthest body in the window. With Candle Wicks and no tolerance, it fires only when the bar that just closed is the one that set the edge: the trend has printed a new extreme relative to its own path. Touch Tolerance (a share of the channel's width) relaxes both.
The touch counts work as on the Linear Regression Channel: touches across the window against the current edges, counted once per pullback under Retrace Required, or every bar under Raw (Every Bar).
Example: buy the break of a falling channel
Say you trade NQ 15m and watch for downtrends that end in a break: price getting further above the falling trend line than any bar in the last 50 managed.
Add a Raff Regression Channel with Lookback Bars at 50, Boundary on Candle Wicks so the edges are the true extremes, and Symmetry on Symmetric. Wire Slope into a Comparison, Less Than a Constant of 0, so the channel is falling. Wire Current Price into a of a Crossover and Projected Upper Band (Live) into b, direction Above, on the Intrabar clock. AND the two through a Logic node into a long Entry, and measure the Bracket Order's stop from the Signal bar, 2 points under its low.
The entry fills on the first trade above the projected edge, even if that bar later closes back inside.
Settings
Load Preset has four starting points: Standard Symmetric Raff (the defaults), Asymmetric Body Extremes, Fast Breakout Raff (Fuzzy) with 20 bars and a 5% tolerance, and Macro Asymmetric Raff with 100 bars, the OHLC/4 average, wick edges and an 80% reset.
Outputs
Use something else when
When it doesn't behave
I can't find a breakout output
There isn't one, and it isn't an oversight: the completed channel always contains the bar that just closed. Compare Current Price with Projected Upper Band (Live), or use an intrabar Crossover on it, as in the example.
One spike makes the channel huge for 50 bars
The farthest point sets the width, so a single news bar stretches the channel until it leaves the window, Lookback Bars later. Candle Bodies shrugs off a spike that was mostly wick. If one bar shouldn't dominate, the Linear Regression Channel's width is an average over the window instead of a maximum.
The touch counts are always 0 or 1
That's Candle Wicks with no tolerance. Only the bar that set the extreme sits on the edge, so there's little else to count. Give Touch Tolerance a few percent (the Fast Breakout preset uses 5%) or switch Boundary to Candle Bodies, where wicks can reach past the edges.
The midline isn't on the regression line
Symmetry is set to Asymmetric, where the midline is the middle of the two edges. Switch to Symmetric if you want the fitted line itself.
Going further
Raff's width is an honest measure of the trend's worst excursion, which makes it useful beside the Linear Regression Channel rather than instead of it. A Raff channel much wider than a 2-deviation channel on the same window suggests one or two bars went far outside the usual scatter; one close to it suggests the trend has been unusually tidy.
The settings that matter (lookback, boundary and symmetry) are choices about what you think a trend's edge is, so make them before you look at results. Channels sweep through presets: save each version you want to compare as one, keep the list short, and remember that each one tested counts as another strategy tried.