PINE LIBRARY
업데이트됨 arrayutils

Library "_arrayutils"
Library contains utility functions using arrays.
delete(arr, index)
remove an item from array at specific index. Also deletes the item
Parameters:
arr: - array from which the item needs to be deleted
index: - index of item to be deleted
Returns: void
pop(arr)
remove the last item from array. Also deletes the item
Parameters:
arr: - array from which the last item needs to be removed and deleted
Returns: void
shift(arr)
remove an item from array at index 0. Also deletes the item
Parameters:
arr: - array from which the first item needs to be removed and deleted
Returns: void
unshift(arr, val, maxItems)
add an item to the beginning of an array with max items cap
Parameters:
arr: - array to which the item needs to be added at the beginning
val: - value of item which needs to be added
maxItems: - max items array can hold. After that, items are removed from the other end
Returns: resulting array
clear(arr)
remove and delete all items in an array
Parameters:
arr: - array which needs to be cleared
Returns: void
push(arr, val, maxItems)
add an item to the end of an array with max items cap
Parameters:
arr: - array to which the item needs to be added at the beginning
val: - value of item which needs to be added
maxItems: - max items array can hold. After that, items are removed from the starting index
Returns: resulting array
check_overflow(pivots, barArray, dir)
finds difference between two timestamps
Parameters:
pivots: pivots array
barArray: pivot bar array
dir: direction for which overflow need to be checked
Returns: bool overflow
get_trend_series(pivots, length, highLow, trend)
finds series of pivots in particular trend
Parameters:
pivots: pivots array
length: length for which trend series need to be checked
highLow: filter pivot high or low
trend: Uptrend or Downtrend
Returns: int[] trendIndexes
get_trend_series(pivots, firstIndex, lastIndex)
finds series of pivots in particular trend
Parameters:
pivots: pivots array
firstIndex: First index of the series
lastIndex: Last index of the series
Returns: int[] trendIndexes
sma(source)
calculates sma for elements in array
Parameters:
source: source array
Returns: float sma
ema(source, length)
calculates ema for elements in array
Parameters:
source: source array
length: ema length
Returns: float ema
rma(source, length)
calculates rma for elements in array
Parameters:
source: source array
length: rma length
Returns: float rma
wma(source, length)
calculates wma for elements in array
Parameters:
source: source array
length: wma length
Returns: float wma
hma(source, length)
calculates hma for elements in array
Parameters:
source: source array
length: hma length
Returns: float hma
ma(source, matype, length)
wrapper for all moving averages based on array
Parameters:
source: source array
matype: moving average type. Valud values are: sma, ema, rma, wma and hma
length: moving average length length
Returns: float moving average
getFibSeries(numberOfFibs, start)
gets fib series in array
Parameters:
numberOfFibs: number of fibs
start: starting number
Returns: float[] fibArray
Library contains utility functions using arrays.
delete(arr, index)
remove an item from array at specific index. Also deletes the item
Parameters:
arr: - array from which the item needs to be deleted
index: - index of item to be deleted
Returns: void
pop(arr)
remove the last item from array. Also deletes the item
Parameters:
arr: - array from which the last item needs to be removed and deleted
Returns: void
shift(arr)
remove an item from array at index 0. Also deletes the item
Parameters:
arr: - array from which the first item needs to be removed and deleted
Returns: void
unshift(arr, val, maxItems)
add an item to the beginning of an array with max items cap
Parameters:
arr: - array to which the item needs to be added at the beginning
val: - value of item which needs to be added
maxItems: - max items array can hold. After that, items are removed from the other end
Returns: resulting array
clear(arr)
remove and delete all items in an array
Parameters:
arr: - array which needs to be cleared
Returns: void
push(arr, val, maxItems)
add an item to the end of an array with max items cap
Parameters:
arr: - array to which the item needs to be added at the beginning
val: - value of item which needs to be added
maxItems: - max items array can hold. After that, items are removed from the starting index
Returns: resulting array
check_overflow(pivots, barArray, dir)
finds difference between two timestamps
Parameters:
pivots: pivots array
barArray: pivot bar array
dir: direction for which overflow need to be checked
Returns: bool overflow
get_trend_series(pivots, length, highLow, trend)
finds series of pivots in particular trend
Parameters:
pivots: pivots array
length: length for which trend series need to be checked
highLow: filter pivot high or low
trend: Uptrend or Downtrend
Returns: int[] trendIndexes
get_trend_series(pivots, firstIndex, lastIndex)
finds series of pivots in particular trend
Parameters:
pivots: pivots array
firstIndex: First index of the series
lastIndex: Last index of the series
Returns: int[] trendIndexes
sma(source)
calculates sma for elements in array
Parameters:
source: source array
Returns: float sma
ema(source, length)
calculates ema for elements in array
Parameters:
source: source array
length: ema length
Returns: float ema
rma(source, length)
calculates rma for elements in array
Parameters:
source: source array
length: rma length
Returns: float rma
wma(source, length)
calculates wma for elements in array
Parameters:
source: source array
length: wma length
Returns: float wma
hma(source, length)
calculates hma for elements in array
Parameters:
source: source array
length: hma length
Returns: float hma
ma(source, matype, length)
wrapper for all moving averages based on array
Parameters:
source: source array
matype: moving average type. Valud values are: sma, ema, rma, wma and hma
length: moving average length length
Returns: float moving average
getFibSeries(numberOfFibs, start)
gets fib series in array
Parameters:
numberOfFibs: number of fibs
start: starting number
Returns: float[] fibArray
릴리즈 노트
v22Updated:
ma(source, matype, length)
wrapper for all moving averages based on array
Parameters:
source (float[]): source array
matype (simple string): moving average type. Valud values are: sma, ema, rma, wma, hma, high, low, median, medianHigh, medianLow
length (simple int): moving average length length
Returns: float moving average
파인 라이브러리
진정한 트레이딩뷰 정신에 따라 작성자는 이 파인 코드를 오픈 소스 라이브러리로 공개하여 커뮤니티의 다른 파인 프로그래머들이 재사용할 수 있도록 했습니다. 작성자에게 건배! 이 라이브러리는 개인적으로 또는 다른 오픈 소스 출판물에서 사용할 수 있지만, 출판물에서 이 코드를 재사용하는 것은 하우스 룰의 적용을 받습니다.
Trial - trendoscope.io/trial
Subscribe - trendoscope.io/pricing
Disclosure: I am part of Trade Nation's Influencer program and receive a monthly fee for using their TradingView charts in my analyses and educational articles.
Subscribe - trendoscope.io/pricing
Disclosure: I am part of Trade Nation's Influencer program and receive a monthly fee for using their TradingView charts in my analyses and educational articles.
면책사항
이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.
파인 라이브러리
진정한 트레이딩뷰 정신에 따라 작성자는 이 파인 코드를 오픈 소스 라이브러리로 공개하여 커뮤니티의 다른 파인 프로그래머들이 재사용할 수 있도록 했습니다. 작성자에게 건배! 이 라이브러리는 개인적으로 또는 다른 오픈 소스 출판물에서 사용할 수 있지만, 출판물에서 이 코드를 재사용하는 것은 하우스 룰의 적용을 받습니다.
Trial - trendoscope.io/trial
Subscribe - trendoscope.io/pricing
Disclosure: I am part of Trade Nation's Influencer program and receive a monthly fee for using their TradingView charts in my analyses and educational articles.
Subscribe - trendoscope.io/pricing
Disclosure: I am part of Trade Nation's Influencer program and receive a monthly fee for using their TradingView charts in my analyses and educational articles.
면책사항
이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.