PINE LIBRARY
PineVersatilitiesBundle

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
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
Pine library
In true TradingView spirit, the author has published this Pine code as an open-source library so that other Pine programmers from our community can reuse it. Cheers to the author! You may use this library privately or in other open-source publications, but reuse of this code in publications is governed by House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Pine library
In true TradingView spirit, the author has published this Pine code as an open-source library so that other Pine programmers from our community can reuse it. Cheers to the author! You may use this library privately or in other open-source publications, but reuse of this code in publications is governed by House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.