Skip to content
Script type
Indicator
Source code
Open-source

Polynomial Regression Bands + Channel [DW]

A curve-fitted moving average for spotting trend turns early.

Difficulty Intermediate

No.VOW-000130

This indicator puts a lot on screen at once: a dotted curve, the solid Polynomial LSMA, upper and lower bands with fills, candles painted in four colors, a black background, and an equation label. You need to understand that the dotted lines are redrawn on every bar while the solid lines keep their confirmed values, and there are plenty of settings to learn, including the curve degree, the sample period and the switch to projected values, so it is rated intermediate. Once you settle on an order for reading it, it fits easily into your daily analysis.

Repainting
Backpaints
  1. Live barChanges
  2. On closeFixed
  3. HistoryBackpaints
The dotted polynomial regression curve and channel are redrawn across the last 100 bars on every new bar, but the Polynomial LSMA, bands and candle colors never repaint once the bar closes.
Best timeframes
  • Lower TFs≤15m
  • Mid TFs30m–4H
  • Higher TFs1D+
Tested on BTCUSD (1m, 5m, 15m, 30m, 1H, 4H, 1D, 1W)
Alerts
No
Buy/sell signals
Not providedN/A for analysis tools
Market conditions
Trending
Display
Overlay
Chart elements
LinesLabelsBar colorsBackground
Trading style
Swing TradingDay Trading
TrendVolatility

How to Read the Polynomial LSMA and Bands in “Polynomial Regression Bands + Channel”

Diagram gallery 9

Article Summary
What does this indicator do?
Bottom line

Polynomial Regression Bands + Channel is a trend indicator that fits a curve to the last 100 bars and records the curve's right end as an LSMA. It turns earlier than a straight-line moving average ahead of tops and bottoms, and its LSMA and bands never change on confirmed bars, making it a strong fit for traders who want to catch trend reversals early.

Tell me more
Key points
  • It fits a second-degree polynomial curve to the last 100 bars and plots the line connecting its right end as the Polynomial LSMA.
  • The white, cyan and pink dotted lines show the current fit and are fully redrawn across 100 bars every time a new bar prints.
  • The Polynomial LSMA, High Band, Low Band and candle colors do not change once a bar has closed.
  • Candles are painted in four colors based on whether the close is above or below the LSMA and whether it rose or fell from the prior bar.
  • The LSMA color shows the direction of the curve's right end, so red candles with a green LSMA still point to an intact uptrend.
  • Polynomial Order sets the curve degree and Regression Sample Period sets the number of bars fitted, letting you tune how fast it reacts.
  • Forecast From _ Bars Ago switches the LSMA to a track of projected values from a curve built a few bars back.
  • Colors can flip on thin moves, so pairing it with Elder's Force Index helps you check whether volume is behind each change.

Tracing the Bends a Straight Line Can’t: Polynomial Regression Bands + Channel

Ever feel like your moving average always reacts too late, right before a top or a bottom?

Polynomial Regression Bands + Channel is a TradingView indicator that fits a curve to recent price action and builds a moving average by connecting the right end of that curve.

A regular moving average averages past closes into a single line. This indicator doesn’t average anything. Instead, it fits a second-degree curve (think of a parabola) to the last 100 bars. Because the whole curve reshapes itself to match the price action, the line changes direction faster when the market starts to bend into a peak or a trough.

On the chart you get a curve drawn in white, cyan and pink dotted lines, the solid Polynomial LSMA that traces the curve’s right end over time, and upper and lower bands, all at once. It looks busy at first, but as the figure shows, every one of these lines branches off the same single calculation.

What You See on the Polynomial Regression Bands + Channel Chart

The dotted curve and the solid LSMA and bands come from the same calculation. The only difference is whether they draw the current shape or the trail of the right end.

What You See on the Polynomial Regression Bands + Channel Chart① Second-degree curve fitted to the last 100 bars Redrawn every new bar ② Connecting the curve’s right-end values gives the Polynomial LSMA ③ The same curve shifted up and down by 2 standard deviationsSecond-degree curve fitted to the last 100 barsRedrawn every new barConnecting the curve’s right-end valuesgives the Polynomial LSMAThe same curve shifted up and downby 2 standard deviationsSmoothed close

Vowars DE ver.3.23.2

Default settings (Regression Sample Period 100, Polynomial Order 2, Width Coefficient 2.0). The equation label is hidden.

LSMA stands for Least Squares Moving Average. TradingView’s built-in LSMA fits a straight line, while Polynomial Regression Bands + Channel lets you choose the degree of the curve, so you’re not limited to a straight line. That’s the key difference.

Polynomial Regression Bands + Channel on the 1-hour chart, showing the dotted polynomial regression curve, the Polynomial LSMA and standard deviation bands overlaid.
Polynomial Regression Bands + Channel on the 1-hour chart, showing the dotted polynomial regression curve, the Polynomial LSMA and standard deviation bands overlaid.

I switched through every timeframe on Bitcoin, from the 1-minute to the weekly, and the layout stayed the same on all of them. The background turns black and the candles are painted in four colors. Since the whole color scheme of the chart changes, it can feel like you’ve opened a different chart.

Telling the Lines and Colors Apart

There’s a lot on screen, so let’s first sort out what each element is.

ElementAppearanceMeaning
Polynomial regression curveWhite dotted line (last 100 bars on the right)The curve fitted to the last 100 bars. Redrawn every time a new bar prints
Upper and lower channelCyan and pink dotted linesThe white curve shifted up and down by 2 standard deviations
Polynomial LSMAThick solid line (green when rising, red when falling)A line connecting the curve’s right-end value recorded on each bar
High Band/Low BandThin green and red solid linesThe LSMA plus and minus 2 standard deviations
Band fillGreen above the LSMA, red belowFills between the High Band and the LSMA, and between the LSMA and the Low Band
Source / Smoothed Source ValueThin gray lineThe close used in the calculation. Smoothed close by default
Candle colorBright green, dark green, bright red, dark redSet by position relative to the LSMA and the change from the previous bar
Equation labelBlack label at the right edgeThe equation of the current curve and how many bars it’s shifted

How the Dotted Curve Relates to the Solid LSMA

The most important thing is the difference between the dotted and solid lines. The white dotted line is “the curve that best fits the last 100 bars as seen from the current bar” Figure 1. The Polynomial LSMA is what you get by recording the value at that curve’s right end (the current bar) one bar at a time Figure 2.

The cyan and pink dotted lines form a channel by shifting the white curve up and down by the same distance Figure 3. Recording that offset at the right end bar by bar gives you the solid High Band and Low Band.

The Four Candle Colors

Candle colors are not based on whether a candle is bullish or bearish. They come from a combination of two things: whether the close is above or below the Polynomial LSMA, and whether the close is higher or lower than the previous close. Check how they line up in the figure.

What the Four Candle Colors Mean

Candle color answers two questions: is the close above or below the LSMA, and is it higher or lower than the previous close?

What the Four Candle Colors Mean① Above the LSMA and higher than the prior bar→ bright green ② Above the LSMA but lower than the prior bar→ dark green ③ Below the LSMA, candles turn red Down bars bright red, up bars dark redAbove the LSMA and higher than the prior bar→ bright greenAbove the LSMA but lower than the prior bar→ dark greenBelow the LSMA, candles turn redDown bars bright red, up bars dark redThe LSMA turns red when it falls

Vowars DE ver.3.23.2

The dotted curve is hidden. Candle colors use the raw close, before smoothing.
Close positionVersus previous closeCandle color
Above the LSMAHigherBright green
Above the LSMAUnchanged or lowerDark green
Below the LSMALowerBright red
Below the LSMAUnchanged or higherDark red

The LSMA line itself also turns green when it rises above the previous bar’s LSMA and red when it falls below it Figure 3. Keep them separate in your head: candle color is bar-by-bar momentum, LSMA color is the direction of the curve’s right end.

The Black Background Comes From the Indicator

The chart background turns black because the indicator paints the background black on every bar. Only the area with candles turns black, while the empty space on the right keeps your original background color. The black background stays even if you change your chart theme, so keep an eye on how colors look when you stack other indicators on top.

Reading the Equation Label

The black label at the right edge shows the equation of the curve currently being fitted. For a second-degree curve it takes the form “a + bx + cx^2” with three coefficients. The line below shows how many bars the curve is shifted by Regression Offset.

The Polynomial Regression Bands + Channel equation label, showing the second-degree polynomial regression coefficients and the Regression Offset bar count.
The Polynomial Regression Bands + Channel equation label, showing the second-degree polynomial regression coefficients and the Regression Offset bar count.

You don’t need to read the exact coefficients. What matters is whether any coefficient in front of an x term has turned into 0. If you push the period or the degree too high, TradingView’s floating-point precision limit can round the higher-order coefficients down to 0. When that happens, it’s your cue to lower the period or the degree. The label is large and takes up a lot of screen space, so I found it handy to keep it hidden day to day and only turn it on when I change the settings.

How the LSMA and Bands Are Built

Now that you know what’s on screen, let’s dig into why it behaves this way with the figure. If the math doesn’t interest you, there’s no need to memorize it.

How the LSMA and Bands Are Built

Every line on the chart branches off one calculation: fitting a curve to the last 100 bars.

How the LSMA and Bands Are Built① The core of the calculation ② Only the right end is recorded each bar ③ Width = 100-bar dispersion Flow: Last 100 closes(Regression Sample Period 100) → Smooth with the Super Smoother(Data Smoothing Period 10) → Fit a 2nd-degree polynomial curve(Polynomial Order 2 · least squares) / 2 × std dev of the same 100 bars(Width Coefficient 2.0), Fit a 2nd-degree polynomial curve(Polynomial Order 2 · least squares) → Draw the curve as dotted lines(White, cyan, pink channel) / Curve's right-end value(Polynomial LSMA), 2 × std dev of the same 100 bars(Width Coefficient 2.0) → LSMA ± width(High Band / Low Band), Curve's right-end value(Polynomial LSMA) → LSMA ± width(High Band / Low Band)。Last 100 closesRegression Sample Period 100Smooth with the Super SmootherData Smoothing Period 10Fit a 2nd-degreepolynomial curvePolynomial Order 2 · least squares2 × std dev ofthe same 100 barsWidth Coefficient 2.0Draw the curveas dotted linesWhite, cyan, pink channelCurve's right-end valuePolynomial LSMALSMA ± widthHigh Band / Low BandThe core of the calculationOnly the right endis recorded each barWidth = 100-bar dispersion

Vowars DE ver.3.23.2

The small text shows the setting name and default value. Turning off Smooth Data Before Curve Fitting skips the smoothing step and uses the raw close.

First, the last 100 closes are smoothed with a filter called the Super Smoother. It’s a noise-reduction technique developed by John Ehlers, known for having less lag than a typical moving average. Stripping out the small jitter first keeps the curve fit from getting yanked around by a single long wick.

Next, a second-degree curve is fitted to those 100 smoothed values with least squares Figure 1. Least squares finds “the line that minimizes the sum of the (squared) distances to every bar”, the same idea behind linear regression and TradingView’s built-in LSMA. The difference is that it looks for a curve instead of a straight line.

The value at the right end of that curve becomes the bar’s Polynomial LSMA Figure 2, and adding and subtracting twice the dispersion (standard deviation) of the same 100 bars gives you the bands Figure 3.

How It Differs From Bollinger Bands

The band width is the standard deviation of the 100 values multiplied by Width Coefficient. The way the width is set is close to Bollinger Bands, but the centerline is the right end of the curve, not a simple moving average. So when the market starts to turn, the centerline changes direction first and the whole band tilts sooner.

Dotted Lines Are the Current Fit, Solid Lines Are the Confirmed Record

This is the part to keep in mind when using Polynomial Regression Bands + Channel. The dotted curve is “the fit as seen from the current bar”, so every new bar redraws the whole 100-bar curve from scratch.

The Curve Gets Redrawn, the LSMA Stays

The dotted curve is the fit as seen from the current bar, so it gets redrawn entirely as bars progress. The LSMA and bands keep their confirmed-bar values.

The Curve Gets Redrawn, the LSMA Stays[At one point (right edge at bar 225)]① At this point the curve slopes up [25 bars later]② 25 bars later, the whole curve is redrawn into a hump ③ Past LSMA and band values don’t change on a single barAt one point (right edge at bar 225)At this point the curve slopes up25 bars later25 bars later, the whole curveis redrawn into a humpPast LSMA and band valuesdon’t change on a single bar

Vowars DE ver.3.23.2

The same price action at bar 225 and bar 250. LSMA and band values up to bar 225 are identical in both panels.

The figure compares the same price action at bar 225 and at bar 250. The curve that looked like it was sloping up at bar 225 Figure 1 has been redrawn into a hump 25 bars later Figure 2. Meanwhile, the Polynomial LSMA and bands keep their confirmed-bar values exactly as they were Figure 3.

Use the Solid Lines for Trade Decisions

The dotted curve is a guide for reading the current shape of the market. Because its shape changes retroactively, looking at old dotted curves that hug price perfectly and concluding “this thing is spot on” is dangerous. Base your decisions on the Polynomial LSMA, High Band, Low Band and candle colors, which don’t change once the bar closes.

Note that on the bar that’s still forming, the LSMA and band values move as the close moves. That’s true of any moving average, and the values lock in at bar close.

How to Use It on the Chart

Polynomial Regression Bands + Channel isn’t an indicator that fires buy or sell signals. It shows you which way the curve is pointing and which side of the curve price is on. After using it for a while, I found that reading it in the following order made decisions easier.

1 Read the Bigger Trend From the LSMA Color

Start by checking whether the Polynomial LSMA is green or red. Green means the right end of the curve is pointing up, red means it’s pointing down. Because it uses a second-degree curve, when an uptrend starts losing steam and rolls into a top, the right end turns down earlier than a straight-line LSMA would.

2 Read Momentum Within the Trend From the Candle Colors

Next, look at the candle colors. This is where reading the LSMA color and the candle color separately pays off. As the figure shows, even if candles turn red during a pullback in an uptrend Figure 1, the uptrend is still intact as long as the LSMA stays green Figure 2.

Read Candle Color and LSMA Color Separately

Candle colors change bar by bar, but the LSMA color reflects the direction of the curve’s right end, so it holds until the trend changes.

Read Candle Color and LSMA Color Separately① Even if candles turn red on a pullback ② As long as the LSMA stays green the uptrend is intact ③ Where the LSMA turns red is a potential trend changeEven if candles turn red on a pullbackAs long as the LSMA stays greenthe uptrend is intactWhere the LSMA turns redis a potential trend change

Vowars DE ver.3.23.2

The dotted curve is hidden. The LSMA is green when it rises above the previous bar’s value and red when it falls below it.

On the flip side, when the LSMA itself turns red, it’s a sign the right end of the curve has turned down Figure 3. Treat it as a potential turning point in the trend, a moment to think about taking profits or stepping aside.

3 Use the Bands to Gauge How Far Price Has Stretched From the LSMA

The High Band and Low Band sit at twice the dispersion of the last 100 bars. Price doesn’t reach them very often. When it does, it’s a sign price has stretched well away from the curve. That said, in a strong trend price can ride the band for a long time, so fading the move just because price tagged a band is best avoided.

4 Use the Shape of the Dotted Curve to Read the Current Phase

Finally, look at the shape of the white dotted curve. If it’s concave down (a hump), the uptrend is slowing and starting to roll over. If it’s concave up (a bowl), the selloff is bottoming out and starting to turn up. Since the curve gets redrawn as new bars print, use it to get a feel for “what kind of market structure we’re in right now”, not for exact levels.

Reading Pullbacks and Rallies

In an uptrend, a pullback where the LSMA stays green and candles flip from red back to bright green is one piece of evidence that the uptrend is resuming. For a rally in a downtrend, it’s the mirror image. Don’t act on either one alone. Combine it with key levels such as recent swing highs and lows.

What Changes When You Tweak the Settings?

Polynomial Regression Bands + Channel has a lot of settings, but the ones that really change what you see are the calculation settings at the top.

Parameters
SettingDefaultSuggestedEffect
Input Source ValueclosecloseThe price the curve is fitted to. You can also pick hl2 and others if you prefer the midpoint of the high and low
Smooth Data Before Curve FittingOnOnWhether to smooth the data with the Super Smoother before fitting. Turning it off uses the raw close and adds more small wiggles to the LSMA and bands
Data Smoothing Period105–20Smoothing strength. Lower stays closer to price, higher is smoother but lags more
Regression Sample Period100Day trading 50–100, swing 100–200Number of bars the curve is fitted to. Shorter makes the LSMA react faster, longer reflects the bigger trend
Polynomial Order22 (3 for faster reactions)Degree of the curve. 1 is a straight line, 2 can form one hump or bowl, 3 can bend twice. Too high makes coefficients more likely to round to 0
Regression Offset00Number of bars to shift the curve values. Positive moves right, negative moves left
Width Coefficient2.01.5–2.0Band width (standard deviation multiplier). Lower makes price touch the bands more often
Forecast From _ Bars Ago00 (5–10 when testing)Uses the curve built from data up to the specified number of bars ago, extended to the current bar, for the LSMA and bands
Show Fitted CurveOnYour preferenceShows the white dotted line (the curve)
Show Fitted Channel HighOnYour preferenceShows the cyan dotted line (upper channel)
Show Fitted Channel LowOnYour preferenceShows the pink dotted line (lower channel)
Curve Drawing Step Size1010How many bars each dotted segment spans. Ignored when Auto Decide Step Size Instead is on
Auto Decide Step Size InsteadOnOnUses one-tenth of the period as the step so the curve spans the full period
Curve Update FrequencyContinuousContinuous (Close Only if the chart is slow)Updates the dotted lines on every tick or only at bar close. Does not affect the LSMA or band calculations
Channel High Line ColorCyanDefaultColor of the upper channel dotted line
Channel High Line Width31–3Width of the upper channel dotted line
Channel High Line StyleDottedDottedLine style of the upper channel (Solid / Dotted / Dashed)
Channel Middle Line ColorWhiteDefaultColor of the middle (curve) dotted line
Channel Middle Line Width31–3Width of the middle (curve) dotted line
Channel Middle Line StyleDottedDottedLine style of the middle (curve) dotted line
Channel Low Line ColorPinkDefaultColor of the lower channel dotted line
Channel Low Line Width31–3Width of the lower channel dotted line
Channel Low Line StyleDottedDottedLine style of the lower channel dotted line
Show Regression EquationOnOff for daily useShows the equation label
Equation Label Background ColorBlackDefaultBackground color of the equation label
Equation Label Text ColorWhiteDefaultText color of the equation label
Equation Label SizeLargeSmall–NormalText size of the equation label (Auto / Tiny / Small / Normal / Large / Huge)

Polynomial Order Controls How Easily the Curve Bends

Polynomial Order is the setting that changes the display the most. The figure fits the same price action with only the degree changed.

How Polynomial Order Changes the Curve

The same price action fitted with only the degree changed. Higher degrees bend more easily, pulling the LSMA at the right end closer to price.

How Polynomial Order Changes the Curve[Polynomial Order 1 (straight line)]① Straight line only, so after the drop the LSMA eases down slowly [Polynomial Order 2 (default)]② One hump fits, so the right end turns down fast in the decline [Polynomial Order 3]③ Two bends: the right end reacts to the bounce first and turns greenPolynomial Order 1 (straight line)Straight line only, so after the dropthe LSMA eases down slowlyPolynomial Order 2 (default)One hump fits, so the right endturns down fast in the declinePolynomial Order 3Two bends: the right end reacts tothe bounce first and turns green

Vowars DE ver.3.23.2

Regression Sample Period at the default of 100, equation label hidden. Each panel auto-scales its price axis.

Set it to 1 and you get a straight-line fit, so even after a sharp drop the LSMA only drifts down slowly Figure 1. At the default of 2 the curve can form one hump, so the right end turns down quickly partway through the decline Figure 2. At 3 the curve can bend twice, so it reacts to the latest bounce even earlier Figure 3.

Higher degrees react faster, but the curve also gets pulled around by small wiggles. At 4 and above the curve tends to overfit and its shape gets unstable, and the higher-order coefficients are more likely to round to 0. In my experience, 2 for everyday use and 3 when you want faster reactions is the comfortable range.

Regression Sample Period Sets How Much History the Curve Sees

Regression Sample Period is the number of bars the curve is fitted to. The figure compares 50 bars with the default of 100.

How Regression Sample Period Changes Curve Length and Responsiveness

Regression Sample Period is the number of bars the curve is fitted to. Shorten it and the curve only looks at recent bars, making the LSMA react faster.

How Regression Sample Period Changes Curve Length and Responsiveness[Regression Sample Period 50]① The dotted curve covers the last 50 bars ② After the drop, the LSMA flattens fast and briefly turns green [Regression Sample Period 100 (default)]③ The fit includes the big peak further back, so the LSMA keeps falling and stays redRegression Sample Period 50The dotted curve covers the last 50 barsAfter the drop, the LSMA flattens fastand briefly turns greenRegression Sample Period 100 (default)The fit includes the big peak further back,so the LSMA keeps falling and stays red

Vowars DE ver.3.23.2

Same price action in both panels. With Auto Decide Step Size Instead on, the dotted curve spans the number of bars you set.

At 50, the dotted curve only covers the last 50 bars Figure 1, and after the sharp drop the LSMA quickly flattened out and even turned green for a while Figure 2. At 100 the fit includes the big peak further back, so the LSMA keeps sliding while staying red Figure 3.

As a rough guide, use 50 to 100 for day trading where you want to follow short-term moves, and 100 to 200 for swing trading on the daily or 4-hour chart where you want to see the bigger trend. Keep in mind that a longer period makes the calculation heavier and makes higher-order coefficients more likely to round to 0.

Forecast From _ Bars Ago Switches to a Projected Track

Enter a number in Forecast From _ Bars Ago and the meaning of the LSMA and bands changes. The curve is built from data up to the specified number of bars ago, and the indicator records that curve extended to the current bar (the projected value).

Switching to a Projected Track With Forecast From

Enter a number in Forecast From _ Bars Ago and the LSMA and bands become a track of projected values: the curve from N bars ago extended to the current bar.

Switching to a Projected Track With Forecast From[Forecast From _ Bars Ago 0 (default)]① Right end of the curve built from data up to the current bar (normal LSMA) [Forecast From _ Bars Ago 10]② The curve from 10 bars ago extended to the current bar ③ Right after the drop, the projection stays high and the gap widensForecast From _ Bars Ago 0 (default)Right end of the curve built from dataup to the current bar (normal LSMA)Forecast From _ Bars Ago 10The curve from 10 bars agoextended to the current barRight after the drop, the projectionstays high and the gap widens

Vowars DE ver.3.23.2

Same price action: default on top, a 10-bar forecast below. The dotted curve is also drawn by extending the equation built from data up to 10 bars ago.

The top panel of the figure is the normal LSMA Figure 1. The bottom panel is the track of projected values from a curve built 10 bars ago and extended to the current bar Figure 2. Right after the sharp drop, the projection stays above price and the gap to actual price action widens Figure 3.

That gap tells you how far ahead your current settings can keep up with price. It works best as a testing tool when you’re dialing in the period and degree. Projected values are not a promise of future prices, so don’t use them as a trade trigger on their own.

Other Settings

Lower Width Coefficient and the bands get narrower, so price touches them more often. At the default of 2.0 price rarely reaches the bands, so if you want to use them as pullback or rally zones, try dropping it to around 1.5.

Regression Offset shifts the curve values left or right to build the LSMA and bands. Positive values move the curve to the right, negative values to the left. Leaving it at 0 is fine for normal use.

If the chart feels slow to load, set Curve Update Frequency to Close Only or turn off the dotted lines. Those dotted lines are the heaviest part for the chart, and turning them off doesn’t change the LSMA, the bands or the candle colors.

Setting Combinations by Use Case

Use caseRegression Sample PeriodPolynomial OrderWidth CoefficientRationale
Track direction quickly on lower timeframes5022.0Fewer bars for a faster LSMA
Standard for 1-hour to 4-hour charts10022.0Default settings. Read both the curve and the record
Catch tops and bottoms early10032.0The curve can bend twice, so it reacts to direction changes sooner
See the bigger trend on daily and above150〜20022.0Captures long-term highs and lows with a single curve
Use the bands as pullback and rally zones10021.5Narrower bands so price touches them more often

Whichever combination you pick, first load it on the symbols and timeframes you trade most, and check that the timing of the LSMA color changes matches your own trade frequency before relying on it.

Where It Shines and Where It Needs Extra Care

Polynomial Regression Bands + Channel is at its best when the trend bends from up to down or from down to up. Right before tops and bottoms, where straight lines tend to lag, the right end of the curve turns first, so you can spot trend reversals early. The same read works on assets like gold or stock indices that tend to run in big trends before turning.

Since the dotted curve traces the shape of 100 bars, I found the 1-hour to daily range the easiest to work with. On higher timeframes like the weekly, the 100-bar dispersion gets large after a strong trend and the bands widen a lot. On the weekly you can even see the Low Band stretch below 0, which makes the bands less useful as a reference.

Polynomial Regression Bands + Channel on the weekly chart, where the polynomial regression curve and Polynomial LSMA flip direction along long-term uptrends and downtrends.
Polynomial Regression Bands + Channel on the weekly chart, where the polynomial regression curve and Polynomial LSMA flip direction along long-term uptrends and downtrends.

On the other hand, low-range sideways markets need extra care. Price crosses back and forth over the LSMA, so the candle colors and the LSMA color flip at short intervals. The next section shows how to tell whether those color changes have real volume behind them.

Where It Helps

  • Because it fits a curve, it turns earlier than a straight-line LSMA right before tops and bottoms
  • The LSMA, bands and candle colors don’t change after bar close, so they work for backtesting
  • The dotted curve shows at a glance whether the market is forming a hump or a bowl
  • Degree and period let you fine-tune how fast it reacts
  • Forecast From _ Bars Ago lets you check for yourself how well the curve tracks price

What to Watch Out For

  • The dotted curve is redrawn every bar, so don’t judge from its past shape
  • In ranging markets, the candle colors and LSMA color flip frequently
  • Setting the period or degree too high can round coefficients to 0 and break the drawing
  • Showing the dotted lines is heavy and can slow down chart loading
  • It paints the background black, which may clash with other indicators’ colors

Is There Volume Behind the Color Change? Confirm It With Elder’s Force Index

Both the candle colors and the LSMA color are calculated from price alone. That means a small pullback on thin volume and a full-blown selloff on heavy volume get painted the same red. Polynomial Regression Bands + Channel alone can’t tell the two apart. So I added Elder’s Force Index (EFI) in a separate pane below. It multiplies the size of the price move by volume to show how much force is behind each bar.

Confirming the Reversal With Elder's Force Index

When the LSMA or candle color changes, Polynomial Regression Bands + Channel alone can't tell you whether volume is behind the move. Adding Elder's Force Index in a lower pane shows what's really driving the turn.

Confirming the Reversal With Elder's Force Index① Even if candles turn red on a pullback ② If EFI hovers near 0 selling pressure is weak ③ Where the LSMA turns red EFI drops well below 0Elder's Force Index (13)Even if candles turn red on a pullbackIf EFI hovers near 0selling pressure is weakWhere the LSMA turns redEFI drops well below 0LSMA turns red

Vowars DE ver.3.23.2

Elder's Force Index at its default setting (length 13). The dotted curve in the upper pane is hidden.

In the pullback on the left side of the figure, the candles turn red Figure 1, but EFI stays near 0, so the selling pressure isn’t strong Figure 2. On the right, where the LSMA turns red, EFI also drops well below 0, showing that the selling is backed by volume Figure 3.

There are only two things to read. If candles turn red but EFI stays near 0, treat it as a temporary pullback and wait. If EFI moves far away from 0 around the bar where the LSMA color flips, treat it as confirmation of the trend change. Direction from the LSMA color, conviction from EFI: being able to split the roles like that is what makes this pairing work.

Not Available on Symbols Without Volume

Because Elder’s Force Index uses volume in its calculation, it throws an error and won’t display on symbols where no volume data is provided. On forex and CFD symbols, also keep in mind that whether volume exists, and what it represents, depends on the data provider.

Here are a few other indicators that look like a good match.

  • Volatility Stop places a stop an ATR-based distance away from price and flips direction when price breaks through it. Polynomial Regression Bands + Channel has no exit guide of its own, so this gives you a reference for locking in profits or placing stops while the LSMA is green.
  • Williams Alligator tells ranges from trends by whether its three smoothed lines are tangled or fanned out. If you make a rule not to trade candle color flips while the lines are tangled, the color whipsaws in ranging markets will throw you around much less.

Things to Know Before You Use It

Polynomial Regression Bands + Channel has no built-in buy or sell signals or alert conditions. If you want notifications, pick this indicator in the “Condition” field of TradingView’s Create Alert dialog, and you can set alerts on things like price crossing the Polynomial LSMA or the bands.

Because the dotted curve gets redrawn as bars progress, what you see on a historical chart is different from what you would have seen in real time. When backtesting, use the LSMA, bands and candle colors, which don’t change after the bar closes. If you step through bars one at a time in Bar Replay, you can watch the curve being redrawn and the LSMA being recorded side by side. Heavy settings can make Bar Replay slow to load, though.

If the calculation takes too long, the chart may show an error. In that case, try these in order: reload the chart, turn off the dotted lines, set Curve Update Frequency to Close Only, then lower the period or degree.

Never Trade Any Indicator on Its Own

The Polynomial LSMA color and band touches are just inputs for reading market conditions. There’s no guarantee the fit that worked so far will keep working. Decide your stop placement and position sizing first, and use it together with other evidence. This article is not investment advice.

For Traders Who Want to See Moving Averages as Curves

Polynomial Regression Bands + Channel takes the moving average idea one step further: it fits a curve to recent price action and records the curve’s right end. You get a two-layer read: the dotted curve for the current shape of the market, and the solid Polynomial LSMA plus candle colors for direction and momentum.

Polynomial Regression Bands + Channel [DW]

There’s a lot on screen, but once you remember that dotted lines are “the current fit” and solid lines are “the confirmed record”, it’s easy to read. If moving-average lag around tops and bottoms bugs you, start by loading it with the default settings on the 1-hour or 4-hour chart and compare when the LSMA changes color with your usual moving average.

Sources: This article is based on hands-on testing and in-depth analysis of the indicator Polynomial Regression Bands + Channel [DW] by DonovanWall on the charting platform TradingView.

Disclaimer: This article summarizes our own testing and analysis of how an indicator published on TradingView works and behaves. The symbols, timeframes, and settings used here were chosen to check how the indicator displays—they are not a recommendation to trade those instruments or to use the suggested settings. Indicators can change when their authors update them, so this article reflects the version we tested. All investment decisions are your own.

Never miss a new indicator
Get Vowars in Google search, a browser alert on publish, or updates on X.
YUZURU
AuthorYUZURUFounder & Reviewer, Vowars
View profileClose

An editor for content sites at a web agency, I started trading crypto in 2018. Working my way from spot to futures got me hooked on chart analysis, and I now build my own custom indicators on TradingView. On Vowars, I test TradingView indicators one by one on my own charts and review everything from the math behind them to how to use them and where they fall short, with custom visuals throughout.…

Created by

Vowars Picks

Stochastic Heat Map

“Stochastic Heat Map” Tested: Bottom-to-Top Color Shifts That Show How Real a Move Is

"Stochastic Heat Map" is an oscillator that stacks 28 Stochastics with lengths from 10 to 280 as colors, showing where price sits in its range on every lookback at once. The way color spreads from the bottom rows to the top tells you how strong a move is, but red stays pinned in strong trends, so it works best with direction handled separately by something like an EMA.

DifficultyIntermediate 8 figures

CME Institutional Order Flow & AMT Lens

Auction Market Theory on One Chart: An Indicator That Flags Volume Absorption by Color

“CME Institutional Order Flow & AMT Lens” is a TradingView indicator that combines a volume profile, candle coloring, shelves, and a dashboard in one. It gives no buy or sell signals and instead automatically marks key prices such as the POC and Value Area.

DifficultyAdvanced 7 figures

Fibonacci Trend Continuation Signals [AlgoAlpha]

Measure Pullback Depth Inside a Trend With “Fibonacci Trend Continuation Signals”

"Fibonacci Trend Continuation Signals" is a free TradingView indicator that automatically draws a Fibonacci range in the direction of the trend and prints a continuation signal the moment price starts moving again after a pullback or bounce. It gives you an objective read on pullback depth.

DifficultyIntermediate 5 figures

Smart Trader, Episode 06, Isotropic Trend Lines

Isotropic Trend Lines: Measuring Trend Strength with a Volatility-Adjusted Angle

Isotropic Trend Lines is a channel indicator that puts price on a log scale and divides it by volatility (σ) to produce a trend angle that does not depend on chart scaling. On one screen you get direction, strength, and position in the channel, plus breakout and retest status.

DifficultyIntermediate 10 figures

Strong Burst Fader

Strong Burst Fader: Measure Overextension with Diamond Stacks and Color for Mean-Reversion Fades

“Strong Burst Fader” measures how far the wick pokes outside a hidden moving average plus ATR band and shows that depth as diamond stack height and color, making it a mean-reversion indicator for fading overextended moves. The taller and redder the stack, the deeper the overshoot, and the best setups come when the burst stops at one stack and price closes back inside the band.

DifficultyBeginner 9 figures

Divergence for Many Indicators v4

Divergence for Many Indicators v4 : How to Read Divergence Across 10 Indicators in One Label

"Divergence for Many Indicators v4" is a TradingView indicator that detects divergence across 10 indicators, including RSI and MACD, and shows how many line up in a single label. Signals come early, but only the last one survives within the same swing. It works best once you've defined market direction.

DifficultyIntermediate 6 figures

Browse by goal

1 / 5