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]
Pine腳本庫
秉持 TradingView 一貫的共享精神,作者將此 Pine 程式碼發佈為開源庫,讓社群中的其他 Pine 程式設計師能夠重複使用。向作者致敬!您可以在私人專案或其他開源發佈中使用此庫,但在公開發佈中重複使用該程式碼需遵守社群規範。
Trial - trendoscope.io/trial
Subscribe - trendoscope.io/pricing
Blog - docs.trendoscope.io
Subscribe - trendoscope.io/pricing
Blog - docs.trendoscope.io
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。
Pine腳本庫
秉持 TradingView 一貫的共享精神,作者將此 Pine 程式碼發佈為開源庫,讓社群中的其他 Pine 程式設計師能夠重複使用。向作者致敬!您可以在私人專案或其他開源發佈中使用此庫,但在公開發佈中重複使用該程式碼需遵守社群規範。
Trial - trendoscope.io/trial
Subscribe - trendoscope.io/pricing
Blog - docs.trendoscope.io
Subscribe - trendoscope.io/pricing
Blog - docs.trendoscope.io
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。