PINE LIBRARY
업데이트됨 Points

Library "Points"
Provides functions for simplifying operations with collections of x+y coordinates. Where x is typically a bar index or time (millisecond) value.
new(size) Creates two arrays. One for X (int[]) and another for Y (float[]).
Parameters:
size: The initial size of the arrays.
size(xA, yA) Checks the size of the arrays and if they're equal returns the size.
Parameters:
xA: The X array.
yA: The Y array.
get(xA, yA, index) Gets the X and Y values of the arrays at the index.
Parameters:
xA: The X array.
yA: The Y array.
index: The index.
Returns: [x, y]
set(xA, yA, index, x, y) Sets the X and Y values of the arrays at the index.
Parameters:
xA: The X array.
yA: The Y array.
index: The index.
x: The x value.
y: The y value.
Returns: [index, x, y]
push(xA, yA, x, y) Adds X and Y values to the end of the arrays (as the last element).
Parameters:
xA: The X array.
yA: The Y array.
x: The x value.
y: The y value.
Returns: [index, x, y]
unshift(xA, yA, x, y) Adds X and Y values to the beginning of the arrays (as the first element).
Parameters:
xA: The X array.
yA: The Y array.
x: The x value.
y: The y value.
Returns: [index, x, y]
insert(xA, yA, index, x, y) Inserts X and Y values to the arrays at the index.
Parameters:
xA: The X array.
yA: The Y array.
index: The index to insert at.
x: The x value.
y: The y value.
Returns: [index, x, y]
pop(xA, yA) Removes the last element from the arrays and returns their value.
Parameters:
xA: The X array.
yA: The Y array.
Returns: [x, y]
shift(xA, yA) Removes the first element from the arrays and returns their value.
Parameters:
xA: The X array.
yA: The Y array.
Returns: [x, y]
remove(xA, yA) Removes the element from the arrays at the index and returns their value.
Parameters:
xA: The X array.
yA: The Y array.
Returns: [x, y]
first(xA, yA) Gets the X and Y values of the first element.
Parameters:
xA: The X array.
yA: The Y array.
Returns: [x, y]
last(xA, yA) Gets the X and Y values of the last element.
Parameters:
xA: The X array.
yA: The Y array.
Returns: [x, y]
allIndexesBetween(xA, lo, hi, start, ordered) Gets the indexes that have values at or above the low value and below the high value.
Parameters:
xA: The X array.
lo: The inclusive low value.
hi: The excluded hi value.
start: The optional index to start the backwards search.
ordered: If true, the search ends when the first value is found that is less than the low.
lastIndexBetween(xA, lo, hi, start, ordered) Gets the first found from the end that has a value at or above the low value and below the high value.
Parameters:
xA: The X array.
lo: The inclusive low value.
hi: The excluded hi value.
start: The optional index to start the backwards search.
ordered: If true, the search ends when the first value is found that is less than the low.
lastIndexBelow(xA, hi, start) Gets the first found from the end that has a value below the high value.
Parameters:
xA: The X array.
hi: The excluded hi value.
start: The optional index to start the backwards search.
Provides functions for simplifying operations with collections of x+y coordinates. Where x is typically a bar index or time (millisecond) value.
new(size) Creates two arrays. One for X (int[]) and another for Y (float[]).
Parameters:
size: The initial size of the arrays.
size(xA, yA) Checks the size of the arrays and if they're equal returns the size.
Parameters:
xA: The X array.
yA: The Y array.
get(xA, yA, index) Gets the X and Y values of the arrays at the index.
Parameters:
xA: The X array.
yA: The Y array.
index: The index.
Returns: [x, y]
set(xA, yA, index, x, y) Sets the X and Y values of the arrays at the index.
Parameters:
xA: The X array.
yA: The Y array.
index: The index.
x: The x value.
y: The y value.
Returns: [index, x, y]
push(xA, yA, x, y) Adds X and Y values to the end of the arrays (as the last element).
Parameters:
xA: The X array.
yA: The Y array.
x: The x value.
y: The y value.
Returns: [index, x, y]
unshift(xA, yA, x, y) Adds X and Y values to the beginning of the arrays (as the first element).
Parameters:
xA: The X array.
yA: The Y array.
x: The x value.
y: The y value.
Returns: [index, x, y]
insert(xA, yA, index, x, y) Inserts X and Y values to the arrays at the index.
Parameters:
xA: The X array.
yA: The Y array.
index: The index to insert at.
x: The x value.
y: The y value.
Returns: [index, x, y]
pop(xA, yA) Removes the last element from the arrays and returns their value.
Parameters:
xA: The X array.
yA: The Y array.
Returns: [x, y]
shift(xA, yA) Removes the first element from the arrays and returns their value.
Parameters:
xA: The X array.
yA: The Y array.
Returns: [x, y]
remove(xA, yA) Removes the element from the arrays at the index and returns their value.
Parameters:
xA: The X array.
yA: The Y array.
Returns: [x, y]
first(xA, yA) Gets the X and Y values of the first element.
Parameters:
xA: The X array.
yA: The Y array.
Returns: [x, y]
last(xA, yA) Gets the X and Y values of the last element.
Parameters:
xA: The X array.
yA: The Y array.
Returns: [x, y]
allIndexesBetween(xA, lo, hi, start, ordered) Gets the indexes that have values at or above the low value and below the high value.
Parameters:
xA: The X array.
lo: The inclusive low value.
hi: The excluded hi value.
start: The optional index to start the backwards search.
ordered: If true, the search ends when the first value is found that is less than the low.
lastIndexBetween(xA, lo, hi, start, ordered) Gets the first found from the end that has a value at or above the low value and below the high value.
Parameters:
xA: The X array.
lo: The inclusive low value.
hi: The excluded hi value.
start: The optional index to start the backwards search.
ordered: If true, the search ends when the first value is found that is less than the low.
lastIndexBelow(xA, hi, start) Gets the first found from the end that has a value below the high value.
Parameters:
xA: The X array.
hi: The excluded hi value.
start: The optional index to start the backwards search.
릴리즈 노트
v2 Updated thumbnail.릴리즈 노트
v3 Updated thumbnail.릴리즈 노트
v4 Updated thumbnail.릴리즈 노트
v5 Added 'add' method for automatically inserting by X value.Added:
add(xA, yA, x, y) Inserts the X and Y values into the arrays based upon the X value assuming the the arrays is ordered by X.
Parameters:
xA: The X array.
yA: The Y array.
x: The x value.
y: The y value.
Returns: [index, x, y]
릴리즈 노트
v6 fixed issue with non-short-circut logic.파인 라이브러리
진정한 트레이딩뷰 정신에 따라 작성자는 이 파인 코드를 오픈 소스 라이브러리로 공개하여 커뮤니티의 다른 파인 프로그래머들이 재사용할 수 있도록 했습니다. 작성자에게 건배! 이 라이브러리는 개인적으로 또는 다른 오픈 소스 출판물에서 사용할 수 있지만, 출판물에서 이 코드를 재사용하는 것은 하우스 룰의 적용을 받습니다.
면책사항
이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.
파인 라이브러리
진정한 트레이딩뷰 정신에 따라 작성자는 이 파인 코드를 오픈 소스 라이브러리로 공개하여 커뮤니티의 다른 파인 프로그래머들이 재사용할 수 있도록 했습니다. 작성자에게 건배! 이 라이브러리는 개인적으로 또는 다른 오픈 소스 출판물에서 사용할 수 있지만, 출판물에서 이 코드를 재사용하는 것은 하우스 룰의 적용을 받습니다.
면책사항
이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.