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
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
發行說明
v3
Lots of performance updates. Please note hma is still quite slow, I'm still investigating ways to improve it.
Pine腳本庫
秉持 TradingView 一貫的共享精神,作者將此 Pine 程式碼發佈為開源庫,讓社群中的其他 Pine 程式設計師能夠重複使用。向作者致敬!您可以在私人專案或其他開源發佈中使用此庫,但在公開發佈中重複使用該程式碼需遵守社群規範。