Skip to content
Script type
Indicator
Source code
Open-source

Function Polynomial Regression

Fits an arc to 10 swing points to read trend bend and swing range.

Difficulty Intermediate

No.VOW-000135

It only plots five lines, one curve and two pairs of bands, and has no buy or sell signals, so the chart stays clean. To read it correctly, though, you need to know that the curve is calculated from the last 10 swing highs and lows, that the earlier part of the curve is redrawn every time a new swing is added, and that it doesn't update on its own while the chart stays open. It's rated intermediate on the assumption that you understand these drawing behaviors and how to choose degree and length.

Repainting
Repaints
  1. Live barChanges
  2. On closeChanges
  3. HistoryChanges
Every time a new swing high or low is confirmed, the curve and bands are recalculated from the latest 10 swings, so the line repaints on past bars as well, not just on the current bar.
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
Lines
Trading style
Swing TradingDay Trading
Support & ResistanceTrend

“Function Polynomial Regression” Turns Swing Highs and Lows Into a Curve That Shows a Fading Trend

Diagram gallery 9

Article Summary
What does this indicator do?
Bottom line

Function Polynomial Regression fits an arc to the last 10 swing highs and lows, showing trend acceleration and deceleration as a shape on your chart. Because the curve stops at the last swing and redraws as new swings form, it works best for checking the market's shape at the moment you open the chart.

Tell me more
Key points
  • It fits a polynomial regression curve to the last 10 swing highs and lows and draws a center line with bands on the chart.
  • The slope and bend of the solid blue line show whether a trend is accelerating or losing steam.
  • The dashed aqua lines show the average deviation from the curve and work as a guide to the normal swing range.
  • The dotted purple lines touch the most extreme swings, and their upper and lower widths are set independently.
  • Swings are detected by comparing two bars on each side and confirm once two bars have closed to the right.
  • degree 1 gives a straight line and the default of 2 gives an arc that bends once, so you can pick what you want to see.
  • Every new swing triggers a full redraw of the curve, and it does not update on its own while the chart stays open.
  • There are no buy or sell signals or alerts, so pairing it with a bar-by-bar indicator like the Fisher Transform helps.

Function Polynomial Regression: An Indicator That Draws a Curve Through Swing Highs and Lows

A trend can look healthy on the surface while it quietly runs out of steam, or it can be speeding up. Staring at a moving average, it’s hard to tell which. That “bend” in the trend is what this indicator is built to show.

Function Polynomial Regression is a TradingView indicator that grabs the 10 most recent swing highs and lows on your chart and fits a curve through them. The math behind it is polynomial regression, and the easiest way to think of it is a regression line that’s allowed to bend.

Function Polynomial Regression on a 15-minute TradingView chart, tracing an arc through the swing highs and lows after a sharp sell-off.
Function Polynomial Regression on a 15-minute TradingView chart, tracing an arc through the swing highs and lows after a sharp sell-off.

It plots five lines in total: one center curve and two pairs of bands around it. The slope and bend of the curve tell you how the trend is changing, while the bands show the “normal” swing range and the largest recent overshoot. There are no buy or sell signals. This is an analysis tool that cleans up the shape of the market for you.

The five lines Function Polynomial Regression draws

It fits a quadratic curve to the last 10 swing highs and lows, then draws a center line and two types of bands.

The five lines Function Polynomial Regression draws① Solid blue line Curve through the middle of the swings ② Dashed aqua lines Average deviation ③ Dotted purple lines Touch the furthest swing lowSolid blue lineCurve through the middleof the swingsDashed aqua linesAverage deviationDotted purple linesTouch the furthest swing low

Vowars DE ver.3.23.2

The solid blue line is the center curve, the dashed aqua lines show the average deviation, and the dotted purple lines reach out to the furthest swing high or low. The curve ends at the last confirmed pivot and does not extend to the current bar.

For this review I loaded it on Bitcoin across eight timeframes, from the 1-minute to the weekly. Every timeframe shows the same five lines; the only thing that changes is how much history the curve covers.

What the Five Lines Mean

Let’s start by going through what each of the five lines represents.

The Solid Blue Line Runs Through the Middle of the 10 Swings

The thick solid blue line is the star of the show. It’s the curve that best fits the last 10 swing highs and lows, meaning the one with the smallest overall error Figure 1. With the default settings it’s a quadratic, so you get an arc that bends just once.

Look closely and you’ll see the curve is actually a series of short straight segments joined together. It’s split at each swing point and drawn with up to nine segments, so where the swings are spaced far apart the curve can look a bit angular.

The Dashed Aqua Lines Show the Average Deviation

The dashed aqua lines above and below the blue curve take the average distance between the 10 swing points and the curve, and add it equally on both sides Figure 2. Unlike Bollinger Bands, this isn’t a standard-deviation band; it’s the plain average of how far the pivots sit from the curve. Read it as “recent swings usually land about this far from the curve.”

The Dotted Purple Lines Touch the Most Extreme Swing

The outermost dotted purple lines mark the distance to the point furthest above the curve and the point furthest below it Figure 3. They always touch one of the swing points used in the calculation, so they act like a record of the biggest overshoot among the last 10 pivots.

Because the top and bottom are set independently, the two widths rarely match. When a single high spikes out, only the upper purple line widens Figure 1. The lower line is set by the deepest swing low Figure 2, and it’s the aqua lines that stay equally wide on both sides Figure 3.

The purple bands can be lopsided

The outer purple lines stretch to whichever of the 10 pivots sits furthest from the curve.

The purple bands can be lopsided① Upper line touches the spike high ② Lower line touches the deepest low ③ Aqua lines are equally wide on both sidesUpper line touchesthe spike highLower line touches the deepest lowAqua lines are equallywide on both sides

Vowars DE ver.3.23.2

The upper side is set by a single spiking high and the lower side by the deepest swing low, so the two widths don't match. The aqua lines use the average deviation, so they stay equally wide above and below.

You’ll see this lopsided look on live charts all the time. On the 4-hour chart in this example, the upper line stretched to meet the high of a big pump candle, while the lower line sat close to the aqua band. When the purple band is wide on just one side, it tells you there’s one swing on that side that moved much further than the rest.

Function Polynomial Regression on a 4-hour chart, where only the upper purple band widens, creating asymmetric bands.
Function Polynomial Regression on a 4-hour chart, where only the upper purple band widens, creating asymmetric bands.
LineStyleWhat it showsHow to read it
Solid blue lineThick solid lineCurve fitted to the last 10 swing highs and lowsSlope shows direction, bend shows momentum shifts
Dashed aqua linesThin dashed lines (upper and lower)Average deviation from the curveGuide to the normal swing range. Same width on both sides
Dotted purple linesThin dotted lines (upper and lower)Distance to the swing furthest from the curveLargest overshoot among the last 10 pivots. Width can differ above and below

The Curve Is Built From Just 10 Confirmed Swing Points

The most important thing to understand here is what the curve is actually built from. It doesn’t use the close of every bar. It picks highs that are higher than the two bars on each side as swing highs, lows that are lower as swing lows, and keeps only the 10 most recent Figure 1.

Each time a new swing high or low appears, the oldest one gets pushed out Figure 2. The small up-and-down moves between pivots aren’t part of the calculation, so even in a wick-heavy market the curve doesn’t get yanked around by every single candle.

There’s one more detail: a swing high or low only confirms once two bars have closed to its right Figure 3. That means the curve doesn’t end at the current bar; it stops at the last confirmed pivot. That’s why you’ll usually see a gap of a few bars between the right edge of the chart and the end of the curve.

The 10 swing points behind the curve

A bar higher than the two bars on each side becomes a swing high, a lower one a swing low, and only the 10 most recent are used.

The 10 swing points behind the curve① Swing high = higher than the 2 bars on each side ② Pivots older than the 10th drop out of the calculation ③ The latest low confirms after 2 bars close to its rightSwing high = higher thanthe 2 bars on each sidePivots older than the 10thdrop out of the calculationThe latest low confirmsafter 2 bars close to its right

Vowars DE ver.3.23.2

Filled dots are the 10 pivots in use; hollow dots are older pivots that have already dropped out. Every time a new pivot is confirmed, the oldest one is pushed out.
Swing detection works much like Williams Fractals

Comparing two bars on each side to define a swing high or low is essentially the same idea as TradingView’s built-in Williams Fractals. If you already run fractals on your chart, think of it this way: the highs and lows marked by those fractals are what the curve is built from. Since highs and lows sit in the same list, the curve runs roughly between the swing highs and the swing lows.

How to Read the Curve and Bands on Your Chart

When you look at a live chart, run through these three checks in order.

1 How is the slope of the curve changing?

Start with the slope of the blue curve. A steep slope means highs and lows are stepping up (or down) quickly Figure 1. If the curve starts to flatten during an uptrend, that’s a sign the higher highs and higher lows are losing steam Figure 2.

You can read slope off a moving average too, but because Function Polynomial Regression fits an arc to the swing points alone, acceleration and deceleration show up directly in the shape of the line. After a sell-off, if the curve forms a visible bottom and its right side starts turning up, that’s the moment to start suspecting a shift from a bottoming market into a relief rally.

Reading momentum from the curve's slope

When the blue curve flattens, the higher highs and higher lows are losing steam.

Reading momentum from the curve's slope① Steep early on: highs and lows step up fast ② Later the slope flattens and goes almost sideways ③ Bars after the last low aren't in the curve yetSteep early on:highs and lows step up fastLater the slope flattensand goes almost sidewaysBars after the last lowaren't in the curve yet

Vowars DE ver.3.23.2

The curve climbs steeply at first, then levels off. Bars to the right of the last swing low aren't in the calculation yet, so the sharp breakout at the end isn't reflected in the curve.

On the 5-minute chart I caught a clean dome-shaped arc rolling over from up to down. Even when price action still “looks like it wants to go higher,” a curve that has already peaked and turned lower is a good cue to step back and take a breath.

Function Polynomial Regression on a 5-minute chart, with the curve and bands forming a dome as the trend rolls over from up to down.
Function Polynomial Regression on a 5-minute chart, with the curve and bands forming a dome as the trend rolls over from up to down.

2 Where is price sitting within the bands?

Next, check where price is relative to the bands. Inside the aqua lines is the “normal” swing range; the purple lines mark the most extreme point among the last 10 pivots.

  • In an upward arc, a swing low that holds near the lower aqua line is a candidate to buy the dip
  • In a downward arc, a swing high that stalls near the upper aqua line is a candidate to sell the rally
  • A move that stretches close to a purple line is on the overextended side for recent swings. It works as a guide for when to start thinking about taking profit
  • A move that blows well past a purple line is outside the range of the last 10 pivots. Once the next swing confirms, there’s a good chance the shape of the curve will change

3 Check the bars after the last pivot yourself

Finally, look at the bars to the right of where the curve ends. That stretch isn’t in the calculation yet, so the curve can’t tell you anything about it Figure 3. Extend the curve’s direction by eye and see which side of that projection the current bar is on. That gives you something to go on when judging whether the trend is still intact.

Use the curve as context, not as a signal

Function Polynomial Regression isn’t built to give entry or exit signals. Use the direction of the curve and price’s position in the bands to frame “what the market looks like right now,” and get your actual entry trigger from price action or another indicator.

Switching Between a Straight Line and an Arc With degree

degree sets the order of the polynomial, which is basically “how many times the curve is allowed to bend.” The default is 2, which gives you an arc that bends once. Set it to 1 and you get a straight line, the same idea as a regression line fitted to the swing points.

With the same swing points, a degree of 1 shows only the overall slope as a single straight line Figure 1, while 2 also captures the bend from a bottom into an uptrend Figure 2. In my testing, the split that worked best was 1 when you only care about trend direction and 2 when you also want to see momentum shifts.

degree switches between a line and an arc

Same 10 pivots, different center line, depending on degree.

degree switches between a line and an arc[degree 1 (straight line)]① Shows only the overall slope as a straight line [degree 2 (default)]② Bends once, from a bottom into an uptrenddegree 1 (straight line)Shows only the overallslope as a straight linedegree 2 (default)Bends once, from abottom into an uptrend

Vowars DE ver.3.23.2

degree 1 works like a regression line and shows only the overall slope. The default, degree 2, gives an arc that bends once, so the shift from a bottom into an uptrend shows up in the shape of the line itself.
A word of caution on degree 3 and higher

You can type in 3 or higher. However, this indicator feeds the raw bar number, counted from the left edge of the chart, straight into the curve calculation. When I reproduced the same calculation myself, once bar numbers got into the thousands the extra bend of a 3rd-degree curve almost disappeared and it looked nearly identical to degree 2. The more bars your chart has loaded, the more likely a setting of 3 or higher won’t give you the shape you expect. Sticking to 1 and 2 is the safer bet.

Changing How Far Back the Curve Looks With length and fractal_size

Two settings control how much history the curve covers. length is the number of swing points used, and fractal_size is the number of bars compared on each side when detecting a swing.

By default it uses 10 small swings, so the curve only looks back a few dozen bars Figure 1. Raising length to 20 doubles the number of pivots, and in my test the whole sell-off from the previous major high fit into a single arc Figure 2.

Set fractal_size to 5 and only bars higher (or lower) than the five bars on each side count as swings. Minor waves get filtered out, so even with the same 10 pivots they’re spaced further apart, and the entire move from rally to decline became one big arc Figure 3. Keep in mind that each swing then needs five bars to its right to confirm, so the right end of the curve lags by that much more.

Two ways to widen the curve's lookback

You can either use more pivots (length) or make the pivot test stricter (fractal_size).

Two ways to widen the curve's lookback[Default (length 10, fractal_size 2)]① 10 small pivots cover roughly the last 25 bars [length 20]② 20 pivots stretch it to about 60 bars [fractal_size 5]③ Major pivots only: about 100 bars become one arcDefault (length 10, fractal_size 2)10 small pivots coverroughly the last 25 barslength 2020 pivots stretch itto about 60 barsfractal_size 5Major pivots only: about100 bars become one arc

Vowars DE ver.3.23.2

Both make the curve cover a longer stretch. The bar count depends on how the market moves; in this example the default covered about 25 bars, length 20 about 60, and fractal_size 5 about 100.
Stick to 10, or multiples of 10 like 20 and 30, for length

The curve and bands are drawn with up to nine connected segments. If you set length to something that isn’t a multiple of 10, like 15, the segments get assigned unevenly and the newest stretch or some middle stretches may not be drawn, leaving gaps in the curve. I reproduced this as well: at 15, the segment connecting the most recent swings was missing. If you go above 10, use 20, 30 and so on, and the curve stays connected from start to finish.

Settings

There are six inputs in the settings panel. The input names are shown exactly as the variable names in the script.

Parameters
SettingDefaultSuggestedEffect
length1010 (20 or 30 for a longer view)Number of swing points used for the curve. Higher values capture a longer stretch in one arc and tend to widen the bands. Above 10, use multiples of 10 so the curve isn’t broken
degree22 (1 for slope only)Order of the curve. 1 gives a straight line, 2 an arc that bends once. 3 or higher tends to be unstable on charts with many bars loaded
fractal_size22–5Number of bars compared on each side to detect a swing. Higher values keep only prominent swings and lengthen the curve’s lookback, but delay swing confirmation
_pr_mid_colBlueDefaultColor of the center curve (solid line)
_pr_std_colAquaDefaultColor of the dashed lines showing the average deviation
_pr_max_colPurpleDefaultColor of the dotted lines showing the distance to the most extreme swing

Suggested Settings by Use Case

These are the combinations that worked well for different goals in my testing. Swing spacing depends on how the market is moving, so treat them as a starting point.

Goallengthdegreefractal_sizeWhy
See how recent small swings are bending1022Default. For day trading, tracks momentum shifts over the last few dozen bars
See the shape of a bigger move2022Uses more pivots so the arc reaches back to the previous major high or low
Spot major tops and bottoms1024–5Ignores minor waves and fits the arc to major swings only
Check trend direction only10–2012No bend, just the direction of the swing sequence as a straight line

How It Looks on Different Timeframes

I ran it on the 1-minute, 5-minute, 15-minute, 30-minute, 1-hour, 4-hour, daily and weekly charts. Since the curve always covers “10 swings,” the lower the timeframe, the shorter the window. On the 1-minute it covered a little under an hour; on the weekly, more than six months of price action became a single arc.

Function Polynomial Regression on a weekly chart, drawing more than six months of price action as a U-shaped arc with its bands.
Function Polynomial Regression on a weekly chart, drawing more than six months of price action as a U-shaped arc with its bands.

On higher timeframes like the weekly, you get a big U-shape from bottom to recovery, which makes it easy to confirm the market’s larger phase with a single line. On lower timeframes, swings get replaced quickly and the shape of the curve changes just as fast.

As I’ll cover below, this indicator doesn’t redraw the curve on its own while the chart stays open. With that in mind, I found it pairs best with day and swing trading on the 30-minute to 4-hour charts, where you naturally re-check the shape each time you open the chart, and with reading the market’s phase on the daily and above.

How It Differs From the Linear Regression Channel

When you hear “regression,” TradingView’s built-in Linear Regression Channel probably comes to mind. Both draw bands above and below a fitted line, so they look alike, but they’re built from different data and their bands mean different things.

ComparisonFunction Polynomial RegressionLinear Regression Channel
Input dataHighs and lows of the last 10 swing pointsCloses of a fixed number of recent bars
Center lineArc that bends once by default (can be set to a straight line)Straight line
Band widthTwo types: average deviation, and distance to the most extreme swingA multiple of the standard deviation
Right endStops at the last confirmed swingExtends to the current bar

The Linear Regression Channel uses a fixed bar count, so it treats quiet and volatile stretches as the same number of bars. Function Polynomial Regression is defined by the number of swings instead: in a market with big, widely spaced waves it naturally looks further back, and in a market full of small waves it looks at a shorter window. If you want to read the market’s shape in terms of “number of waves,” I think this one is the better fit.

Three Situations Where It Helped

After using it for a while, these are the situations where Function Polynomial Regression actually helped my decision-making.

1 Before buying a dip, check that the upward arc is still intact

When waiting to buy a pullback in an uptrend, if the curve is still a rising arc and price drops to around the lower aqua line, that’s a dip worth watching. If the curve has already flattened, or has peaked and turned down, it’s a hint that this may be a correction near the top rather than a dip to buy.

2 Use the recent overshoot as a take-profit guide

The purple line on the side of your open position marks the furthest point reached among the last 10 swings. A move that gets there has stretched a lot by recent standards, which made it a handy level for scaling out part of the position.

3 Spot a sideways market by how flat the curve is

In a range, swing highs and lows keep hitting similar levels, so the curve goes almost flat and the bands spread out comfortably above and below. While the curve stays flat, treat it as a market with no clear direction, and wait for higher lows and higher highs to tilt the curve upward before jumping on the trend.

It feels better suited to day trading and swing trading, where you can wait for a few swings to confirm, than to scalping, where you’re reacting bar by bar.

Drawing Quirks Worth Knowing

When New Swings Are Added, the Past Curve Gets Redrawn Too

Function Polynomial Regression recalculates the curve and bands from scratch every time the set of 10 swings changes. Just two new pivots can turn a curve whose right end was almost flat Figure 1 into an upward arc over the very same stretch Figure 2. As old swings drop out, the start of the curve also shifts to the right Figure 3.

When new pivots confirm, the whole curve is redrawn

Every time the 10 pivots change, the indicator recalculates the curve and bands from scratch.

When new pivots confirm, the whole curve is redrawn[Before the new pivots]① Right end is still almost flat [After two new pivots]② The same stretch is redrawn as an upward arc ③ Old pivots drop out and the curve's start shifts rightBefore the new pivotsRight end is still almost flatAfter two new pivotsThe same stretch is redrawnas an upward arcOld pivots drop out andthe curve's start shifts right

Vowars DE ver.3.23.2

Top: as of bar 70. Bottom: as of bar 82. Just two new pivots changed the shape of the curve over the earlier stretch as well. The curve you see on historical bars may not be the curve that was visible in real time.

This is simply how a regression curve works, and it’s a different thing from a buy or sell signal appearing and disappearing. Still, a clean-looking curve on historical bars isn’t necessarily the curve you would have seen in real time, and that’s worth keeping in mind. When you look back and think “I should have bought the bottom of the curve,” also check when that bottom actually confirmed.

While the Chart Is Open, the Curve Keeps Its Shape From Load Time

The other quirk is update timing. When the chart loads, the indicator calculates every historical bar and draws the curve, then keeps updating it until the bar that was forming at load time closes Figure 1. From the next bar on, new swings are still being recorded, but the curve itself isn’t redrawn Figure 2.

When the curve gets redrawn

The curve and bands are drawn when the chart loads, and while it stays open they only update on the bar that was forming at load time.

When the curve gets redrawn① This is as far as the curve updates live ② Newly confirmed pivots are not reflected Flow: Open the chart / switch timeframe change an input / reload → All historical bars are calculated(Curve and bands drawn from the latest 10 pivots) → The bar forming at load time(The curve keeps updating until this bar closes) → From the next bar on(Pivots keep being recorded, but the curve stays put) → Want the latest shape?(Force a recalculation), Want the latest shape?(Force a recalculation) → Open the chart / switch timeframe change an input / reload。Open the chart / switch timeframechange an input / reloadAll historical bars are calculatedCurve and bands drawn from the latest 10 pivotsThe bar forming at load timeThe curve keeps updating until this bar closesFrom the next bar onPivots keep being recorded, but the curve stays putWant the latest shape?Force a recalculationThis is as far as thecurve updates liveNewly confirmed pivotsare not reflected

Vowars DE ver.3.23.2

As new bars print, pivots keep being recorded in the background, but the curve is not redrawn automatically. To see the latest shape, force a recalculation by switching timeframes, changing an input, or reloading the page.
Want the latest shape? Force a recalculation

If you leave the chart open for a long time, the curve keeps its old shape even after new swings confirm. To see the latest shape, switch timeframes, change an input, or reload the page, which forces a recalculation and redraws the curve using every swing up to that point.

No Built-In Alerts

This indicator doesn’t include any alert conditions. If you want to know when price is approaching the curve or a band, one option is to draw a horizontal line at the level you care about and set an alert on that drawing in TradingView. Since the curve moves each time it’s redrawn, remember to adjust the horizontal line as well.

Pair It With the Fisher Transform to Catch Turns Earlier

The Function Polynomial Regression curve doesn’t change direction until new swings confirm and enter the calculation. Even after a top is in, the curve can stay flat until the next swing low and high confirm.

A good match to cover this weak spot is TradingView’s built-in Fisher Transform. It’s an oscillator that converts price’s position within its recent range so that extremes swing harder; it updates on every bar and flips direction sharply at turning points.

Spotting the top earlier with the Fisher Transform

The curve rarely turns until new pivots confirm, so the Fisher Transform, which updates on every bar, is used to catch the momentum shift first.

Spotting the top earlier with the Fisher Transform① Right end of the curve is still nearly flat ② Bearish cross right after the top ③ Below 0: momentum turns downFisher Transform (9)Right end of the curveis still nearly flatBearish cross rightafter the topBelow 0:momentum turns down

Vowars DE ver.3.23.2

After the top, the curve in the upper pane stays almost flat, while the Fisher Transform (default length 9) below crosses down on the very next bar and drops below 0 a few bars later.

While the right end of the curve is still nearly flat Figure 1, the Fisher Transform has already crossed down on the very next bar after the top Figure 2 and drops below 0 a few bars later Figure 3. Use the curve to confirm the shape of the bigger move and the Fisher Transform to see whether momentum has turned first, and you’ll have something to work with while you wait for the curve to catch up.

You can also split roles with indicators like these.

  • Pair it with Historical Volatility. The width of the purple band is set by a single swing among the recent pivots, so it can’t tell you whether the whole market is volatile. Adding Historical Volatility, which measures how choppy price is overall, in a lower pane makes it easier to tell whether wide bands come from “one spike” or “a volatile market overall”
  • Pair it with Keltner Channels. Its ATR-based bands update on every bar, so even in the stretch to the right where the curve has stopped, they still give you a read on when price is overextended. Useful as a backup when deciding where to take profit

Where It Shines and What to Watch For

What swing-based arcs reveal

  • Builds the curve from the sequence of swings rather than every candle’s noise, so the shape of the trend is easy to see
  • Changes in the curve’s slope let you read trend acceleration and deceleration as a shape
  • Shows two bands with different jobs at once: the aqua lines for the “normal” swing range and the purple lines for the “largest recent overshoot”
  • length and fractal_size let you scale the view from small recent swings up to multi-month arcs

Things to keep in mind

  • The curve stops at the last confirmed swing and doesn’t extend to the current bar
  • Each new swing triggers a full redraw, including the earlier part of the curve
  • The curve doesn’t update on its own while the chart stays open, so you need to force a recalculation to see the latest shape
  • Setting length to anything other than a multiple of 10 can leave parts of the curve undrawn

My Take After Using Function Polynomial Regression

Function Polynomial Regression

Function Polynomial Regression uses nothing but swing highs and lows to show, with a single line, “what kind of arc the market is tracing right now.” Unlike a moving average that reacts to every candle, it turns the sequence of swings itself into a curve, so you can actually see whether a trend is accelerating or fading.

On the flip side, the curve stops at the last swing and gets redrawn every time a new one comes in. Factor in that it doesn’t update while the chart stays open, and it’s easiest to use if you treat it as “an indicator for checking the market’s shape at that moment.”

For settings, keep degree at 1 or 2 and length at 10 or a multiple of 10, and it’s easy to dial in. Open the chart, check the curve’s slope and where price sits. Used that way, it’s a nice nudge to keep the trend’s turning points in mind.

Sources: This article is based on hands-on testing and in-depth analysis of the indicator Function Polynomial Regression by RicardoSantos 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