Indicator · Pine Script v5 · On the chart

Gaps Profile [vnhilton]

by regalouisei· code credited to vnhilton

Gaps Profile draws boxes on the price chart for price gaps that meet a minimum absolute percentage size.

View on GitHub

GitHub stars2on the repository
Pine versionv5runs as is
Lines of code281
Settings40inputs
LicenceNone statedfile: MPL-2.0
Last update8 months ago25 Feb 2026

Add It to Your TradingView Chart

  1. 1Copy the scriptPress Copy script above, or the copy button on the code below.
  2. 2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
  3. 3Paste over the templateCreate a new indicator, select all of the template text and paste. Press Save and give it a name.
  4. 4Add it to the chartPress Add to chart, then adjust the settings with the gear icon next to its name.

Source Code

281 lines of Pine Script v5 from pinescript/editors_picks/gaps-profile-vnhilton.pine, published under MPL-2.0 (file header). Keep the author's credit and licence lines when you reuse it.

gaps-profile-vnhilton.pine
// This Pine Script™ code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © vnhilton

//@version=5
indicator("Gaps Profile [vnhilton]", "GP", true, max_boxes_count = 500)

//Parameters
borderToggle       = input.bool(true,                          "",                                        inline = "BB Toggles",                                                                                                 group = "Profile Settings")
boxToggle          = input.bool(true,                          "Show Border/Box",                         inline = "BB Toggles",                                                                                                 group = "Profile Settings")
maxBoxes           = input.int(10,                             "Maximum number of boxes", 3, 499, tooltip = "If indicator takes too long to execute, consider lowering maximum amount of boxes and/or increasing minimum gap %", group = "Profile Settings")
gapThreshold       = input.float(1,                            "Minimum Gap %",           0,      tooltip = "Only shows gaps that meet the minimum absolute gap % size",                                                         group = "Profile Settings")
highlightOption    = input.string("Largest",                   "Highlight Up/Down Gap",   ["Largest", "Newest", "None"],                                                                                                         group = "Profile Settings")
colorOption        = input.string("Up/Down", "Profile Color Theme",                       ["Mono", "Up/Down", "Up/Down Largest Gradients", "Up/Down Newest Gradients"],                                                          group = "Profile Settings")
profileType        = input.string("Left",                      "Profile Type",            ["Left", "Right"],                                                                                                                     group = "Profile Settings")
offset             = input.int(5,                              "Profile Offset", -250, 250,                                                                                                                                      group = "Profile Settings")

borderWidth        = input.int(2,          "Border Width", 0,                                                                   group = "Border Settings")
borderStyleUp      = input.string("Solid", "Border Style Up/Down",        ["Dashed", "Dotted", "Solid"], inline = "U/D Border", group = "Border Settings")
borderStyleDown    = input.string("Solid", "",                            ["Dashed", "Dotted", "Solid"], inline = "U/D Border", group = "Border Settings")

borderColorMono    = input.color(color.new(color.white, 0),  "Border/Box Color", inline = "Mono", group = "Mono Color Settings")
boxColorMono       = input.color(color.new(color.white, 50), "",                 inline = "Mono", group = "Mono Color Settings")

borderColorUp      = input.color(color.new(color.green, 0),  "Border/Box Up Color",   inline = "U", group = "Up/Down Color Settings")
boxColorUp         = input.color(color.new(color.green, 50), "",                      inline = "U", group = "Up/Down Color Settings")
borderColorDown    = input.color(color.new(color.red,   0),  "Border/Box Down Color", inline = "D", group = "Up/Down Color Settings")
boxColorDown       = input.color(color.new(color.red,   50), "",                      inline = "D", group = "Up/Down Color Settings")

borderColorUpLT    = input.color(color.new(color.green, 0),   "Border/Box Up Top Color",      inline = "Largest Up T",   group = "Largest Gradient Color Settings")
boxColorUpLT       = input.color(color.new(color.green, 50),  "",                             inline = "Largest Up T",   group = "Largest Gradient Color Settings")
borderColorUpLB    = input.color(color.new(color.green, 50),  "Border/Box Up Bottom Color",   inline = "Largest Up B",   group = "Largest Gradient Color Settings")
boxColorUpLB       = input.color(color.new(color.green, 100), "",                             inline = "Largest Up B",   group = "Largest Gradient Color Settings")
borderColorDownLT  = input.color(color.new(color.red,   0),   "Border/Box Down Top Color",    inline = "Largest Down T", group = "Largest Gradient Color Settings")
boxColorDownLT     = input.color(color.new(color.red,   50),  "",                             inline = "Largest Down T", group = "Largest Gradient Color Settings")
borderColorDownLB  = input.color(color.new(color.red,   50),  "Border/Box Down Bottom Color", inline = "Largest Down B", group = "Largest Gradient Color Settings")
boxColorDownLB     = input.color(color.new(color.red,   100), "",                             inline = "Largest Down B", group = "Largest Gradient Color Settings")

borderColorUpNT    = input.color(color.new(color.green, 0),   "Border/Box Up Top Color",      inline = "Newest Up T",   group = "Newest Gradient Color Settings")
boxColorUpNT       = input.color(color.new(color.green, 50),  "",                             inline = "Newest Up T",   group = "Newest Gradient Color Settings")
borderColorUpNB    = input.color(color.new(color.green, 50),  "Border/Box Up Bottom Color",   inline = "Newest Up B",   group = "Newest Gradient Color Settings")
boxColorUpNB       = input.color(color.new(color.green, 100), "",                             inline = "Newest Up B",   group = "Newest Gradient Color Settings")
borderColorDownNT  = input.color(color.new(color.red, 0),     "Border/Box Down Top Color",    inline = "Newest Down T", group = "Newest Gradient Color Settings")
boxColorDownNT     = input.color(color.new(color.red, 50),    "",                             inline = "Newest Down T", group = "Newest Gradient Color Settings")
borderColorDownNB  = input.color(color.new(color.red, 50),    "Border/Box Down Bottom Color", inline = "Newest Down B", group = "Newest Gradient Color Settings")
boxColorDownNB     = input.color(color.new(color.red, 100),   "",                             inline = "Newest Down B", group = "Newest Gradient Color Settings")

borderColorUpL     = input.color(color.new(color.blue,    0),  "Border/Box Up Largest Color",   inline = "Up Largest",   group = "Largest Highlight Options")
boxColorUpL        = input.color(color.new(color.blue,    50), "",                              inline = "Up Largest",   group = "Largest Highlight Options")
borderColorDownL   = input.color(color.new(color.fuchsia, 0),  "Border/Box Down Largest Color", inline = "Down Largest", group = "Largest Highlight Options")
boxColorDownL      = input.color(color.new(color.fuchsia, 50), "",                              inline = "Down Largest", group = "Largest Highlight Options")

borderColorUpN     = input.color(color.new(color.yellow, 0),  "Border/Box Up Newest Color",   inline = "Up Newest",   group = "Newest Highlight Options")
boxColorUpN        = input.color(color.new(color.yellow, 50), "",                             inline = "Up Newest",   group = "Newest Highlight Options")
borderColorDownN   = input.color(color.new(color.purple, 0),  "Border/Box Down Newest Color", inline = "Down Newest", group = "Newest Highlight Options")
boxColorDownN      = input.color(color.new(color.purple, 50), "",                             inline = "Down Newest", group = "Newest Highlight Options")

//Arrays
var float [] gapTop       = array.new<float>()
var float [] gapBottom    = array.new<float>()
var int   [] gapIndex     = array.new<int>()
var float [] gapSize      = array.new<float>()
var box   [] gapBoxes     = array.new<box>()

var int   [] gapBin       = array.new<int>()
var float [] gapSplitB    = array.new<float>()
var int   [] gapSplitI    = array.new<int>()
var float [] gapSplitS    = array.new<float>()
var int   [] overlapCount = array.new<int>()

//Border style function
BorderStyle(choice) =>
    switch
        choice == "Dashed" => line.style_dashed
        choice == "Dotted" => line.style_dotted
        => line.style_solid

//Color function
Colors(choice, size, index, upSize, downSize, upAge, downAge) =>
    switch 
        choice == "Mono"                      => [borderColorMono, boxColorMono]
        choice == "Up/Down"                   => [size >= 0 ? borderColorUp  : borderColorDown,  size >= 0 ? boxColorUp  : boxColorDown]
        choice == "Up/Down Largest Gradients" => [size >= 0 ? array.size(upSize) > 1 ? color.from_gradient(size,  array.min(upSize), array.max(upSize), borderColorUpLB, borderColorUpLT) : borderColorUpLT : array.size(downSize) > 1 ? color.from_gradient(math.abs(size),  array.min(downSize), array.max(downSize), borderColorDownLB, borderColorDownLT) : borderColorDownLT, size >= 0 ? array.size(upSize) > 1 ? color.from_gradient(size,  array.min(upSize), array.max(upSize), boxColorUpLB, boxColorUpLT) : boxColorUpLT : array.size(downSize) > 1 ? color.from_gradient(math.abs(size),  array.min(downSize), array.max(downSize), boxColorDownLB, boxColorDownLT) : boxColorDownLT]
        choice == "Up/Down Newest Gradients"  => [size >= 0 ? array.size(upAge)  > 1 ? color.from_gradient(index, array.min(upAge),  array.max(upAge),  borderColorUpNB, borderColorUpNT) : borderColorUpNT : array.size(downAge)  > 1 ? color.from_gradient(index, array.min(downAge),  array.max(downAge),  borderColorDownNB, borderColorDownNT) : borderColorDownNT, size >= 0 ? array.size(upAge)  > 1 ? color.from_gradient(index, array.min(upAge),  array.max(upAge),  boxColorUpNB, boxColorUpNT) : boxColorUpNT : array.size(downAge)  > 1 ? color.from_gradient(index, array.min(downAge),  array.max(downAge),  boxColorDownNB, boxColorDownNT) : boxColorDownNT]
        choice == "Largest"                   => [size >= 0 ? borderColorUpL : borderColorDownL, size >= 0 ? boxColorUpL : boxColorDownL] 
        =>                                       [size >= 0 ? borderColorUpN : borderColorDownN, size >= 0 ? boxColorUpN : boxColorDownN]

//Remove gap function
GapRemove(index) =>
    array.remove(gapTop,           index)
    array.remove(gapBottom,        index)
    array.remove(gapIndex,         index)
    array.remove(gapSize,          index)
    box.delete(array.get(gapBoxes, index)) //Delete the box first...
    array.remove(gapBoxes,         index)  //...then the empty element in the boxes array
    
//Array full check function
GapMax() =>
    if array.size(gapBoxes) == maxBoxes + 1
        //Remove the furthest gap away from the current close
        if ((array.max(gapBottom) - close) / close > math.abs((array.min(gapTop) - close) / close))
            GapRemove(array.indexof(gapBottom, array.max(gapBottom))) //Remove the oldest furthest up gap
        else
            GapRemove(array.indexof(gapTop,    array.min(gapTop)))    //Remove the oldest furthest down gap

//Create gap box function
GapCreate(top, bottom, index, size) =>
    GapMax()

    array.push(gapTop,    top)
    array.push(gapBottom, bottom)
    array.push(gapIndex,  index)
    array.push(gapSize,   size)
    array.push(gapBoxes,  box.new(na, top, na, bottom, border_width = borderWidth, border_style = size >= 0 ? BorderStyle(borderStyleUp) : BorderStyle(borderStyleDown)))

//Modify gap function
GapModify(edge, index) =>
    if edge == low 
        array.set(gapTop,    index, edge)
        box.set_top(array.get(gapBoxes,    index), edge)
    else
        array.set(gapBottom, index, edge)
        box.set_bottom(array.get(gapBoxes, index), edge)

//Gap sort function
GapSort(order, arrayOriginal) =>
    sortedArray = array.copy(arrayOriginal) 
    array.clear(sortedArray) //Also maintains the array type passed to function

    for i = 0 to array.size(order) - 1
        array.push(sortedArray, array.get(arrayOriginal, array.get(order, i)))

    sortedArray

//1) Check for gaps, and if present, create gap boxes
if bar_index != 0 // There needs to be at least 2 bars on the charts for a gap to be present
    //For up gaps
    if low  > close[1] and math.abs(((low - close[1]) * 100)  / close[1]) >= gapThreshold
        GapCreate(low,      close[1], bar_index, ((low  - close[1]) * 100) / close[1])

    //For down gaps
    if high < close[1] and math.abs(((high - close[1]) * 100) / close[1]) >= gapThreshold
        GapCreate(close[1], high,     bar_index, ((high - close[1]) * 100) / close[1])

//2) Split, modify or delete gaps due to closing events
if array.size(gapBoxes) > 0 //There is at least 1 gap on the chart
    for i = 0 to array.size(gapBoxes) - 1

        //Scenario 1 - Current close filling gap from above
        if low  < array.get(gapTop,    i) and high >= array.get(gapTop,    i)
            GapModify(low,  i) //Adjust gap top edge to current low

        //Scenario 2 - Current close filling gap from below
        if high > array.get(gapBottom, i) and low  <= array.get(gapBottom, i)
            GapModify(high, i) //Adjust gap bottom edge to current high

        //Scenario 3 - Current close filling gap from within
        if high < array.get(gapTop,    i) and low  >  array.get(gapBottom, i)
            GapModify(high, i) //Adjust original gap to be above current bar
            //Request - Split gap by creating a new gap to be below current bar
            array.push(gapSplitB, array.get(gapBottom, i))
            array.push(gapSplitI, array.get(gapIndex,  i))
            array.push(gapSplitS, array.get(gapSize,   i))

        //Scenario 4 - Current bar engulfs gap
        if high >= array.get(gapTop,   i) and low  <= array.get(gapBottom, i)
            array.unshift(gapBin, i) //Request - deletion

    //Start gap deletion of gaps fully closed
    if array.size(gapBin) > 0
        for i = 0 to array.size(gapBin)    - 1
            GapRemove(array.get(gapBin, i))    

        array.clear(gapBin)
        
    //Start split gap creations
    if array.size(gapSplitB) > 0
        for i = 0 to array.size(gapSplitB) - 1
            GapCreate(low, array.get(gapSplitB, i), array.get(gapSplitI, i), array.get(gapSplitS, i))
        
        array.clear(gapSplitB)
        array.clear(gapSplitI)
        array.clear(gapSplitS)

//3) Check for overlaps before plotting
if barstate.islast
    if array.size(gapBoxes) > 1 //There are at least 2 gaps for potential overlaps

        //Sort all arrays in descending order based on gapTop
        orderIndices = array.sort_indices(gapTop, order.descending)

        gapTop      := GapSort(orderIndices, gapTop)
        gapBottom   := GapSort(orderIndices, gapBottom)
        gapIndex    := GapSort(orderIndices, gapIndex)
        gapSize     := GapSort(orderIndices, gapSize)
        gapBoxes    := GapSort(orderIndices, gapBoxes)

        //Checking for overlaps
        done         = array.new_int()                        // Stores gap indices accounted for
        gapTopCopy   = array.copy(gapTop)                     // For use in initialising lastBottom 
        lastBottom   = -5.0                                   // Memory of last gapBottom; negative arbitrary float number
        array.clear(overlapCount)

        for i = 0 to array.size(gapIndex) - 1                 // Overlap count
            array.push(overlapCount, 0)

        //Indefinite loop until all gaps accounted for
        while array.size(done) != array.size(gapIndex)
            for i = 0 to array.size(gapIndex) - 2

                //Initialising last gapBottom for later use in overlap checks
                if lastBottom == -5.0 and array.indexof(done, array.indexof(gapTopCopy, array.max(gapTopCopy))) == -1
                    lastBottom := array.get(gapBottom, array.indexof(gapTopCopy, array.max(gapTopCopy)))
                    array.push(done, array.get(gapIndex, array.indexof(gapTopCopy, array.max(gapTopCopy)))) //Highest gapTop gap at start of new column is done
                    array.set(gapTopCopy, array.indexof(gapTopCopy, array.max(gapTopCopy)), -1)

                //If gap not accounted for
                if array.indexof(done, array.get(gapIndex, i + 1)) == -1
                    //If they don't overlap...
                    if lastBottom >= array.get(gapTop, i + 1)
                        lastBottom := array.get(gapBottom, i + 1)
                        array.push(done, array.get(gapIndex, i + 1))
                        array.set(gapTopCopy, i + 1, -1)
                    
                    //If they do overlap...
                    else
                        array.set(overlapCount, i + 1, array.get(overlapCount, i + 1) + 1)
            
            //For next new column 
            lastBottom := -5.0

    //4) Plot gap boxes
    if array.size(gapBoxes) > 0 //If there's at least 1 gap box to plot
        reverseMax = array.max(overlapCount)

        //Arrays for gradient colors
        upSize   = array.new_float()
        downSize = array.new_float()
        upAge    = array.new_int()
        downAge  = array.new_int()

        for i = 0 to array.size(gapBoxes) - 1
            if array.get(gapSize, i) >= 0
                array.push(upSize,   array.get(gapSize,  i))
                array.push(upAge,    array.get(gapIndex, i))
            else
                array.push(downSize, math.abs(array.get(gapSize,  i)))
                array.push(downAge,  array.get(gapIndex, i))

        //Final offset adjustments
        for i = 0 to array.size(gapBoxes) - 1
            if profileType == "Left"
                array.set(overlapCount, i, array.get(overlapCount, i) + offset)
            else
                array.set(overlapCount, i, (array.get(overlapCount, i) * -1) + reverseMax + offset)

            //Colors and border styles
            [borderColor, boxColor] = Colors(colorOption,   array.get(gapSize, i), array.get(gapIndex, i), upSize, downSize, upAge, downAge)

            if highlightOption == "Largest" and (array.get(gapSize, i)  == array.max(upSize) or math.abs(array.get(gapSize, i))  == array.max(downSize))
                [borderColorL, boxColorL] = Colors("Largest", array.get(gapSize, i), array.get(gapIndex, i), upSize, downSize, upAge, downAge)
                borderColor := borderColorL
                boxColor    := boxColorL
                
            if highlightOption == "Newest"  and (array.get(gapIndex, i) == array.max(upAge)  or array.get(gapIndex, i) == array.max(downAge))
                [borderColorN, boxColorN] = Colors("Newest",  array.get(gapSize, i), array.get(gapIndex, i), upSize, downSize, upAge, downAge)
                borderColor := borderColorN
                boxColor    := boxColorN

            //Plot Profile
            box.set_left(array.get(gapBoxes, i),         bar_index + array.get(overlapCount, i))
            box.set_right(array.get(gapBoxes, i),        bar_index + array.get(overlapCount, i) + 1)

            if borderToggle
                box.set_border_color(array.get(gapBoxes, i), borderColor)
            else
                box.set_border_color(array.get(gapBoxes, i), color.new(#000000, 100))

            if boxToggle
                box.set_bgcolor(array.get(gapBoxes, i), boxColor)
            else
                box.set_bgcolor(array.get(gapBoxes, i), color.new(#000000, 100))

Overview

Gaps Profile [vnhilton] can place the profile to the left or the right of price and highlight the largest or newest up or down gap, or highlight none. Color themes include a single color, separate up and down colors, and gradient styles for the largest or newest gap. The main settings change the box limit, gap threshold, offset, and border appearance. It is an overlay indicator and does not generate trade entries or exits.

Details

Published by

regalouisei on GitHub

Code credit

vnhilton, as written in the script's header

Type

Indicator, Pine Script v5

Draws

On the price chart

Category

Support & resistance

Markets

Any symbol

Timeframes

Any timeframe

Risk Notes

No repainting, lookahead or stacked entries were found in its code or README. That says nothing about how well it works: test it first.

Settings

The inputs you can change from the gear icon on the chart. Defaults are the author's.

SettingTypeDefaultVariable
borderTogglebooltrueborderToggle
Show Border/BoxbooltrueboxToggle
Maximum number of boxesint10maxBoxes
Minimum Gap %float1gapThreshold
Highlight Up/Down GapstringLargesthighlightOption
Profile Color ThemestringUp/DowncolorOption
Profile TypestringLeftprofileType
Profile Offsetint5offset
Border Widthint2borderWidth
Border Style Up/DownstringSolidborderStyleUp
borderStyleDownstringSolidborderStyleDown
Border/Box Colorcolorcolor.new(color.white, 0)borderColorMono
Show all 40 settings
SettingTypeDefaultVariable
boxColorMonocolorcolor.new(color.white, 50)boxColorMono
Border/Box Up Colorcolorcolor.new(color.green, 0)borderColorUp
boxColorUpcolorcolor.new(color.green, 50)boxColorUp
Border/Box Down Colorcolorcolor.new(color.red, 0)borderColorDown
boxColorDowncolorcolor.new(color.red, 50)boxColorDown
Border/Box Up Top Colorcolorcolor.new(color.green, 0)borderColorUpLT
boxColorUpLTcolorcolor.new(color.green, 50)boxColorUpLT
Border/Box Up Bottom Colorcolorcolor.new(color.green, 50)borderColorUpLB
boxColorUpLBcolorcolor.new(color.green, 100)boxColorUpLB
Border/Box Down Top Colorcolorcolor.new(color.red, 0)borderColorDownLT
boxColorDownLTcolorcolor.new(color.red, 50)boxColorDownLT
Border/Box Down Bottom Colorcolorcolor.new(color.red, 50)borderColorDownLB
boxColorDownLBcolorcolor.new(color.red, 100)boxColorDownLB
Border/Box Up Top Colorcolorcolor.new(color.green, 0)borderColorUpNT
boxColorUpNTcolorcolor.new(color.green, 50)boxColorUpNT
Border/Box Up Bottom Colorcolorcolor.new(color.green, 50)borderColorUpNB
boxColorUpNBcolorcolor.new(color.green, 100)boxColorUpNB
Border/Box Down Top Colorcolorcolor.new(color.red, 0)borderColorDownNT
boxColorDownNTcolorcolor.new(color.red, 50)boxColorDownNT
Border/Box Down Bottom Colorcolorcolor.new(color.red, 50)borderColorDownNB
boxColorDownNBcolorcolor.new(color.red, 100)boxColorDownNB
Border/Box Up Largest Colorcolorcolor.new(color.blue, 0)borderColorUpL
boxColorUpLcolorcolor.new(color.blue, 50)boxColorUpL
Border/Box Down Largest Colorcolorcolor.new(color.fuchsia, 0)borderColorDownL
boxColorDownLcolorcolor.new(color.fuchsia, 50)boxColorDownL
Border/Box Up Newest Colorcolorcolor.new(color.yellow, 0)borderColorUpN
boxColorUpNcolorcolor.new(color.yellow, 50)boxColorUpN
Border/Box Down Newest Colorcolorcolor.new(color.purple, 0)borderColorDownN
Third-party code. ForexR did not write, test or endorse this script, and the summary above was generated automatically from its code and README. Indicators describe the past, and a strategy's backtest can look better than live trading, especially when a script repaints. Check it in the Strategy Tester and on a demo account before you rely on it.

Similar Pine Scripts

948 stars

Moving Average Channel plots separate simple moving averages for upper and lower bands on the price chart. It fills the space between bands with semi-transparent color and colors bars green above the upper band, red below the lower band, or gray in between. Us

Indicator v4 Moving averagesSupport & resistance
Updated 10 days ago · GPL-3.0 GitHub repository of Moving Average Channel

ICT Equal Highs and Lows

by ArunKBhaskar
575 stars

This overlay indicator finds pivot highs and lows on the price chart and compares the last two highs and the last two lows. When the percentage difference between a pair is below the Equal HL threshold, it treats them as equal levels and draws a box. Left and

Indicator v5 SMC / ICT / price actionSupport & resistance
Updated 1 year ago · MPL-2.0 GitHub repository of ICT Equal Highs and Lows
330 stars

This indicator monitors multiple cryptocurrency symbols for trading signals. It calculates and plots entry prices, take profit, and stop loss levels for each symbol including BTCUSDT, ETHUSDT, BNBUSDT and others. Price crossovers trigger buy, sell or close ale

Indicator v5 Support & resistanceScreeners & dashboards
Updated 2 months ago · None stated GitHub repository of Multi Alert Long/Short [Alorse]

This overlay indicator draws a fixed-range volume profile on the price chart, splitting traded activity into up and down volume at each price level. It also plots a sentiment profile, a developing point of control, and value-area high and low around a configur

Indicator v5 VolumeSupport & resistance
Updated 2 months ago · MIT GitHub repository of Volume Profile and Indicator by DGT

BZ-tracker

by Allen1212
303 stars

The BZ-tracker indicator marks ARK Invest buy and sell transactions on stock charts with labels. It plots green labels for purchases and red labels for sales, each annotated with a multiplier such as X1 or X2 to show the number of ARK ETFs trading the stock on

Indicator v4 Support & resistanceScreeners & dashboards
Updated 2 years ago · None stated GitHub repository of BZ-tracker

Function - Linear Regression

by ricardosantos79
261 stars

This indicator fits a linear regression through stored pivot highs and lows and draws the resulting channel on the price chart. A function returns predicted values, maximum and minimum deviations, and the average absolute deviation. Confirmed two-bar pivots up

Indicator v5 TrendSupport & resistance
Updated 4 years ago · None stated GitHub repository of Function - Linear Regression

More indicators

Trade Your Charts With a Regulated Broker

Compare brokers that connect to TradingView, with spreads, minimum deposits and leverage side by side.

Compare brokers