PINE LIBRARY

oota

1 165
Library "oota"
Collection of all custom and enhanced TA indicators - Object oriented methods implementation

method tr(c, useTrueRange)
  returns true range of the candle
  Namespace types: Candle
  Parameters:
    c (Candle): Candle object containing ohlc data
    useTrueRange (bool): Use true range for atr calculation instead of just high/low difference

method ma(maType, length, source)
  returns custom moving averages
  Namespace types: simple CustomSeries
  Parameters:
    maType (simple CustomSeries): Custom series type
    length (simple int): Moving Average Length
    source (float): Moving Average Source
  Returns: moving average for the given type and length

method atr(maType, length, useTrueRange, c)
  returns ATR with custom moving average
  Namespace types: simple CustomSeries
  Parameters:
    maType (simple CustomSeries): Custom series type
    length (simple int): Moving Average Length
    useTrueRange (bool): Use true range for atr calculation instead of just high/low difference
    c (Candle): Candle object containing ohlc
  Returns: ATR for the given moving average type and length

method atrpercent(maType, length, useTrueRange, c)
  returns ATR as percentage of close price
  Namespace types: simple CustomSeries
  Parameters:
    maType (simple CustomSeries): Custom series type
    length (simple int): Moving Average Length
    useTrueRange (bool): Use true range for atr calculation instead of just high/low difference
    c (Candle): Candle object containing ohlc
  Returns: ATR as percentage of close price for the given moving average type and length

method bb(maType, length, multiplier, sticky, c)
  returns Bollinger band for custom moving average
  Namespace types: simple CustomSeries
  Parameters:
    maType (simple CustomSeries): Custom series type
    length (simple int): Moving Average Length
    multiplier (float): Standard Deviation multiplier
    sticky (simple bool): - sticky boundaries which will only change when value is outside boundary.
    c (Candle): Candle object containing ohlc
  Returns: Bollinger band with custom moving average for given source, length and multiplier

method bbw(maType, length, multiplier, sticky, c)
  returns Bollinger bandwidth for custom moving average
  Namespace types: simple CustomSeries
  Parameters:
    maType (simple CustomSeries): Custom series type
    length (simple int): Moving Average Length
    multiplier (float): Standard Deviation multiplier
    sticky (simple bool): sticky boundaries which will only change when value is outside boundary.
    c (Candle): Candle object containing ohlc
  Returns: Bollinger Bandwidth for custom moving average for given source, length and multiplier

method bpercentb(maType, length, multiplier, sticky, c)
  returns Bollinger Percent B for custom moving average
  Namespace types: simple CustomSeries
  Parameters:
    maType (simple CustomSeries): Custom series type
    length (simple int): Moving Average Length
    multiplier (float): Standard Deviation multiplier
    sticky (simple bool): - sticky boundaries which will only change when value is outside boundary.
    c (Candle): Candle object containing ohlc
  Returns: Bollinger Percent B for custom moving average for given source, length and multiplier

method kc(maType, length, multiplier, useTrueRange, sticky, c)
  returns Keltner Channel for custom moving average
  Namespace types: simple CustomSeries
  Parameters:
    maType (simple CustomSeries): Custom series type
    length (simple int): Moving Average Length
    multiplier (float): Standard Deviation multiplier
    useTrueRange (simple bool): - if set to false, uses high-low.
    sticky (simple bool): - sticky boundaries which will only change when value is outside boundary.
    c (Candle): Candle object containing ohlc
  Returns: Keltner Channel for custom moving average for given souce, length and multiplier

method kcw(maType, length, multiplier, useTrueRange, sticky, c)
  returns Keltner Channel Width with custom moving average
  Namespace types: simple CustomSeries
  Parameters:
    maType (simple CustomSeries): Custom series type
    length (simple int): Moving Average Length
    multiplier (float): Standard Deviation multiplier
    useTrueRange (simple bool): - if set to false, uses high-low.
    sticky (simple bool): - sticky boundaries which will only change when value is outside boundary.
    c (Candle): Candle object containing ohlc
  Returns: Keltner Channel Width for custom moving average

method kpercentk(maType, length, multiplier, useTrueRange, sticky, c)
  returns Keltner Channel Percent K Width with custom moving average
  Namespace types: simple CustomSeries
  Parameters:
    maType (simple CustomSeries): Custom series type
    length (simple int): Moving Average Length
    multiplier (float): Standard Deviation multiplier
    useTrueRange (simple bool): - if set to false, uses high-low.
    sticky (simple bool): - sticky boundaries which will only change when value is outside boundary.
    c (Candle): Candle object containing ohlc
  Returns: Keltner Percent K for given moving average, source, length and multiplier

method dc(c, length, sticky)
  returns Custom Donchian Channel
  Namespace types: Candle
  Parameters:
    c (Candle): Candle object containing ohlc
    length (simple int): - donchian channel length
    sticky (simple bool): - sticky boundaries which will only change when value is outside boundary.
  Returns: Donchian channel

method dcw(c, length, sticky)
  returns Donchian Channel Width
  Namespace types: Candle
  Parameters:
    c (Candle): Candle object containing ohlc
    length (simple int): - donchian channel length
    sticky (simple bool): - sticky boundaries which will only change when value is outside boundary.
  Returns: Donchian channel width

method dpercentd(c, length, sticky)
  returns Donchian Channel Percent of price
  Namespace types: Candle
  Parameters:
    c (Candle): Candle object containing ohlc
    length (simple int): - donchian channel length
    sticky (simple bool): - sticky boundaries which will only change when value is outside boundary.
  Returns: Donchian channel Percent D

method supertrend(maType, length, multiplier, useTrueRange, waitForClose, delayed, c)
  supertrend Simple supertrend based on atr but also takes into consideration of custom MA Type, sources
  Namespace types: simple CustomSeries
  Parameters:
    maType (simple CustomSeries): Custom Series
    length (simple int): ATR Length
    multiplier (simple float): ATR Multiplier
    useTrueRange (simple bool): - if set to false, uses high-low.
    waitForClose (simple bool): : Considers source for direction change crossover if checked. Else, uses highSource and lowSource.
    delayed (simple bool): : if set to true lags supertrend atr stop based on target levels.
    c (Candle): Candle object containing ohlc
  Returns: dir : Supertrend direction
supertrend : BuyStop if direction is 1 else SellStop

method oscillatorRange(seriesType, source, highlowLength, rangeLength, sticky)
  oscillatorRange - returns Custom overbought/oversold areas for an oscillator input
  Namespace types: simple CustomSeries
  Parameters:
    seriesType (simple CustomSeries): - Custom series type
    source (float): - Osillator source such as RSI, COG etc.
    highlowLength (simple int): - length on which highlow of the oscillator is calculated
    rangeLength (simple int): - length used for calculating oversold/overbought range - usually same as oscillator length
    sticky (simple bool): - overbought, oversold levels won't change unless crossed
  Returns: Dynamic overbought and oversold range for oscillator input

method oscillator(oscillatorType, length, shortLength, longLength, c)
  oscillator - returns Choice of oscillator with custom overbought/oversold range
  Namespace types: simple OscillatorType
  Parameters:
    oscillatorType (simple OscillatorType): OscillatorType object
    length (simple int): - Oscillator length - not used for TSI
    shortLength (simple int): - shortLength only used for TSI
    longLength (simple int): - longLength only used for TSI
    c (Candle): Candle object containing ohlc
  Returns: Oscillator value

method oscillatorWithRange(oscillatorType, length, shortLength, longLength, seriesType, highlowLength, sticky, c)
  oscillatorWithRange - returns Choice of oscillator with custom overbought/oversold range
  Namespace types: simple OscillatorType
  Parameters:
    oscillatorType (simple OscillatorType): OscillatorType object
    length (simple int): - Oscillator length - not used for TSI
    shortLength (simple int): - shortLength only used for TSI
    longLength (simple int): - longLength only used for TSI
    seriesType (simple CustomSeries): - CustomSeries enum type
    highlowLength (simple int): - length on which highlow of the oscillator is calculated
    sticky (simple bool): - overbought, oversold levels won't change unless crossed
    c (Candle): Candle object containing ohlc
  Returns: Oscillator value along with dynamic overbought and oversold range for oscillator input

Candle
  Custom candle object
  Fields:
    o (series float): open
    h (series float): high
    l (series float): low
    c (series float): close
    barindex (series int): bar_index
    bartime (series int): time
    bartimeclose (series int): time_close
    v (series float): volume

Thông báo miễn trừ trách nhiệm

Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.