PINE LIBRARY
rzigzag

Library "rzigzag"
Recursive Zigzag Using Matrix allows to create zigzags recursively on multiple levels. This is an old library converted to V6
zigzag(length, ohlc, numberOfPivots, offset)
calculates plain zigzag based on input
Parameters:
length (int): Zigzag Length
ohlc (array<float>): Array containing ohlc values. Can also contain custom series
numberOfPivots (simple int): Number of max pivots to be returned
offset (simple int): Offset from current bar. Can be used for calculations based on confirmed bars
Returns: [matrix<float> zigzagmatrix, bool[] flags]
iZigzag(length, h, l, numberOfPivots)
calculates plain zigzag based on input array
Parameters:
length (int): Zigzag Length
h (array<float>): array containing high values of a series
l (array<float>): array containing low values of a series
numberOfPivots (simple int): Number of max pivots to be returned
Returns: matrix<float> zigzagmatrix
nextlevel(zigzagmatrix, numberOfPivots)
calculates next level zigzag based on present zigzag coordinates
Parameters:
zigzagmatrix (matrix<float>): Matrix containing zigzag pivots, bars, bar time, direction and level
numberOfPivots (simple int): Number of max pivots to be returned
Returns: matrix<float> zigzagmatrix
draw(zigzagmatrix, flags, lineColor, lineWidth, lineStyle, showLabel, xloc)
draws zigzag based on the zigzagmatrix input
Parameters:
zigzagmatrix (matrix<float>): Matrix containing zigzag pivots, bars, bar time, direction and level
flags (array<bool>): Zigzag pivot flags
lineColor (color): Zigzag line color
lineWidth (int): Zigzag line width
lineStyle (string): Zigzag line style
showLabel (bool): Flag to indicate display pivot labels
xloc (string): xloc preference for drawing lines/labels
Returns: [array<line> zigzaglines, array<label> zigzaglabels]
draw(length, ohlc, numberOfPivots, offset, lineColor, lineWidth, lineStyle, showLabel, xloc)
calculates and draws zigzag based on zigzag length and source input
Parameters:
length (int): Zigzag Length
ohlc (array<float>): Array containing ohlc values. Can also contain custom series
numberOfPivots (simple int): Number of max pivots to be returned
offset (simple int): Offset from current bar. Can be used for calculations based on confirmed bars
lineColor (color): Zigzag line color
lineWidth (int): Zigzag line width
lineStyle (string): Zigzag line style
showLabel (bool): Flag to indicate display pivot labels
xloc (string): xloc preference for drawing lines/labels
Returns: [matrix<float> zigzagmatrix, array<line> zigzaglines, array<label> zigzaglabels, bool[] flags]
drawfresh(zigzagmatrix, zigzaglines, zigzaglabels, lineColor, lineWidth, lineStyle, showLabel, xloc)
draws fresh zigzag for all pivots in the input matrix.
Parameters:
zigzagmatrix (matrix<float>): Matrix containing zigzag pivots, bars, bar time, direction and level
zigzaglines (array<line>): array to which all newly created lines will be added
zigzaglabels (array<label>): array to which all newly created lables will be added
lineColor (color): Zigzag line color
lineWidth (int): Zigzag line width
lineStyle (string): Zigzag line style
showLabel (bool): Flag to indicate display pivot labels
xloc (string): xloc preference for drawing lines/labels
Returns: [array<line> zigzaglines, array<label> zigzaglabels]
Recursive Zigzag Using Matrix allows to create zigzags recursively on multiple levels. This is an old library converted to V6
zigzag(length, ohlc, numberOfPivots, offset)
calculates plain zigzag based on input
Parameters:
length (int): Zigzag Length
ohlc (array<float>): Array containing ohlc values. Can also contain custom series
numberOfPivots (simple int): Number of max pivots to be returned
offset (simple int): Offset from current bar. Can be used for calculations based on confirmed bars
Returns: [matrix<float> zigzagmatrix, bool[] flags]
iZigzag(length, h, l, numberOfPivots)
calculates plain zigzag based on input array
Parameters:
length (int): Zigzag Length
h (array<float>): array containing high values of a series
l (array<float>): array containing low values of a series
numberOfPivots (simple int): Number of max pivots to be returned
Returns: matrix<float> zigzagmatrix
nextlevel(zigzagmatrix, numberOfPivots)
calculates next level zigzag based on present zigzag coordinates
Parameters:
zigzagmatrix (matrix<float>): Matrix containing zigzag pivots, bars, bar time, direction and level
numberOfPivots (simple int): Number of max pivots to be returned
Returns: matrix<float> zigzagmatrix
draw(zigzagmatrix, flags, lineColor, lineWidth, lineStyle, showLabel, xloc)
draws zigzag based on the zigzagmatrix input
Parameters:
zigzagmatrix (matrix<float>): Matrix containing zigzag pivots, bars, bar time, direction and level
flags (array<bool>): Zigzag pivot flags
lineColor (color): Zigzag line color
lineWidth (int): Zigzag line width
lineStyle (string): Zigzag line style
showLabel (bool): Flag to indicate display pivot labels
xloc (string): xloc preference for drawing lines/labels
Returns: [array<line> zigzaglines, array<label> zigzaglabels]
draw(length, ohlc, numberOfPivots, offset, lineColor, lineWidth, lineStyle, showLabel, xloc)
calculates and draws zigzag based on zigzag length and source input
Parameters:
length (int): Zigzag Length
ohlc (array<float>): Array containing ohlc values. Can also contain custom series
numberOfPivots (simple int): Number of max pivots to be returned
offset (simple int): Offset from current bar. Can be used for calculations based on confirmed bars
lineColor (color): Zigzag line color
lineWidth (int): Zigzag line width
lineStyle (string): Zigzag line style
showLabel (bool): Flag to indicate display pivot labels
xloc (string): xloc preference for drawing lines/labels
Returns: [matrix<float> zigzagmatrix, array<line> zigzaglines, array<label> zigzaglabels, bool[] flags]
drawfresh(zigzagmatrix, zigzaglines, zigzaglabels, lineColor, lineWidth, lineStyle, showLabel, xloc)
draws fresh zigzag for all pivots in the input matrix.
Parameters:
zigzagmatrix (matrix<float>): Matrix containing zigzag pivots, bars, bar time, direction and level
zigzaglines (array<line>): array to which all newly created lines will be added
zigzaglabels (array<label>): array to which all newly created lables will be added
lineColor (color): Zigzag line color
lineWidth (int): Zigzag line width
lineStyle (string): Zigzag line style
showLabel (bool): Flag to indicate display pivot labels
xloc (string): xloc preference for drawing lines/labels
Returns: [array<line> zigzaglines, array<label> zigzaglabels]
Thư viện Pine
Theo đúng tinh thần TradingView, tác giả đã công bố mã Pine này như một thư viện mã nguồn mở để các lập trình viên Pine khác trong cộng đồng có thể tái sử dụng. Chúc mừng tác giả! Bạn có thể sử dụng thư viện này cho mục đích cá nhân hoặc trong các ấn phẩm mã nguồn mở khác, nhưng việc tái sử dụng mã này trong các ấn phẩm phải tuân theo Nội Quy.
Trial - trendoscope.io/trial
Subscribe - trendoscope.io/pricing
Blog - docs.trendoscope.io
Subscribe - trendoscope.io/pricing
Blog - docs.trendoscope.io
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.
Thư viện Pine
Theo đúng tinh thần TradingView, tác giả đã công bố mã Pine này như một thư viện mã nguồn mở để các lập trình viên Pine khác trong cộng đồng có thể tái sử dụng. Chúc mừng tác giả! Bạn có thể sử dụng thư viện này cho mục đích cá nhân hoặc trong các ấn phẩm mã nguồn mở khác, nhưng việc tái sử dụng mã này trong các ấn phẩm phải tuân theo Nội Quy.
Trial - trendoscope.io/trial
Subscribe - trendoscope.io/pricing
Blog - docs.trendoscope.io
Subscribe - trendoscope.io/pricing
Blog - docs.trendoscope.io
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.