PINE LIBRARY
업데이트됨 mZigzag

Library "mZigzag"
Matrix implementation of zigzag to allow further possibilities.
Main advantage of this library over previous zigzag methods is that you can attach any number of indicator/oscillator information to zigzag
calculate(length, ohlc, indicatorHigh, indicatorLow, numberOfPivots) calculates zigzag and related information
Parameters:
length: is zigzag length
ohlc: array of OHLC values to be used for zigzag calculation
indicatorHigh: Array of indicator values calculated based on high price of OHLC
indicatorLow: Array of indicators values calculated based on low price of OHLC
numberOfPivots: Number of pivots to be returned
Returns: pivotMatrix Matrix containing zigzag pivots, pivot bars, direction, ratio, and indicators added via indicatorHigh/indicatorLow
newZG is true if a new pivot is added to array
doubleZG is true if last calculation returned two new pivots (Happens on extreme price change)
draw(length, ohlc, indicatorLabels, indicatorHigh, indicatorLow, numberOfPivots, lineColor, lineWidth, lineStyle, showHighLow, showRatios, showIndicators) draws zigzag and related information
Parameters:
length: is zigzag length
ohlc: array of OHLC values to be used for zigzag calculation
indicatorLabels: Array of name of indicators passed
indicatorHigh: Array of indicator values calculated based on high price of OHLC
indicatorLow: Array of indicators values calculated based on low price of OHLC
numberOfPivots: Number of pivots to be returned
lineColor: zigzag line color. set to blue by default
lineWidth: zigzag line width. set to 1 by default
lineStyle: zigzag line style. set to line.style_solid by default
showHighLow: show HH, HL, LH, LL labels
showRatios: show pivot retracement ratios from previous zigzag
showIndicators: show indicator values
Returns: pivotMatrix Matrix containing zigzag pivots, pivot bars, direction, ratio, and indicators added via indicatorHigh/indicatorLow
zigzaglines array of zigzag lines
zigzaglabels array of zigzag labels
Matrix implementation of zigzag to allow further possibilities.
Main advantage of this library over previous zigzag methods is that you can attach any number of indicator/oscillator information to zigzag
calculate(length, ohlc, indicatorHigh, indicatorLow, numberOfPivots) calculates zigzag and related information
Parameters:
length: is zigzag length
ohlc: array of OHLC values to be used for zigzag calculation
indicatorHigh: Array of indicator values calculated based on high price of OHLC
indicatorLow: Array of indicators values calculated based on low price of OHLC
numberOfPivots: Number of pivots to be returned
Returns: pivotMatrix Matrix containing zigzag pivots, pivot bars, direction, ratio, and indicators added via indicatorHigh/indicatorLow
newZG is true if a new pivot is added to array
doubleZG is true if last calculation returned two new pivots (Happens on extreme price change)
draw(length, ohlc, indicatorLabels, indicatorHigh, indicatorLow, numberOfPivots, lineColor, lineWidth, lineStyle, showHighLow, showRatios, showIndicators) draws zigzag and related information
Parameters:
length: is zigzag length
ohlc: array of OHLC values to be used for zigzag calculation
indicatorLabels: Array of name of indicators passed
indicatorHigh: Array of indicator values calculated based on high price of OHLC
indicatorLow: Array of indicators values calculated based on low price of OHLC
numberOfPivots: Number of pivots to be returned
lineColor: zigzag line color. set to blue by default
lineWidth: zigzag line width. set to 1 by default
lineStyle: zigzag line style. set to line.style_solid by default
showHighLow: show HH, HL, LH, LL labels
showRatios: show pivot retracement ratios from previous zigzag
showIndicators: show indicator values
Returns: pivotMatrix Matrix containing zigzag pivots, pivot bars, direction, ratio, and indicators added via indicatorHigh/indicatorLow
zigzaglines array of zigzag lines
zigzaglabels array of zigzag labels
릴리즈 노트
v2Updated:
draw(length, ohlc, indicatorLabels, indicatorHigh, indicatorLow, numberOfPivots, lineColor, lineWidth, lineStyle, showLabel, showIndicators) draws zigzag and related information
Parameters:
length: is zigzag length
ohlc: array of OHLC values to be used for zigzag calculation
indicatorLabels: Array of name of indicators passed
indicatorHigh: Array of indicator values calculated based on high price of OHLC
indicatorLow: Array of indicators values calculated based on low price of OHLC
numberOfPivots: Number of pivots to be returned
lineColor: zigzag line color. set to blue by default
lineWidth: zigzag line width. set to 1 by default
lineStyle: zigzag line style. set to line.style_solid by default
showLabel: Show pivot label
showIndicators: Include indicators in labels. If set to false, indicators are shown as tooltips
Returns: valueMatrix Matrix containing zigzag pivots for price and indicators
directionMatrix Matrix containing direction of price and indicator values at pivots
ratioMatrix Matrix containing ratios of price and indicator values at pivots
barArray Array containing pivot bars
zigzaglines array of zigzag lines
zigzaglabels array of zigzag labels
릴리즈 노트
v3Updated:
calculate(length, ohlc, indicatorHigh, indicatorLow, numberOfPivots, supertrendLength) calculates zigzag and related information
Parameters:
length: is zigzag length
ohlc: array of OHLC values to be used for zigzag calculation
indicatorHigh: Array of indicator values calculated based on high price of OHLC
indicatorLow: Array of indicators values calculated based on low price of OHLC
numberOfPivots: Number of pivots to be returned
supertrendLength: is number of pivot history to calculate supertrend
Returns: valueMatrix Matrix containing zigzag pivots for price and indicators
directionMatrix Matrix containing direction of price and indicator values at pivots
ratioMatrix Matrix containing ratios of price and indicator values at pivots
divergenceMatrix matrix containing divergence details for each indicators
doubleDivergenceMatrix matrix containing double divergence details for each indicators
barArray Array containing pivot bars
supertrendDir is direction of zigzag based supertrend
supertrend is supertrend value of zigzag based supertrend
newZG is true if a new pivot is added to array
doubleZG is true if last calculation returned two new pivots (Happens on extreme price change)
릴리즈 노트
v4Added:
calculate2(length, ohlc, indicatorHigh, indicatorLow, numberOfPivots, supertrendLength) calculates zigzag and related information uses shift/unshift rather than pop and push
Parameters:
length: is zigzag length
ohlc: array of OHLC values to be used for zigzag calculation
indicatorHigh: Array of indicator values calculated based on high price of OHLC
indicatorLow: Array of indicators values calculated based on low price of OHLC
numberOfPivots: Number of pivots to be returned
supertrendLength: is number of pivot history to calculate supertrend
Returns: valueMatrix Matrix containing zigzag pivots for price and indicators
directionMatrix Matrix containing direction of price and indicator values at pivots
ratioMatrix Matrix containing ratios of price and indicator values at pivots
divergenceMatrix matrix containing divergence details for each indicators
doubleDivergenceMatrix matrix containing double divergence details for each indicators
barArray Array containing pivot bars
supertrendDir is direction of zigzag based supertrend
supertrend is supertrend value of zigzag based supertrend
newZG is true if a new pivot is added to array
doubleZG is true if last calculation returned two new pivots (Happens on extreme price change)
릴리즈 노트
v5Added:
calculateplain(length, ohlc, indicatorHigh, indicatorLow, numberOfPivots) calculates zigzag and related information uses shift/unshift rather than pop and push. Also does not calculate divergence and ratios.
Parameters:
length: is zigzag length
ohlc: array of OHLC values to be used for zigzag calculation
indicatorHigh: Array of indicator values calculated based on high price of OHLC
indicatorLow: Array of indicators values calculated based on low price of OHLC
numberOfPivots: Number of pivots to be returned
Returns: valueMatrix Matrix containing zigzag pivots for price and indicators
directionArray Matrix containing direction of price and indicator values at pivots
barArray Array containing pivot bars
newZG is true if a new pivot is added to array
doubleZG is true if last calculation returned two new pivots (Happens on extreme price change)
Removed:
calculate2(length, ohlc, indicatorHigh, indicatorLow, numberOfPivots, supertrendLength) calculates zigzag and related information uses shift/unshift rather than pop and push
릴리즈 노트
v6Updated:
calculateplain(length, ohlc, indicatorHigh, indicatorLow, numberOfPivots) calculates zigzag and related information uses shift/unshift rather than pop and push. Also does not calculate divergence and ratios.
Parameters:
length: is zigzag length
ohlc: array of OHLC values to be used for zigzag calculation
indicatorHigh: Array of indicator values calculated based on high price of OHLC
indicatorLow: Array of indicators values calculated based on low price of OHLC
numberOfPivots: Number of pivots to be returned
Returns: valueMatrix Matrix containing zigzag pivots for price and indicators
directionArray Matrix containing direction of price and indicator values at pivots
barArray Array containing pivot bars
newZG is true if a new pivot is added to array
doubleZG is true if last calculation returned two new pivots (Happens on extreme price change)
릴리즈 노트
v7릴리즈 노트
v8Fixed an edge case highlighted by mortdiggiddy
릴리즈 노트
v9릴리즈 노트
v10릴리즈 노트
v11릴리즈 노트
v12파인 라이브러리
진정한 트레이딩뷰 정신에 따라 작성자는 이 파인 코드를 오픈 소스 라이브러리로 공개하여 커뮤니티의 다른 파인 프로그래머들이 재사용할 수 있도록 했습니다. 작성자에게 건배! 이 라이브러리는 개인적으로 또는 다른 오픈 소스 출판물에서 사용할 수 있지만, 출판물에서 이 코드를 재사용하는 것은 하우스 룰의 적용을 받습니다.
Trial - trendoscope.io/trial
Subscribe - trendoscope.io/pricing
Blog - docs.trendoscope.io
Subscribe - trendoscope.io/pricing
Blog - docs.trendoscope.io
면책사항
이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.
파인 라이브러리
진정한 트레이딩뷰 정신에 따라 작성자는 이 파인 코드를 오픈 소스 라이브러리로 공개하여 커뮤니티의 다른 파인 프로그래머들이 재사용할 수 있도록 했습니다. 작성자에게 건배! 이 라이브러리는 개인적으로 또는 다른 오픈 소스 출판물에서 사용할 수 있지만, 출판물에서 이 코드를 재사용하는 것은 하우스 룰의 적용을 받습니다.
Trial - trendoscope.io/trial
Subscribe - trendoscope.io/pricing
Blog - docs.trendoscope.io
Subscribe - trendoscope.io/pricing
Blog - docs.trendoscope.io
면책사항
이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.