StapleIndicatorsLibrary "StapleIndicators"
This Library provides some common indicators commonly referenced from other studies in Pine Script
squeeze(bbSrc, bbPeriod, bbDev, kcSrc, kcPeriod, kcATR, signalPeriod) Volatility Squeeze
Parameters:
bbSrc : (Optional) Bollinger Bands Source. By default close
bbPeriod : (Optional) Bollinger Bands Period. By default 20
bbDev : (Optional) Bollinger Bands Standard Deviation. By default 2.0
kcSrc : (Optional) Keltner Channel Source. By default close
kcPeriod : (Optional) Keltner Channel Period. By default 20
kcATR : (Optional) Keltner Channel ATR Multiplier. By default 1.5
signalPeriod : (Optional) Keltner Channel ATR Multiplier. By default 1.5
Returns:
adx(diPeriod, adxPeriod, signalPeriod, adxTier1, adxTier2, adxTier3) ADX: Average Directional Index
Parameters:
diPeriod : (Optional) Directional Indicator Period. By default 14
adxPeriod : (Optional) ADX Smoothing. By default 14
signalPeriod : (Optional) Signal Period. By default 13
adxTier1 : (Optional) ADX Tier #1 Level. By default 20
adxTier2 : (Optional) ADX Tier #2 Level. By default 15
adxTier3 : (Optional) ADX Tier #3 Level. By default 10
Returns:
smaPreset(srcMa) Delivers a set of frequently used Simple Moving Averages
Parameters:
srcMa : (Optional) MA Source. By default 'close'
Returns:
emaPreset(srcMa) Delivers a set of frequently used Exponential Moving Averages
Parameters:
srcMa : (Optional) MA Source. By default 'close'
Returns:
maSelect(ma, srcMa) Filters and outputs the selected MA
Parameters:
ma : (Optional) MA text. By default 'Ema-21'
srcMa : (Optional) MA Source. By default 'close'
Returns: maSelected
periodAdapt(modeAdaptative, src, maxLen, minLen) Adaptative Period
Parameters:
modeAdaptative : (Optional) Adaptative Mode. By default 'Average'
src : (Optional) Source. By default 'close'
maxLen : (Optional) Max Period. By default '60'
minLen : (Optional) Min Period. By default '4'
Returns: periodAdaptative
azlema(modeAdaptative, srcMa) Azlema: Adaptative Zero-Lag Ema
Parameters:
modeAdaptative : (Optional) Adaptative Mode. By default 'Average'
srcMa : (Optional) MA Source. By default 'close'
Returns: azlema
ssma(lsmaVar, srcMa, periodMa) SSMA: Smooth Simple MA
Parameters:
lsmaVar : Linear Regression Curve.
srcMa : (Optional) MA Source. By default 'close'
periodMa : (Optional) MA Period. By default '13'
Returns: ssma
jvf(srcMa, periodMa) Jurik Volatility Factor
Parameters:
srcMa : (Optional) MA Source. By default 'close'
periodMa : (Optional) MA Period. By default '7'
Returns:
jBands(srcMa, periodMa) Jurik Bands
Parameters:
srcMa : (Optional) MA Source. By default 'close'
periodMa : (Optional) MA Period. By default '7'
Returns:
jma(srcMa, periodMa, phase) Jurik MA (JMA)
Parameters:
srcMa : (Optional) MA Source. By default 'close'
periodMa : (Optional) MA Period. By default '7'
phase : (Optional) Phase. By default '50'
Returns: jma
maCustom(ma, srcMa, periodMa, lrOffset, almaOffset, almaSigma, jmaPhase, azlemaMode) Creates a custom Moving Average
Parameters:
ma : (Optional) MA text. By default 'Ema'
srcMa : (Optional) MA Source. By default 'close'
periodMa : (Optional) MA Period. By default '13'
lrOffset : (Optional) Linear Regression Offset. By default '0'
almaOffset : (Optional) Alma Offset. By default '0.85'
almaSigma : (Optional) Alma Sigma. By default '6'
jmaPhase : (Optional) JMA Phase. By default '50'
azlemaMode : (Optional) Azlema Adaptative Mode. By default 'Average'
Returns: maTF