tv_indicators
Functions¶
atr_tv ¶
atr_tv(candles, length, smoothing_type=rma_tv)
Average true range smoothing from tradingview
Parameters:
Name | Type | Description | Default |
---|---|---|---|
candles |
ndarray
|
2-dim np.array with columns in the following order [timestamp, open, high, low, close, volume] |
required |
length |
int
|
Number of bars |
required |
smoothing_type |
Callable
|
function to process the smoothing of the atr |
rma_tv
|
Returns:
Type | Description |
---|---|
array
|
atr |
bb_tv ¶
bb_tv(length, multi, source, basis_ma_type=sma_tv)
Bollinger bands from tradingview
Parameters:
Name | Type | Description | Default |
---|---|---|---|
source |
ndarray
|
Values to process |
required |
length |
int
|
Number of bars |
required |
multi |
float
|
Standard deviation factor |
required |
basis_ma_type |
Callable
|
Function to process basic ma |
sma_tv
|
Returns:
Type | Description |
---|---|
tuple[array, array, array]
|
basis, upper, lower |
donchain_channels_tv ¶
donchain_channels_tv(candles, length)
Donchain channels
Parameters:
Name | Type | Description | Default |
---|---|---|---|
candles |
ndarray
|
2-dim np.array with columns in the following order [timestamp, open, high, low, close, volume] |
required |
length |
int
|
Number of bars of donchain lookback |
required |
Returns:
Type | Description |
---|---|
tuple[array, array, array]
|
upper, basis, lower |
ema_tv ¶
ema_tv(source, length)
Exponential Moving average from tradingview
Parameters:
Name | Type | Description | Default |
---|---|---|---|
source |
ndarray
|
Values to process |
required |
length |
int
|
Number of bars |
required |
Returns:
Type | Description |
---|---|
array
|
ema |
linear_regression_candles_ugurvu_tv ¶
linear_regression_candles_ugurvu_tv(candles, lin_reg_length, smoothing_length, smoothing_type=sma_tv)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
candles |
ndarray
|
2-dim np.array with columns in the following order [timestamp, open, high, low, close, volume] |
required |
lin_reg_length |
int
|
Number of bars for lin reg |
required |
smoothing_length |
int
|
Number of bars for singal line |
required |
smoothing_type |
Callable
|
function to process the smoothing of the singal line |
sma_tv
|
Returns:
Type | Description |
---|---|
tuple[array, array]
|
2-dim np.array with columns in the following order [timestamp, open, high, low, close, volume], signal |
macd_tv ¶
macd_tv(source, fast_length, slow_length, signal_smoothing, oscillator_type=ema_tv, signal_ma_type=ema_tv)
Moving average convergence divergence from tradingview
Parameters:
Name | Type | Description | Default |
---|---|---|---|
source |
ndarray
|
Values to process |
required |
fast_length |
int
|
Number of bars |
required |
slow_length |
int
|
Number of bars |
required |
signal_smoothing |
int
|
Number of bars |
required |
oscillator_type |
Callable
|
Function to process fast and slow ma |
ema_tv
|
signal_ma_type |
Callable
|
Function to process signal ma |
ema_tv
|
Returns:
Type | Description |
---|---|
(array, array, array)
|
histogram, macd, signal |
rma_tv ¶
rma_tv(source, length)
Relative strength index Moving average from tradingview
Parameters:
Name | Type | Description | Default |
---|---|---|---|
source |
ndarray
|
Values to process |
required |
length |
int
|
Number of bars |
required |
Returns:
Type | Description |
---|---|
array
|
rma |
rma_tv_2 ¶
rma_tv_2(source_1, source_2, length)
Relative strength index Moving average from tradingview
Parameters:
Name | Type | Description | Default |
---|---|---|---|
source_1 |
ndarray
|
Values to process |
required |
source_2 |
ndarray
|
Values to process |
required |
length |
int
|
Number of bars |
required |
Returns:
Type | Description |
---|---|
array
|
rma_1, rma_2 |
rsi_tv ¶
rsi_tv(length, source)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
source |
ndarray
|
Values to process |
required |
length |
int
|
Number of bars |
required |
Returns:
Type | Description |
---|---|
array
|
rsi |
sma_tv ¶
sma_tv(source, length)
Simple Moving average from tradingview
Parameters:
Name | Type | Description | Default |
---|---|---|---|
source |
ndarray
|
Values to process |
required |
length |
int
|
Number of bars |
required |
Returns:
Type | Description |
---|---|
array
|
sma |
squeeze_momentum_lazybear_tv ¶
squeeze_momentum_lazybear_tv(candles, length_bb, length_kc, multi_bb, multi_kc)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
candles |
ndarray
|
2-dim np.array with columns in the following order [timestamp, open, high, low, close, volume] |
required |
length_bb |
int
|
Number of bars of Bollinger Bands |
required |
length_kc |
int
|
Number of bars of KC |
required |
multi_bb |
int
|
The multiplier by which the Bollinger Bands will get multiplied |
required |
multi_kc |
int
|
The multiplier by which the KC will get multiplied |
required |
Returns:
Type | Description |
---|---|
tuple[array, array, array]
|
squeeze historgram, squeeze on, no squeeze |
stdev_tv ¶
stdev_tv(source, length)
Standard deviation from tradingview
Parameters:
Name | Type | Description | Default |
---|---|---|---|
source |
ndarray
|
Values to process |
required |
length |
int
|
Number of bars |
required |
Returns:
Type | Description |
---|---|
array
|
stdev |
supertrend_tv ¶
supertrend_tv(candles, atr_length, factor)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
candles |
ndarray
|
2-dim np.array with columns in the following order [timestamp, open, high, low, close, volume] |
required |
atr_length |
int
|
Number of bars |
required |
factor |
int
|
The multiplier by which the ATR will get multiplied |
required |
Returns:
Type | Description |
---|---|
tuple[array, array]
|
super_trend, direction |
true_range_tv ¶
true_range_tv(candles)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
candles |
ndarray
|
2-dim np.array with columns in the following order [timestamp, open, high, low, close, volume] |
required |
Returns:
Type | Description |
---|---|
array
|
true_range |
vwap_tv ¶
vwap_tv(candles)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
candles |
ndarray
|
2-dim np.array with columns in the following order [timestamp, open, high, low, close, volume] |
required |
Returns:
Type | Description |
---|---|
array
|
vwap |
wma_tv ¶
wma_tv(source, length)
Weighted Moving Average From Tradingview
Parameters:
Name | Type | Description | Default |
---|---|---|---|
source |
ndarray
|
Values to process |
required |
length |
int
|
Number of bars |
required |
Returns:
Type | Description |
---|---|
array
|
wma |