PINE LIBRARY

PineVersatilitiesBundle

144
Enhanced the dynamic_MA function by adding five more MA types to the eight existing types.
Added neo_heikin_ashi_ohlc function for Customised or Standard Heikin-Ashi OHLC values tuple.

Library "PineVersatilitiesBundle"
Versatilities (aka, Versatile Utilities) Pack includes:
- Price Variants bundled in a Map,
- Smoothing Variants bundled in a Map,
- Standard and customised Heikin-Ashi values in a tuple,
- Visualisations that plot some indications in the pane and others, including candles/bars, on the chart.

price_variants(lb, hop, op, cl, fmean, hi, lo, mid, pvt, cmean)
  Computes Several different averages using current and previous OHLC values
  Parameters:
    lb (int): lookback distance for combining OHLC values from the past; optional input, default is 1
    hop (int): skip bars while looking back; optional input, default is 0
    op (float): open value; optional input, default is open
    cl (float): close value; optional input, default is close
    fmean (float): bar average; optional input, default is ohlc4
    hi (float): high value; optional input, default is high
    lo (float): low value; optional input, default is low
    mid (float): range middle; optional input, default is hl2
    pvt (float): active pivot; optional input, default is hlc3
    cmean (float): active average; optional input, default is hlcc4
  Returns: Map of, rounded-to-mintick, combinations of single and two-bar OHLC averages

dynamic_MA(masrc, malen, almasgm, almaoff, almaflr, lsmaoff, volfctr)
  Dynamically computes Eight different MAs and returns a Map containing Nine MAs
  Parameters:
    masrc (float): source series to compute MA
    malen (simple int): lookback distance for MA
    almasgm (simple float): ALMA sigma; optional input, default is 5
    almaoff (simple float): ALMA offset; optional input, default is 0.5
    almaflr (simple bool): ALMA floor flag; optional input, default is false
    lsmaoff (simple int): LSMA offset; optional input, default is 0
    volfctr (simple float): T3/Tilson MA volume factor; optional input, default is 0.5
  Returns: Map of, rounded-to-mintick, MAs - 'ALMA', 'DEMA', 'EMA', 'FRAMA', 'HMA', 'LSMA', 'RMA',
'SMA', 'SWMA', 'T3MA', 'TEMA', 'TRIMA', 'WMA', plus an 'ALL' for the average of all other MAs

neo_heikin_ashi_ohlc(customised, standard, op, cl, avbar, hi, lo, avrng, pivot, pvtcl)
  Computes customised or standard Heikin Ashi candles/bars OHLC values
  Parameters:
    customised (bool): toggle for computing customised Heikin Ashi OHLC; optional input, default is true; ignores standard setting
    standard (bool): toggle for computing standard Heikin Ashi OHLC; optional input, default is false
    op (float): open value; optional input, default is open
    cl (float): close value; optional input, default is close
    avbar (float): bar average; optional input, default is ohlc4
    hi (float): high value; optional input, default is high
    lo (float): low value; optional input, default is low
    avrng (float): range middle; optional input, default is hl2
    pivot (float): active pivot; optional input, default is hlc3
    pvtcl (float): active average; optional input, default is hlcc4
  Returns: Tuple of, rounded-to-mintick, Customised or Standard Heikin-Ashi OHLC and its common averages

Penafian

Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.