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が提供または保証する金融、投資、取引、またはその他の種類のアドバイスや推奨を意図したものではなく、またそのようなものでもありません。詳しくは利用規約をご覧ください。