aminio5

AminioLibrary

Library "AminioLibrary"
: this is my personal library that is being used in different indicators and strategies

calculateMA(source, len, maType)
  This fuction returns a moving average value based on the type
  Parameters:
    source (float): Is the time series source to calculate average from
    len (simple int): The length of the moving average, this should be integer
    maType (string): The type of moving average, acceptable types are : SMA, HMA, EMA, RMA, WMA, VWMA
  Returns: value of moving average

atr(source, len)
  This fuction returns atr value for a given source
  Parameters:
    source (float): Is the time series source to calculate atr from
    len (simple int): The length of the atr, this should be integer
  Returns: value of atr from source

superTrend(source, factor, len)
  This fuction returns value of super trend indicator and the trend direction as a tupple
  Parameters:
    source (float): Is the time series source to calculate super trend from
    factor (simple float): The multiplication factor for upper and lower band calcualtion, this can be a float
    len (simple int): The length of the super trend, this should be integer
  Returns: value of atr from source

halfTrend(am, chdev)
  This fuction returns a hTrend type carrying different values for half trend indicator
  Parameters:
    am (int): This is the amplitude used for calcucating the half trend, use integers
    chdev (float): This is the Channel Deviation value used for calculating upper and lower atr channel boundaries, you can use floats
  Returns: hTrend data type

hTrend
  Fields:
    halfTrend (series__float)
    trend (series__integer)
    atrHigh (series__float)
    atrLow (series__float)
    arrowUp (series__float)
    arrowDown (series__float)

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.