PINE LIBRARY
업데이트됨 ArrayMovingAverages

Library "ArrayMovingAverages"
This library adds several moving average methods to arrays, so you can call, eg.:
method emaArray(id, length)
Calculate Exponential Moving Average (EMA) for Arrays
Namespace types: array<float>
Parameters:
id (array<float>): (array<float>) Input array
length (int): (int) Length of the EMA
Returns: (array<float>) Array of EMA values
method ema(id, length)
Get the last value of the EMA array
Namespace types: array<float>
Parameters:
id (array<float>): (array<float>) Input array
length (int): (int) Length of the EMA
Returns: (float) Last EMA value or na if empty
method rmaArray(id, length)
Calculate Rolling Moving Average (RMA) for Arrays
Namespace types: array<float>
Parameters:
id (array<float>): (array<float>) Input array
length (int): (int) Length of the RMA
Returns: (array<float>) Array of RMA values
method rma(id, length)
Get the last value of the RMA array
Namespace types: array<float>
Parameters:
id (array<float>): (array<float>) Input array
length (int): (int) Length of the RMA
Returns: (float) Last RMA value or na if empty
method smaArray(id, windowSize)
Calculate Simple Moving Average (SMA) for Arrays
Namespace types: array<float>
Parameters:
id (array<float>): (array<float>) Input array
windowSize (int): (int) Window size for calculation, defaults to array size
Returns: (array<float>) Array of SMA values
method sma(id, windowSize)
Get the last value of the SMA array
Namespace types: array<float>
Parameters:
id (array<float>): (array<float>) Input array
windowSize (int): (int) Window size for calculation, defaults to array size
Returns: (float) Last SMA value or na if empty
method wmaArray(id, windowSize)
Calculate Weighted Moving Average (WMA) for Arrays
Namespace types: array<float>
Parameters:
id (array<float>): (array<float>) Input array
windowSize (int): (int) Window size for calculation, defaults to array size
Returns: (array<float>) Array of WMA values
method wma(id, windowSize)
Get the last value of the WMA array
Namespace types: array<float>
Parameters:
id (array<float>): (array<float>) Input array
windowSize (int): (int) Window size for calculation, defaults to array size
Returns: (float) Last WMA value or na if empty
This library adds several moving average methods to arrays, so you can call, eg.:
Pine Script®
myArray.ema(3)
method emaArray(id, length)
Calculate Exponential Moving Average (EMA) for Arrays
Namespace types: array<float>
Parameters:
id (array<float>): (array<float>) Input array
length (int): (int) Length of the EMA
Returns: (array<float>) Array of EMA values
method ema(id, length)
Get the last value of the EMA array
Namespace types: array<float>
Parameters:
id (array<float>): (array<float>) Input array
length (int): (int) Length of the EMA
Returns: (float) Last EMA value or na if empty
method rmaArray(id, length)
Calculate Rolling Moving Average (RMA) for Arrays
Namespace types: array<float>
Parameters:
id (array<float>): (array<float>) Input array
length (int): (int) Length of the RMA
Returns: (array<float>) Array of RMA values
method rma(id, length)
Get the last value of the RMA array
Namespace types: array<float>
Parameters:
id (array<float>): (array<float>) Input array
length (int): (int) Length of the RMA
Returns: (float) Last RMA value or na if empty
method smaArray(id, windowSize)
Calculate Simple Moving Average (SMA) for Arrays
Namespace types: array<float>
Parameters:
id (array<float>): (array<float>) Input array
windowSize (int): (int) Window size for calculation, defaults to array size
Returns: (array<float>) Array of SMA values
method sma(id, windowSize)
Get the last value of the SMA array
Namespace types: array<float>
Parameters:
id (array<float>): (array<float>) Input array
windowSize (int): (int) Window size for calculation, defaults to array size
Returns: (float) Last SMA value or na if empty
method wmaArray(id, windowSize)
Calculate Weighted Moving Average (WMA) for Arrays
Namespace types: array<float>
Parameters:
id (array<float>): (array<float>) Input array
windowSize (int): (int) Window size for calculation, defaults to array size
Returns: (array<float>) Array of WMA values
method wma(id, windowSize)
Get the last value of the WMA array
Namespace types: array<float>
Parameters:
id (array<float>): (array<float>) Input array
windowSize (int): (int) Window size for calculation, defaults to array size
Returns: (float) Last WMA value or na if empty
릴리즈 노트
v2Added Hull Moving Average.
Added:
method hmaArray(id, length)
Calculate Hull Moving Average (HMA) for Arrays
Namespace types: array<float>
Parameters:
id (array<float>): (array<float>) Input array
length (int): (int) Length of the HMA
Returns: (array<float>) Array of HMA values
method hma(id, length)
Get the last value of the HMA array
Namespace types: array<float>
Parameters:
id (array<float>): (array<float>) Input array
length (int): (int) Length of the HMA
Returns: (float) Last HMA value or na if empty
릴리즈 노트
v3Lots of performance updates. Please note hma is still quite slow, I'm still investigating ways to improve it.
파인 라이브러리
진정한 트레이딩뷰 정신에 따라 작성자는 이 파인 코드를 오픈 소스 라이브러리로 공개하여 커뮤니티의 다른 파인 프로그래머들이 재사용할 수 있도록 했습니다. 작성자에게 건배! 이 라이브러리는 개인적으로 또는 다른 오픈 소스 출판물에서 사용할 수 있지만, 출판물에서 이 코드를 재사용하는 것은 하우스 룰의 적용을 받습니다.
면책사항
이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.
파인 라이브러리
진정한 트레이딩뷰 정신에 따라 작성자는 이 파인 코드를 오픈 소스 라이브러리로 공개하여 커뮤니티의 다른 파인 프로그래머들이 재사용할 수 있도록 했습니다. 작성자에게 건배! 이 라이브러리는 개인적으로 또는 다른 오픈 소스 출판물에서 사용할 수 있지만, 출판물에서 이 코드를 재사용하는 것은 하우스 룰의 적용을 받습니다.
면책사항
이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.