PINE LIBRARY
Güncellendi NR_Versatilities

Library "NR_Versatilities"
Versatilities (aka, Versatile Utilities) includes:
- Seventeen Price Variants returned as a tuple,
- Eight Smoothing functions rolled into one,
- Pick any Past Value from any series with offset,
- Or just the previous value from any series.
pastVal(src, len)
Fetches past value from src that came len distance ago
Parameters:
src (float): source series
len (int): lookback distance - (optional) default is 1
Returns: latest src if len <= 0, else src[len]
previous(src)
Fetches past value from src that came len distance ago
Parameters:
src (float): source series
Returns: previous value in the series if found, else current value
price_variants()
Computes Several different averages using current and previous OHLC values
Returns: Seventeen Uncommon Average Price Combinations
dynamic_MA(matyp, masrc, malen, lsmaoff, almasgm, almaoff, almaflr)
Dynamically computes Eight different MAs on-demand individually, or an average of all taken together
Parameters:
matyp (string): pick one of these MAs - ALMA, EMA, HMA, LSMA, RMA, SMA, SWMA, WMA, ALL [= average of all MAs]
masrc (float): source series to compute MA
malen (simple int): lookback distance for MA
lsmaoff (simple int): optional LSMA offset - default is 0
almasgm (simple float): optional ALMA sigma - default is 5
almaoff (simple float): optional ALMA offset - default is 0.5
almaflr (simple bool): optional ALMA floor flag - default is false
Returns: MA series for chosen type or, an average of all of them, if chosen so
Versatilities (aka, Versatile Utilities) includes:
- Seventeen Price Variants returned as a tuple,
- Eight Smoothing functions rolled into one,
- Pick any Past Value from any series with offset,
- Or just the previous value from any series.
pastVal(src, len)
Fetches past value from src that came len distance ago
Parameters:
src (float): source series
len (int): lookback distance - (optional) default is 1
Returns: latest src if len <= 0, else src[len]
previous(src)
Fetches past value from src that came len distance ago
Parameters:
src (float): source series
Returns: previous value in the series if found, else current value
price_variants()
Computes Several different averages using current and previous OHLC values
Returns: Seventeen Uncommon Average Price Combinations
dynamic_MA(matyp, masrc, malen, lsmaoff, almasgm, almaoff, almaflr)
Dynamically computes Eight different MAs on-demand individually, or an average of all taken together
Parameters:
matyp (string): pick one of these MAs - ALMA, EMA, HMA, LSMA, RMA, SMA, SWMA, WMA, ALL [= average of all MAs]
masrc (float): source series to compute MA
malen (simple int): lookback distance for MA
lsmaoff (simple int): optional LSMA offset - default is 0
almasgm (simple float): optional ALMA sigma - default is 5
almaoff (simple float): optional ALMA offset - default is 0.5
almaflr (simple bool): optional ALMA floor flag - default is false
Returns: MA series for chosen type or, an average of all of them, if chosen so
Sürüm Notları
v2Updated:
pastVal(src, len)
Fetches past value from src that came len distance ago
Parameters:
src (float): source series
len (int): lookback distance - (optional) default is 1
Returns: latest src if len <= 0, else src[len] (rounded-to-mintick)
price_variants()
Computes Several different averages using current and previous OHLC values
Returns: Map of Eighteen Uncommon Combinations of single and two-bar OHLC averages (rounded-to-mintick)
dynamic_MA(matyp, masrc, malen, lsmaoff, almasgm, almaoff, almaflr)
Dynamically computes Eight different MAs on-demand individually, or an average of all taken together
Parameters:
matyp (string): pick one of these MAs - ALMA, EMA, HMA, LSMA, RMA, SMA, SWMA, WMA, ALL [= average of all MAs]
masrc (float): source series to compute MA
malen (simple int): lookback distance for MA
lsmaoff (simple int): optional LSMA offset - default is 0
almasgm (simple float): optional ALMA sigma - default is 5
almaoff (simple float): optional ALMA offset - default is 0.5
almaflr (simple bool): optional ALMA floor flag - default is false
Returns: MA series for chosen type or, an average of all of them, if chosen so (rounded-to-mintick)
Sürüm Notları
v3Updated:
dynamic_MA(masrc, malen, lsmaoff, almasgm, almaoff, almaflr)
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
lsmaoff (simple int): optional LSMA offset - default is 0
almasgm (simple float): optional ALMA sigma - default is 5
almaoff (simple float): optional ALMA offset - default is 0.5
almaflr (simple bool): optional ALMA floor flag - default is false
Returns: Map of MAs - 'ALMA', 'EMA', 'HMA', 'LSMA', 'RMA', 'SMA', 'SWMA', 'WMA', 'ALL' (rounded-to-mintick)
Pine kitaplığı
Gerçek TradingView ruhuyla, yazar bu Pine kodunu açık kaynaklı bir kütüphane olarak yayınladı, böylece topluluğumuzdaki diğer Pine programcıları onu yeniden kullanabilir. Yazara saygı! Bu kütüphaneyi özel olarak veya diğer açık kaynaklı yayınlarda kullanabilirsiniz, ancak bu kodun bir yayında yeniden kullanımı Site Kuralları tarafından yönetilmektedir.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.
Pine kitaplığı
Gerçek TradingView ruhuyla, yazar bu Pine kodunu açık kaynaklı bir kütüphane olarak yayınladı, böylece topluluğumuzdaki diğer Pine programcıları onu yeniden kullanabilir. Yazara saygı! Bu kütüphaneyi özel olarak veya diğer açık kaynaklı yayınlarda kullanabilirsiniz, ancak bu kodun bir yayında yeniden kullanımı Site Kuralları tarafından yönetilmektedir.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.