ezrakoper

LIB_TradeAssist

ezrakoper Updated   
Library "LIB_TradeAssist"
This library is a collection of assistence tools saving me the need to copy same code again and again in my various indicators and strategies.

Slop_Magnitude(val_now, val_older, mult_factor)
  Calculate the slop magnetude betwen current price and an older price. Since the change is usually minimal, we multiply it by def value of 3000 to make it usable.You can optionally pass other multiply factor
  Parameters:
    val_now (float)
    val_older (float)
    mult_factor (float)
  Returns: : Slop angle magnetude
Release Notes:
v2

Added:
moving_avg(ma_type, price, length)
  - calculate moving average using one of the above - SMA, EMA, WMA, ALMA, RMA, VWMA,
  Parameters:
    ma_type (simple string)
    price (simple float)
    length (simple int)
  Returns: : - Moving average value
Release Notes:
v3

Updated:
moving_avg(ma_type, price, length)
  - calculate moving average using one of the above - S MA, EMA, WMA, ALMA, RMA, VWMA,
  Parameters:
    ma_type (simple string)
    price (simple float)
    length (simple int)
  Returns: : - Moving average value
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 a publication 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.

Want to use this library?

Copy the following line and paste it in your script.