Library "ta" Collection of all custom and enhanced TA indicators
ma(source, maType, length) returns custom moving averages Parameters: source (float): Moving Average Source maType (simple string): Moving Average Type : Can be sma, ema, hma, rma, wma, vwma, swma, highlow, linreg, median length (simple int): Moving Average Length Returns: moving average for the given type and length
atr(maType, length) returns ATR with custom moving average Parameters: maType (simple string): Moving Average Type : Can be sma, ema, hma, rma, wma, vwma, swma, highlow, linreg, median length (simple int): Moving Average Length Returns: ATR for the given moving average type and length
atrpercent(maType, length) returns ATR as percentage of close price Parameters: maType (simple string): Moving Average Type : Can be sma, ema, hma, rma, wma, vwma, swma, highlow, linreg, median length (simple int): Moving Average Length Returns: ATR as percentage of close price for the given moving average type and length
bb(source, maType, length, multiplier, sticky) returns Bollinger band for custom moving average Parameters: source (float): Moving Average Source maType (simple string): Moving Average Type : Can be sma, ema, hma, rma, wma, vwma, swma, highlow, linreg, median 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. Returns: Bollinger band with custom moving average for given source, length and multiplier
bbw(source, maType, length, multiplier, sticky) returns Bollinger bandwidth for custom moving average Parameters: source (float): Moving Average Source maType (simple string): Moving Average Type : Can be sma, ema, hma, rma, wma, vwma, swma, highlow, linreg, median 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. Returns: Bollinger Bandwidth for custom moving average for given source, length and multiplier
bpercentb(source, maType, length, multiplier, sticky) returns Bollinger Percent B for custom moving average Parameters: source (float): Moving Average Source maType (simple string): Moving Average Type : Can be sma, ema, hma, rma, wma, vwma, swma, highlow, linreg, median 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. Returns: Bollinger Percent B for custom moving average for given source, length and multiplier
kc(source, maType, length, multiplier, useTrueRange, sticky) returns Keltner Channel for custom moving average Parameters: source (float): Moving Average Source maType (simple string): Moving Average Type : Can be sma, ema, hma, rma, wma, vwma, swma, highlow, linreg, median 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. Returns: Keltner Channel for custom moving average for given souce, length and multiplier
kcw(source, maType, length, multiplier, useTrueRange, sticky) returns Keltner Channel Width with custom moving average Parameters: source (float): Moving Average Source maType (simple string): Moving Average Type : Can be sma, ema, hma, rma, wma, vwma, swma, highlow, linreg, median 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. Returns: Keltner Channel Width for custom moving average
kpercentk(source, maType, length, multiplier, useTrueRange, sticky) returns Keltner Channel Percent K Width with custom moving average Parameters: source (float): Moving Average Source maType (simple string): Moving Average Type : Can be sma, ema, hma, rma, wma, vwma, swma, highlow, linreg, median 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. Returns: Keltner Percent K for given moving average, source, length and multiplier
dc(length, useAlternateSource, alternateSource, sticky) returns Custom Donchian Channel Parameters: length (simple int): - donchian channel length useAlternateSource (simple bool): - Custom source is used only if useAlternateSource is set to true alternateSource (float): - Custom source sticky (simple bool): - sticky boundaries which will only change when value is outside boundary. Returns: Donchian channel
dcw(length, useAlternateSource, alternateSource, sticky) returns Donchian Channel Width Parameters: length (simple int): - donchian channel length useAlternateSource (simple bool): - Custom source is used only if useAlternateSource is set to true alternateSource (float): - Custom source sticky (simple bool): - sticky boundaries which will only change when value is outside boundary. Returns: Donchian channel width
dpercentd(length, useAlternateSource, alternateSource, sticky) returns Donchian Channel Percent of price Parameters: length (simple int): - donchian channel length useAlternateSource (simple bool): - Custom source is used only if useAlternateSource is set to true alternateSource (float): - Custom source sticky (simple bool): - sticky boundaries which will only change when value is outside boundary. Returns: Donchian channel Percent D
oscillatorRange(source, method, highlowLength, rangeLength, sticky) oscillatorRange - returns Custom overbought/oversold areas for an oscillator input Parameters: source (float): - Osillator source such as RSI, COG etc. method (simple string): - Valid values for method are : sma, ema, hma, rma, wma, vwma, swma, highlow, linreg, median 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
oscillator(type, length, shortLength, longLength, source, highSource, lowSource, method, highlowLength, sticky) oscillator - returns Choice of oscillator with custom overbought/oversold range Parameters: type (simple string): - oscillator type. Valid values : cci, cmo, cog, mfi, roc, rsi, stoch, tsi, wpr 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 source (float): - custom source if required highSource (float): - custom high source for stochastic oscillator lowSource (float): - custom low source for stochastic oscillator method (simple string): - Valid values for method are : sma, ema, hma, rma, wma, vwma, swma, highlow, linreg, median highlowLength (simple int): - length on which highlow of the oscillator is calculated sticky (simple bool): - overbought, oversold levels won't change unless crossed Returns: Oscillator value along with dynamic overbought and oversold range for oscillator input
В истинном духе TradingView автор опубликовал этот код Pine как библиотеку с открытым исходным кодом, чтобы другие программисты Pine из нашего сообщества могли им воспользоваться. Вы можете использовать эту библиотеку в приватных или других публикациях с открытым исходным кодом, но повторное использование этого кода в публикации регулируется Правилами поведения.
Все виды контента, которые вы можете увидеть на TradingView, не являются финансовыми, инвестиционными, торговыми или любыми другими рекомендациями. Мы не предоставляем советы по покупке и продаже активов. Подробнее — в Условиях использования TradingView.