PINE LIBRARY
업데이트됨 Pivot

Library "Pivot"
This library helps you store and manage pivots.
bias(isHigh, isHigher, prevWasHigher)
Helper function to calculate bias.
Parameters:
isHigh (bool): (bool) Wether the pivot is a pivot high or not.
isHigher (bool): (bool) Wether the pivot is a higher pivot or not.
return (bool) The bias (true = bullish, false = bearish, na = neutral).
prevWasHigher (bool)
biasToString(bias)
Parameters:
bias (bool)
biasToColor(bias, theme)
Parameters:
bias (bool)
theme (Theme)
nameString(isHigh, isHigher)
Parameters:
isHigh (bool)
isHigher (bool)
abbrString(isHigh, isHigher)
Parameters:
isHigh (bool)
isHigher (bool)
tooltipString(y, isHigh, isHigher, bias, theme)
Parameters:
y (float)
isHigh (bool)
isHigher (bool)
bias (bool)
theme (Theme)
createLabel(x, y, isHigh, isHigher, prevWasHigher, settings)
Parameters:
x (int)
y (float)
isHigh (bool)
isHigher (bool)
prevWasHigher (bool)
settings (Settings)
new(x, y, isHigh, isHigher, settings)
Parameters:
x (int)
y (float)
isHigh (bool)
isHigher (bool)
settings (Settings)
newArray(size, initialValue)
Parameters:
size (int)
initialValue (Pivot)
method getFirst(this)
Namespace types: Pivot[]
Parameters:
this (Pivot[])
method getLast(this, isHigh)
Namespace types: Pivot[]
Parameters:
this (Pivot[])
isHigh (bool)
method getLastHigh(this)
Namespace types: Pivot[]
Parameters:
this (Pivot[])
method getLastLow(this)
Namespace types: Pivot[]
Parameters:
this (Pivot[])
method getPrev(this, numBack, isHigh)
Namespace types: Pivot[]
Parameters:
this (Pivot[])
numBack (int)
isHigh (bool)
method getPrevHigh(this, numBack)
Namespace types: Pivot[]
Parameters:
this (Pivot[])
numBack (int)
method getPrevLow(this, numBack)
Namespace types: Pivot[]
Parameters:
this (Pivot[])
numBack (int)
method getText(this)
Namespace types: Pivot
Parameters:
this (Pivot)
method setX(this, value)
Namespace types: Pivot
Parameters:
this (Pivot)
value (int)
method setY(this, value)
Namespace types: Pivot
Parameters:
this (Pivot)
value (float)
method setXY(this, x, y)
Namespace types: Pivot
Parameters:
this (Pivot)
x (int)
y (float)
method setBias(this, value)
Namespace types: Pivot
Parameters:
this (Pivot)
value (int)
method setColor(this, value)
Namespace types: Pivot
Parameters:
this (Pivot)
value (color)
method setText(this, value)
Namespace types: Pivot
Parameters:
this (Pivot)
value (string)
method add(this, pivot)
Namespace types: Pivot[]
Parameters:
this (Pivot[])
pivot (Pivot)
method updateLast(this, y, settings)
Namespace types: Pivot[]
Parameters:
this (Pivot[])
y (float)
settings (Settings)
method update(this, y, isHigh, settings)
Namespace types: Pivot[]
Parameters:
this (Pivot[])
y (float)
isHigh (bool)
settings (Settings)
Pivot
Stores Pivot data.
Fields:
x (series int)
y (series float)
isHigh (series bool)
isHigher (series bool)
bias (series bool)
lb (series label)
Theme
Attributes for customizable look and feel.
Fields:
size (series string)
colorDefault (series color)
colorNeutral (series color)
colorBullish (series color)
colorBearish (series color)
colored (series bool)
showTooltips (series bool)
showTooltipName (series bool)
showTooltipValue (series bool)
showTooltipBias (series bool)
Settings
All settings for the pivot.
Fields:
theme (Theme)
This library helps you store and manage pivots.
bias(isHigh, isHigher, prevWasHigher)
Helper function to calculate bias.
Parameters:
isHigh (bool): (bool) Wether the pivot is a pivot high or not.
isHigher (bool): (bool) Wether the pivot is a higher pivot or not.
return (bool) The bias (true = bullish, false = bearish, na = neutral).
prevWasHigher (bool)
biasToString(bias)
Parameters:
bias (bool)
biasToColor(bias, theme)
Parameters:
bias (bool)
theme (Theme)
nameString(isHigh, isHigher)
Parameters:
isHigh (bool)
isHigher (bool)
abbrString(isHigh, isHigher)
Parameters:
isHigh (bool)
isHigher (bool)
tooltipString(y, isHigh, isHigher, bias, theme)
Parameters:
y (float)
isHigh (bool)
isHigher (bool)
bias (bool)
theme (Theme)
createLabel(x, y, isHigh, isHigher, prevWasHigher, settings)
Parameters:
x (int)
y (float)
isHigh (bool)
isHigher (bool)
prevWasHigher (bool)
settings (Settings)
new(x, y, isHigh, isHigher, settings)
Parameters:
x (int)
y (float)
isHigh (bool)
isHigher (bool)
settings (Settings)
newArray(size, initialValue)
Parameters:
size (int)
initialValue (Pivot)
method getFirst(this)
Namespace types: Pivot[]
Parameters:
this (Pivot[])
method getLast(this, isHigh)
Namespace types: Pivot[]
Parameters:
this (Pivot[])
isHigh (bool)
method getLastHigh(this)
Namespace types: Pivot[]
Parameters:
this (Pivot[])
method getLastLow(this)
Namespace types: Pivot[]
Parameters:
this (Pivot[])
method getPrev(this, numBack, isHigh)
Namespace types: Pivot[]
Parameters:
this (Pivot[])
numBack (int)
isHigh (bool)
method getPrevHigh(this, numBack)
Namespace types: Pivot[]
Parameters:
this (Pivot[])
numBack (int)
method getPrevLow(this, numBack)
Namespace types: Pivot[]
Parameters:
this (Pivot[])
numBack (int)
method getText(this)
Namespace types: Pivot
Parameters:
this (Pivot)
method setX(this, value)
Namespace types: Pivot
Parameters:
this (Pivot)
value (int)
method setY(this, value)
Namespace types: Pivot
Parameters:
this (Pivot)
value (float)
method setXY(this, x, y)
Namespace types: Pivot
Parameters:
this (Pivot)
x (int)
y (float)
method setBias(this, value)
Namespace types: Pivot
Parameters:
this (Pivot)
value (int)
method setColor(this, value)
Namespace types: Pivot
Parameters:
this (Pivot)
value (color)
method setText(this, value)
Namespace types: Pivot
Parameters:
this (Pivot)
value (string)
method add(this, pivot)
Namespace types: Pivot[]
Parameters:
this (Pivot[])
pivot (Pivot)
method updateLast(this, y, settings)
Namespace types: Pivot[]
Parameters:
this (Pivot[])
y (float)
settings (Settings)
method update(this, y, isHigh, settings)
Namespace types: Pivot[]
Parameters:
this (Pivot[])
y (float)
isHigh (bool)
settings (Settings)
Pivot
Stores Pivot data.
Fields:
x (series int)
y (series float)
isHigh (series bool)
isHigher (series bool)
bias (series bool)
lb (series label)
Theme
Attributes for customizable look and feel.
Fields:
size (series string)
colorDefault (series color)
colorNeutral (series color)
colorBullish (series color)
colorBearish (series color)
colored (series bool)
showTooltips (series bool)
showTooltipName (series bool)
showTooltipValue (series bool)
showTooltipBias (series bool)
Settings
All settings for the pivot.
Fields:
theme (Theme)
릴리즈 노트
v2 | Added a new biasToColor function that sets returns colors based of given attributes. And added a new biasToColor wrapper function for Theme.Updated:
biasToColor(bias, theme)
Helper function that converts bias to color from theme.
Parameters:
bias (bool): (bool) The bias.
neutral (color): (bool) The neutral color.
bullish (color): (bool) The bullish color.
bearish (color): (bool) The bearish color.
릴리즈 노트
v3 | Fixed bug where we would check for wrong conditions to update existing pivot or create a new one.Updated:
method updateLast(this, y, isHigh, settings)
Namespace types: Pivot[]
Parameters:
this (Pivot[])
y (float)
isHigh (bool)
settings (Settings)
릴리즈 노트
v4: Fixes custom theme input not being respected for tooltip display and colored pivot text.Added:
method generateName(this, abbr)
Generates a name string for the this pivot.
Namespace types: Pivot
Parameters:
this (Pivot): (Pivot) The Pivot.
abbr (bool): (bool) Wether to create abbreviation. (optional, default is false)
return (string) The name string.
method calculateBias(this, prevWasHigher)
Calculates bias for this Pivot.
Namespace types: Pivot
Parameters:
this (Pivot): (Pivot) The Pivot.
prevWasHigher (bool): (bool) Wether the previous pivot is a higher pivot or not.
return (bool) The bias (true = bullish, false = bearish, na = neutral).
method generateTooltips(this, theme)
Namespace types: Pivot
Parameters:
this (Pivot)
theme (Theme)
newPivot(x, y, isHigh, isHigher, settings)
Parameters:
x (int)
y (float)
isHigh (bool)
isHigher (bool)
settings (Settings)
Updated:
biasToString(bias)
Helper function that converts bias to string.
Parameters:
bias (bool): (bool) The bias.
return (string) The bias string.
method biasToColor(this, theme)
Helper function that converts bias to color.
Namespace types: Pivot
Parameters:
this (Pivot)
theme (Theme): (theme) The theme.
return (color) The color that belongs to the bias derived from the Theme.
method createLabel(this, settings)
Namespace types: Pivot
Parameters:
this (Pivot)
settings (Settings)
new(size, initialValue)
Parameters:
size (int)
initialValue (Pivot)
Removed:
bias(isHigh, isHigher, prevWasHigher)
Helper function to calculate bias.
nameString(isHigh, isHigher)
abbrString(isHigh, isHigher)
tooltipString(y, isHigh, isHigher, bias, theme)
newArray(size, initialValue)
파인 라이브러리
진정한 트레이딩뷰 정신에 따라 작성자는 이 파인 코드를 오픈 소스 라이브러리로 공개하여 커뮤니티의 다른 파인 프로그래머들이 재사용할 수 있도록 했습니다. 작성자에게 건배! 이 라이브러리는 개인적으로 또는 다른 오픈 소스 출판물에서 사용할 수 있지만, 출판물에서 이 코드를 재사용하는 것은 하우스 룰의 적용을 받습니다.
면책사항
이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.
파인 라이브러리
진정한 트레이딩뷰 정신에 따라 작성자는 이 파인 코드를 오픈 소스 라이브러리로 공개하여 커뮤니티의 다른 파인 프로그래머들이 재사용할 수 있도록 했습니다. 작성자에게 건배! 이 라이브러리는 개인적으로 또는 다른 오픈 소스 출판물에서 사용할 수 있지만, 출판물에서 이 코드를 재사용하는 것은 하우스 룰의 적용을 받습니다.
면책사항
이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.