PINE LIBRARY
已更新 Adaptive_Length

Library "Adaptive_Length"
This library contains functions to calculate Adaptive dynamic length which can be used in Moving Averages and other indicators.
Two Exponential Moving Averages (EMA) are plotted. Coloring in plot is derived from Chikou filter and Dynamic length of MA1 is adapted using Signal output from Chikou library.
dynamic(para, adapt_Pct, minLength, maxLength) Adaptive dynamic length based on boolean parameter
Parameters:
para: Boolean parameter; if true then length would decrease and would increase if its false
adapt_Pct: Percentage adaption based on parameter
minLength: Minimum allowable length
maxLength: Maximum allowable length
Returns: Adaptive Dynamic Length based on Boolean Parameter
auto_alpha(src, a) Adaptive length based on automatic alpha calculations from source input
Parameters:
src: Price source for alpha calculations
a: Input Alpha value
Returns: Adaptive Length calculated from input price Source and Alpha
This library contains functions to calculate Adaptive dynamic length which can be used in Moving Averages and other indicators.
Two Exponential Moving Averages (EMA) are plotted. Coloring in plot is derived from Chikou filter and Dynamic length of MA1 is adapted using Signal output from Chikou library.
dynamic(para, adapt_Pct, minLength, maxLength) Adaptive dynamic length based on boolean parameter
Parameters:
para: Boolean parameter; if true then length would decrease and would increase if its false
adapt_Pct: Percentage adaption based on parameter
minLength: Minimum allowable length
maxLength: Maximum allowable length
Returns: Adaptive Dynamic Length based on Boolean Parameter
auto_alpha(src, a) Adaptive length based on automatic alpha calculations from source input
Parameters:
src: Price source for alpha calculations
a: Input Alpha value
Returns: Adaptive Length calculated from input price Source and Alpha
發行說明
v2 : Corrected Output of auto_alpha function to Int發行說明
v3 : Fixed float output problem發行說明
v4Added:
dynamic_2(up_para, dn_para, adapt_Pct, minLength, maxLength) Adaptive dynamic length based on two boolean parameters for increasing and decreasing dynamic length seperatally with more precision
Parameters:
up_para: Boolean parameter; if true then length would decrease
dn_para: Boolean parameter; if true then length would increase
adapt_Pct: Percentage adaption based on parameter
minLength: Minimum allowable length
maxLength: Maximum allowable length
Returns: Adaptive Dynamic Length based on Two Boolean Parameters for increasing and decreasing dynamic length seperatally with more precision
發行說明
v5 : Corrected "dynamic_2" function and added a 3rd EMA using adaptive length from "dynamic_2" function.Pine腳本庫
秉持 TradingView 一貫的共享精神,作者將此 Pine 程式碼發佈為開源庫,讓社群中的其他 Pine 程式設計師能夠重複使用。向作者致敬!您可以在私人專案或其他開源發佈中使用此庫,但在公開發佈中重複使用該程式碼需遵守社群規範。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。
Pine腳本庫
秉持 TradingView 一貫的共享精神,作者將此 Pine 程式碼發佈為開源庫,讓社群中的其他 Pine 程式設計師能夠重複使用。向作者致敬!您可以在私人專案或其他開源發佈中使用此庫,但在公開發佈中重複使用該程式碼需遵守社群規範。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。