TradingView
QuantraSystems
18 mar 2024 11:51

DynamicFunctions 

WIFUSDT Perpetual ContractBybit

Beskrivning

Library "DynamicFunctions"
Custom Dynamic functions that allow an adaptive calculation beginning from the first bar

RoC(src, period)
  Dynamic RoC
  Parameters:
    src (float): and period
Custom function to calculate the actual period considering non-na source values
    period (int)

dynamicMedian(src, length)
  Dynamic Median
  Parameters:
    src (float): and length
    length (int)

kernelRegression(src, bandwidth, kernel_type)
  Dynamic Kernel Regression Calculation \n Uses either of the following inputs for kernel_type:\nEpanechnikov\nLogistic\nWave
  Parameters:
    src (float)
    bandwidth (int)
    kernel_type (string)

waveCalculation(source, bandwidth, width)
  Use together with kernelRegression function to get chart applicable band
  Parameters:
    source (float)
    bandwidth (int)
    width (float)

Rsi(src, length)
  Dynamic RSI function
  Parameters:
    src (float)
    length (int)

dynamicStdev(src, period)
  Dynamic SD function
  Parameters:
    src (float)
    period (int)

stdv_bands(src, length, mult)
  Dynamic SD Bands
  Parameters:
    src (float)
    length (int)
    mult (float)
  Returns: Basis, Positive SD, Negative SD

Adx(dilen, adxlen)
  Dynamic ADX
  Parameters:
    dilen (int)
    adxlen (int)
  Returns: adx

Atr(length)
  Dynamic ATR
  Parameters:
    length (int)
  Returns: ATR

Macd(source, fastLength, slowLength, signalSmoothing)
  Dynamic MACD
  Parameters:
    source (float)
    fastLength (int)
    slowLength (int)
    signalSmoothing (int)
  Returns: macdLine, signalLine, histogram
Kommentarer
fangcongyonghao
Hi, I'm curious how to use this indicator? Do I need to import this library locally? Is this for automated trading?
QuantraSystems
@fangcongyonghao, Hi!
The DynamicFunctions library is used for Pine Script indicator development.

Importing the library be calling:
'import QuantraSystems/DynamicFunctions/1 as x'
in a scripts header allows the utilization of the 'Dynamic Functions' within the script.

Any sub indicators within the new script can then display values without the minimum lookback period normally required. Allowing indicators to display usefully data on a newer timeseries or on a high timeframe, for example.

The header image shows this in practice, comparing the default RSI with the Dynamic Version found in this library.

Hopefully this answers your question, if not feel free to reach out again!
fangcongyonghao
@QuantraSystems, Thanks, I understand through your explanation. I am very curious about every new content you publish. Thank you for publishing so much high-quality content.
QuantraSystems
@fangcongyonghao, I'm glad I could help!
I appreciate your words of encouragement and hope to continue providing value to you and the Tradingview community!
Mer