PINE LIBRARY
Atualizado enhanced_ta

Library "enhanced_ta"
Collection of all custom and enhanced TA indicators
ma(source, maType, length) returns custom moving averages
Parameters:
Returns: moving average for the given type and length
bb(source, maType, length, multiplier) returns Bollinger band for custom moving average
Parameters:
Returns: Bollinger band with custom moving average for given source, length and multiplier
bbw(source, maType, length, multiplier) returns Bollinger bandwidth for custom moving average
Parameters:
Returns: Bollinger Bandwidth for custom moving average for given source, length and multiplier
bpercentb(source, maType, length, multiplier) returns Bollinger Percent B for custom moving average
Parameters:
Returns: Bollinger Percent B for custom moving average for given source, length and multiplier
kc(source, maType, length, multiplier) returns Keltner Channel for custom moving average
Parameters:
Returns: Keltner Channel for custom moving average for given souce, length and multiplier
kcw(source, maType, length, multiplier) returns Keltner Channel Width with custom moving average
Parameters:
Returns: Keltner Channel Width for custom moving average
kpercentk(source, maType, length, multiplier) returns Keltner Channel Percent K Width with custom moving average
Parameters:
Returns: Keltner Percent K for given moving average, source, length and multiplier
dc(source, useCustomSource, length) returns Custom Donchian Channel
Parameters:
Returns: Donchian channel
oscillatorRange(source, method, highlowLength, rangeLength) returns Custom overbought/oversold areas for an oscillator input
Parameters:
Returns: Dynamic overbought and oversold range for oscillator input
Collection of all custom and enhanced TA indicators
ma(source, maType, length) returns custom moving averages
Parameters:
- source: Moving Average Source
- maType: Moving Average Type : Can be sma, ema, hma, rma, wma, vwma, swma, highlow
- length: Moving Average Length
Returns: moving average for the given type and length
bb(source, maType, length, multiplier) returns Bollinger band for custom moving average
Parameters:
- source: Moving Average Source
- maType: Moving Average Type : Can be sma, ema, hma, rma, wma, vwma, swma, highlow
- length: Moving Average Length
- multiplier: Standard Deviation multiplier
Returns: Bollinger band with custom moving average for given source, length and multiplier
bbw(source, maType, length, multiplier) returns Bollinger bandwidth for custom moving average
Parameters:
- source: Moving Average Source
- maType: Moving Average Type : Can be sma, ema, hma, rma, wma, vwma, swma, highlow
- length: Moving Average Length
- multiplier: Standard Deviation multiplier
Returns: Bollinger Bandwidth for custom moving average for given source, length and multiplier
bpercentb(source, maType, length, multiplier) returns Bollinger Percent B for custom moving average
Parameters:
- source: Moving Average Source
- maType: Moving Average Type : Can be sma, ema, hma, rma, wma, vwma, swma, highlow
- length: Moving Average Length
- multiplier: Standard Deviation multiplier
Returns: Bollinger Percent B for custom moving average for given source, length and multiplier
kc(source, maType, length, multiplier) returns Keltner Channel for custom moving average
Parameters:
- source: Moving Average Source
- maType: Moving Average Type : Can be sma, ema, hma, rma, wma, vwma, swma, highlow
- length: Moving Average Length
- multiplier: Standard Deviation multiplier
Returns: Keltner Channel for custom moving average for given souce, length and multiplier
kcw(source, maType, length, multiplier) returns Keltner Channel Width with custom moving average
Parameters:
- source: Moving Average Source
- maType: Moving Average Type : Can be sma, ema, hma, rma, wma, vwma, swma, highlow
- length: Moving Average Length
- multiplier: Standard Deviation multiplier
Returns: Keltner Channel Width for custom moving average
kpercentk(source, maType, length, multiplier) returns Keltner Channel Percent K Width with custom moving average
Parameters:
- source: Moving Average Source
- maType: Moving Average Type : Can be sma, ema, hma, rma, wma, vwma, swma, highlow
- length: Moving Average Length
- multiplier: Standard Deviation multiplier
Returns: Keltner Percent K for given moving average, source, length and multiplier
dc(source, useCustomSource, length) returns Custom Donchian Channel
Parameters:
- source: - Custom source
- useCustomSource: - Custom source is used only if useCustomSource is set to true
- length: - donchian channel length
Returns: Donchian channel
oscillatorRange(source, method, highlowLength, rangeLength) returns Custom overbought/oversold areas for an oscillator input
Parameters:
- source: - Osillator source such as RSI, COG etc.
- method: - Valid values for method are : sma, ema, hma, rma, wma, vwma, swma, highlow
- highlowLength: - length on which highlow of the oscillator is calculated
- rangeLength: - length used for calculating oversold/overbought range - usually same as oscillator length
Returns: Dynamic overbought and oversold range for oscillator input
Notas de Lançamento
Library "enhanced_ta"Collection of all custom and enhanced TA indicators
ma(source, maType, length) returns custom moving averages
Parameters:
- source: Moving Average Source
- maType: Moving Average Type : Can be sma, ema, hma, rma, wma, vwma, swma, highlow
- length: Moving Average Length
Returns: moving average for the given type and length
bb(source, maType, length, multiplier, sticky) returns Bollinger band for custom moving average
Parameters:
- source: Moving Average Source
- maType: Moving Average Type : Can be sma, ema, hma, rma, wma, vwma, swma, highlow
- length: Moving Average Length
- multiplier: Standard Deviation multiplier
- sticky: - 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: Moving Average Source
- maType: Moving Average Type : Can be sma, ema, hma, rma, wma, vwma, swma, highlow
- length: Moving Average Length
- multiplier: Standard Deviation multiplier
- sticky: - 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: Moving Average Source
- maType: Moving Average Type : Can be sma, ema, hma, rma, wma, vwma, swma, highlow
- length: Moving Average Length
- multiplier: Standard Deviation multiplier
- sticky: - 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, sticky) returns Keltner Channel for custom moving average
Parameters:
- source: Moving Average Source
- maType: Moving Average Type : Can be sma, ema, hma, rma, wma, vwma, swma, highlow
- length: Moving Average Length
- multiplier: Standard Deviation multiplier
- sticky: - 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, sticky) returns Keltner Channel Width with custom moving average
Parameters:
- source: Moving Average Source
- maType: Moving Average Type : Can be sma, ema, hma, rma, wma, vwma, swma, highlow
- length: Moving Average Length
- multiplier: Standard Deviation multiplier
- sticky: - sticky boundaries which will only change when value is outside boundary.
Returns: Keltner Channel Width for custom moving average
kpercentk(source, maType, length, multiplier, sticky) returns Keltner Channel Percent K Width with custom moving average
Parameters:
- source: Moving Average Source
- maType: Moving Average Type : Can be sma, ema, hma, rma, wma, vwma, swma, highlow
- length: Moving Average Length
- multiplier: Standard Deviation multiplier
- sticky: - 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: - donchian channel length
- useAlternateSource: - Custom source is used only if useAlternateSource is set to true
- alternateSource: - Custom source
- sticky: - 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: - donchian channel length
- useAlternateSource: - Custom source is used only if useAlternateSource is set to true
- alternateSource: - Custom source
- sticky: - sticky boundaries which will only change when value is outside boundary.
Returns: Donchian channel width
dpercentd(useAlternateSource, alternateSource, length, sticky) returns Donchian Channel Percent of price
Parameters:
- useAlternateSource: - Custom source is used only if useAlternateSource is set to true
- alternateSource: - Custom source
- length: - donchian channel length
- sticky: - sticky boundaries which will only change when value is outside boundary.
Returns: Donchian channel Percent D
oscillatorRange(source, method, highlowLength, rangeLength, sticky) returns Custom overbought/oversold areas for an oscillator input
Parameters:
- source: - Osillator source such as RSI, COG etc.
- method: - Valid values for method are : sma, ema, hma, rma, wma, vwma, swma, highlow
- highlowLength: - length on which highlow of the oscillator is calculated
- rangeLength: - length used for calculating oversold/overbought range - usually same as oscillator length
- sticky: - overbought, oversold levels won't change unless crossed
Returns: Dynamic overbought and oversold range for oscillator input
Notas de Lançamento
Library "enhanced_ta"Updated indicators
atr(maType, length) returns ATR with custom moving average
Parameters:
- maType: Moving Average Type : Can be sma, ema, hma, rma, wma, vwma, swma, highlow, linreg, median
- length: 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: Moving Average Type : Can be sma, ema, hma, rma, wma, vwma, swma, highlow, linreg, median
- length: Moving Average Length
Returns: ATR as percentage of close price for the given moving average type and length
oscillator(type, length, shortLength, longLength, source, highSource, lowSource, method, highlowLength, sticky) oscillator - returns Choice of oscillator with custom overbought/oversold range
Parameters:
- type: - oscillator type. Valid values : cci, cmo, cog, mfi, roc, rsi, stoch, tsi, wpr
- length: - Oscillator length - not used for TSI
- shortLength: - shortLength only used for TSI
- longLength: - longLength only used for TSI
- source: - custom source if required
- highSource: - custom high source for stochastic oscillator
- lowSource: - custom low source for stochastic oscillator
- method: - Valid values for method are : sma, ema, hma, rma, wma, vwma, swma, highlow, linreg, median
- highlowLength: - length on which highlow of the oscillator is calculated
- sticky: - overbought, oversold levels won't change unless crossed
Returns: Oscillator value along with dynamic overbought and oversold range for oscillator input
Notas de Lançamento
Minor correctionsNotas de Lançamento
Added Usage examplesNotas de Lançamento
Update chart with examplesNotas de Lançamento
Convert multiplier to float from simple float to allow variable valuesNotas de Lançamento
multibands(bandType, source, maType, length, useTrueRange, sticky, numberOfBands, multiplierStart, multiplierStep) multibands - returns Choice of oscillator with custom overbought/oversold rangeParameters:
bandType: - Band type - can be either bb or kc
source: - custom source if required
maType: Moving Average Type : Can be sma, ema, hma, rma, wma, vwma, swma, highlow, linreg, median
length: - Oscillator length - not used for TSI
useTrueRange: - if set to false, uses high-low.
sticky: - for sticky borders which only change upon source crossover/crossunder
numberOfBands: - Number of bands to generate
multiplierStart: - Starting ATR or Standard deviation multiplier for first band
multiplierStep: - Incremental value for multiplier for each band
Returns: array of band values sorted in ascending order
Notas de Lançamento
v9Added mfi to oscillator sources for oscillator method
Notas de Lançamento
v10Reverted last change as mfi was already there :(
Notas de Lançamento
v11Added:
mbandoscillator(bandType, source, maType, length, useTrueRange, stickyBands, numberOfBands, multiplierStart, multiplierStep) mbandoscillator - Multiband oscillator created on the basis of bands
Parameters:
bandType: - Band type - can be either bb or kc
source: - custom source if required
maType: Moving Average Type : Can be sma, ema, hma, rma, wma, vwma, swma, highlow, linreg, median
length: - Oscillator length - not used for TSI
useTrueRange: - if set to false, uses high-low.
stickyBands: - for sticky borders which only change upon source crossover/crossunder for band detection
numberOfBands: - Number of bands to generate
multiplierStart: - Starting ATR or Standard deviation multiplier for first band
multiplierStep: - Incremental value for multiplier for each band
Returns: oscillator state - current state, median values
Notas de Lançamento
v12Notas de Lançamento
v13Notas de Lançamento
v14Added:
timer(timeStart, endTime) finds difference between two timestamps
Parameters:
timeStart: - start timestamp
endTime: - end timestamp
Biblioteca do Pine
No verdadeiro espirito do TradingView, o autor desse código Pine o publicou como uma biblioteca de código aberto, para que outros programadores Pine da nossa comunidade possam reusa-los. Parabéns ao autor! Você pode usar essa biblioteca privadamente ou em outras publicações de código aberto, mas a reutilização desse código em publicações é regida pelas Regras da Casa.
Trial - trendoscope.io/trial
Subscribe - trendoscope.io/pricing
Blog - docs.trendoscope.io
Subscribe - trendoscope.io/pricing
Blog - docs.trendoscope.io
Aviso legal
As informações e publicações não devem ser e não constituem conselhos ou recomendações financeiras, de investimento, de negociação ou de qualquer outro tipo, fornecidas ou endossadas pela TradingView. Leia mais em Termos de uso.
Biblioteca do Pine
No verdadeiro espirito do TradingView, o autor desse código Pine o publicou como uma biblioteca de código aberto, para que outros programadores Pine da nossa comunidade possam reusa-los. Parabéns ao autor! Você pode usar essa biblioteca privadamente ou em outras publicações de código aberto, mas a reutilização desse código em publicações é regida pelas Regras da Casa.
Trial - trendoscope.io/trial
Subscribe - trendoscope.io/pricing
Blog - docs.trendoscope.io
Subscribe - trendoscope.io/pricing
Blog - docs.trendoscope.io
Aviso legal
As informações e publicações não devem ser e não constituem conselhos ou recomendações financeiras, de investimento, de negociação ou de qualquer outro tipo, fornecidas ou endossadas pela TradingView. Leia mais em Termos de uso.