MightyZinger

Adaptive_Length

MightyZinger Mis à jour   
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
Notes de version:
v2 : Corrected Output of auto_alpha function to Int
Notes de version:
v3 : Fixed float output problem
Notes de version:
v4

Added:
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
Notes de version:
v5 : Corrected "dynamic_2" function and added a 3rd EMA using adaptive length from "dynamic_2" function.

Bibliothèque Pine

Dans le véritable esprit de TradingView, l'auteur a publié ce code Pine en tant que bibliothèque open-source afin que d'autres programmeurs Pine de notre communauté puissent le réutiliser. Bravo à l'auteur ! Vous pouvez utiliser cette bibliothèque à titre privé ou dans d'autres publications open-source, mais la réutilisation de ce code dans une publication est régie par notre Règlement.

Clause de non-responsabilité

Les informations et les publications ne sont pas destinées à être, et ne constituent pas, des conseils ou des recommandations en matière de finance, d'investissement, de trading ou d'autres types de conseils fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.

Vous voulez utiliser cette bibliothèque?

Copiez le texte dans le presse-papiers et collez-le dans votre script.