Represents context of an instrument which is currently bound to this algorithm instance. An indicator has at least one instrument — the main instrument of a chart where the indicator was added to. Besides the main instrument an indicator may have several additional instruments, which is done with the help of Context.calc_on function.
Methods
__init__
(ctx) -> None
Class constructor (initializer for the data type).
Represents context of an instrument which is currently bound to this algorithm instance. An indicator has at least one instrument — the main instrument of a chart where the indicator was added to. Besides the main instrument an indicator may have several additional instruments, which is done with the help of Context.calc_on function.
Methods
__init__
(ctx) -> None
Class constructor (initializer for the data type).
ctx
indie.Context
required
Context object.
calc
(length, ma_algorithm) -> indie.Series[float]
Returns series of Average True Range values calculated for the length bars period using moving average specified by ma_algorithm argument.
length
int
required
Number of bars in calculation taken into account.
ma_algorithm
str
default:"RMA"
Moving average algorithm name, should be one of 'EMA', 'SMA', 'SMMA (RMA)', 'RMA', 'VWMA' or 'WMA'.
Static methods
new
(length, ma_algorithm) -> indie.Series[float]
Returns series of Average True Range values calculated for the length bars period using moving average specified by ma_algorithm argument.
length
int
required
Number of bars in calculation taken into account.
ma_algorithm
str
default:"RMA"
Moving average algorithm name, should be one of 'EMA', 'SMA', 'SMMA (RMA)', 'RMA', 'VWMA' or 'WMA'.
Represents context of an instrument which is currently bound to this algorithm instance. An indicator has at least one instrument — the main instrument of a chart where the indicator was added to. Besides the main instrument an indicator may have several additional instruments, which is done with the help of Context.calc_on function.
Methods
__init__
(ctx) -> None
Class constructor (initializer for the data type).
Represents context of an instrument which is currently bound to this algorithm instance. An indicator has at least one instrument — the main instrument of a chart where the indicator was added to. Besides the main instrument an indicator may have several additional instruments, which is done with the help of Context.calc_on function.
Methods
__init__
(ctx) -> None
Class constructor (initializer for the data type).
ctx
indie.Context
required
Context object.
calc
(src, length) -> indie.Series[float]
Returns series of Commodity Channel Index values calculated on src series for the length bars period.
src
indie.Series[float]
required
Series data to perform the calculation.
length
int
required
Number of bars in calculation taken into account.
Static methods
new
(src, length) -> indie.Series[float]
Returns series of Commodity Channel Index values calculated on src series for the length bars period.
Represents context of an instrument which is currently bound to this algorithm instance. An indicator has at least one instrument — the main instrument of a chart where the indicator was added to. Besides the main instrument an indicator may have several additional instruments, which is done with the help of Context.calc_on function.
Methods
__init__
(ctx) -> None
Class constructor (initializer for the data type).
ctx
indie.Context
required
Context object.
calc
(src, length) -> indie.Series[float]
Returns the difference between current src value and its value length bars ago.
src
indie.Series[float]
required
Series data to perform the calculation.
length
int
default:1
Number of bars ago to compare the current value.
Static methods
new
(src, length) -> indie.Series[float]
Returns the difference between current src value and its value length bars ago.
Represents context of an instrument which is currently bound to this algorithm instance. An indicator has at least one instrument — the main instrument of a chart where the indicator was added to. Besides the main instrument an indicator may have several additional instruments, which is done with the help of Context.calc_on function.
Methods
__init__
(ctx) -> None
Class constructor (initializer for the data type).
ctx
indie.Context
required
Context object.
calc
(x, y, length) -> indie.Series[float]
Returns series of Correlation Coefficient values calculated from x and y series for the length bars period.
x
indie.Series[float]
required
First series to calculate correlation with.
y
indie.Series[float]
required
Second series to calculate correlation with.
length
int
required
Number of bars in calculation taken into account.
Static methods
new
(x, y, length) -> indie.Series[float]
Returns series of Correlation Coefficient values calculated from x and y series for the length bars period.
Represents context of an instrument which is currently bound to this algorithm instance. An indicator has at least one instrument — the main instrument of a chart where the indicator was added to. Besides the main instrument an indicator may have several additional instruments, which is done with the help of Context.calc_on function.
Methods
__init__
(ctx) -> None
Class constructor (initializer for the data type).
Represents context of an instrument which is currently bound to this algorithm instance. An indicator has at least one instrument — the main instrument of a chart where the indicator was added to. Besides the main instrument an indicator may have several additional instruments, which is done with the help of Context.calc_on function.
Methods
__init__
(ctx) -> None
Class constructor (initializer for the data type).
ctx
indie.Context
required
Context object.
calc
(src, length) -> indie.Series[float]
Returns series of Mean Absolute Deviation values calculated on src series for the length bars period.
src
indie.Series[float]
required
Series data to perform the calculation.
length
int
required
Number of bars in calculation taken into account.
Static methods
new
(src, length) -> indie.Series[float]
Returns series of Mean Absolute Deviation values calculated on src series for the length bars period.
Represents context of an instrument which is currently bound to this algorithm instance. An indicator has at least one instrument — the main instrument of a chart where the indicator was added to. Besides the main instrument an indicator may have several additional instruments, which is done with the help of Context.calc_on function.
Methods
__init__
(ctx) -> None
Class constructor (initializer for the data type).
ctx
indie.Context
required
Context object.
calc
(length) -> indie.Series[float]
Returns series of Middle Channel of Donchian Channels calculated for the length bars period.
length
int
required
Number of bars in calculation taken into account.
Static methods
new
(length) -> indie.Series[float]
Returns series of Middle Channel of Donchian Channels calculated for the length bars period.
Represents context of an instrument which is currently bound to this algorithm instance. An indicator has at least one instrument — the main instrument of a chart where the indicator was added to. Besides the main instrument an indicator may have several additional instruments, which is done with the help of Context.calc_on function.
Methods
__init__
(ctx) -> None
Class constructor (initializer for the data type).
ctx
indie.Context
required
Context object.
calc
(src, length) -> indie.Series[float]
Returns series of Exponential Moving Average values calculated on src series for the length bars period.
src
indie.Series[float]
required
Series data to perform the calculation.
length
int
required
Number of bars in calculation taken into account.
Static methods
new
(src, length) -> indie.Series[float]
Returns series of Exponential Moving Average values calculated on src series for the length bars period.
Represents context of an instrument which is currently bound to this algorithm instance. An indicator has at least one instrument — the main instrument of a chart where the indicator was added to. Besides the main instrument an indicator may have several additional instruments, which is done with the help of Context.calc_on function.
Methods
__init__
(ctx) -> None
Class constructor (initializer for the data type).
ctx
indie.Context
required
Context object.
calc
(src) -> indie.Series[float]
Returns series created from src by replacing math.nan values with previous nearest non-nan value.
src
indie.Series[float]
required
Series data to perform the calculation.
Static methods
new
(src) -> indie.Series[float]
Returns series created from src by replacing math.nan values with previous nearest non-nan value.
src
indie.Series[float]
required
Series data to perform the calculation.
# indie:lang_version = 5import mathfrom indie import indicator, MutSeriesFfrom indie.algorithms import FixNan@indicator('Example', overlay_main_pane=True)defMain(self):# Variable `s` is just an example of a series with `nan` values: s = MutSeriesF.new(math.nan)if self.close[0]> self.open[0]: s[0]= self.close[0]# `FixNan` replaces every `nan` value in `s` with the closest non-`nan` value on the left of it: s2 = FixNan.new(s)return s2[0]
Represents context of an instrument which is currently bound to this algorithm instance. An indicator has at least one instrument — the main instrument of a chart where the indicator was added to. Besides the main instrument an indicator may have several additional instruments, which is done with the help of Context.calc_on function.
Methods
__init__
(ctx) -> None
Class constructor (initializer for the data type).
ctx
indie.Context
required
Context object.
calc
(src, length) -> indie.Series[float]
Returns maximum value of given src series over a period of length bars.
src
indie.Series[float]
required
Series data to perform the calculation.
length
int
required
Number of bars in calculation taken into account.
Static methods
new
(src, length) -> indie.Series[float]
Returns maximum value of given src series over a period of length bars.
Represents context of an instrument which is currently bound to this algorithm instance. An indicator has at least one instrument — the main instrument of a chart where the indicator was added to. Besides the main instrument an indicator may have several additional instruments, which is done with the help of Context.calc_on function.
Methods
__init__
(ctx) -> None
Class constructor (initializer for the data type).
ctx
indie.Context
required
Context object.
calc
(src, length, offset) -> indie.Series[float]
Returns series of Linear Regression Curve values calculated on src series for the length bars period (with possible offset offset).
src
indie.Series[float]
required
Series data to perform the calculation.
length
int
required
Number of bars in calculation taken into account.
offset
int
default:0
Offset of the argument to calculate LinReg.
Static methods
new
(src, length, offset) -> indie.Series[float]
Returns series of Linear Regression Curve values calculated on src series for the length bars period (with possible offset offset).
Represents context of an instrument which is currently bound to this algorithm instance. An indicator has at least one instrument — the main instrument of a chart where the indicator was added to. Besides the main instrument an indicator may have several additional instruments, which is done with the help of Context.calc_on function.
Methods
__init__
(ctx) -> None
Class constructor (initializer for the data type).
ctx
indie.Context
required
Context object.
calc
(src, length) -> indie.Series[float]
Returns minimum value of given src series over a period of length bars.
src
indie.Series[float]
required
Series data to perform the calculation.
length
int
required
Number of bars in calculation taken into account.
Static methods
new
(src, length) -> indie.Series[float]
Returns minimum value of given src series over a period of length bars.
Represents context of an instrument which is currently bound to this algorithm instance. An indicator has at least one instrument — the main instrument of a chart where the indicator was added to. Besides the main instrument an indicator may have several additional instruments, which is done with the help of Context.calc_on function.
Methods
__init__
(ctx) -> None
Class constructor (initializer for the data type).
ctx
indie.Context
required
Context object.
calc
(src, length, algorithm) -> indie.Series[float]
Returns a moving average of src specified by algorithm argument.
src
indie.Series[float]
required
Series data to perform the calculation.
length
int
required
Number of bars in calculation taken into account.
algorithm
str
required
Moving average algorithm name, should be one of 'EMA', 'SMA', 'SMMA (RMA)', 'RMA', 'VWMA' or 'WMA'.
Static methods
new
(src, length, algorithm) -> indie.Series[float]
Returns a moving average of src specified by algorithm argument.
src
indie.Series[float]
required
Series data to perform the calculation.
length
int
required
Number of bars in calculation taken into account.
algorithm
str
required
Moving average algorithm name, should be one of 'EMA', 'SMA', 'SMMA (RMA)', 'RMA', 'VWMA' or 'WMA'.
Represents context of an instrument which is currently bound to this algorithm instance. An indicator has at least one instrument — the main instrument of a chart where the indicator was added to. Besides the main instrument an indicator may have several additional instruments, which is done with the help of Context.calc_on function.
Methods
__init__
(ctx) -> None
Class constructor (initializer for the data type).
Returns series of Moving Average Convergence/Divergence, Signal Line and Histogram Line values calculated from series of src for fast_len, slow_len and sig_len bars periods using moving averages specified by ma_source and ma_signal argument.
src
indie.Series[float]
required
Series data to perform the calculation.
fast_len
int
required
Fast length.
slow_len
int
required
Slow length.
sig_len
int
required
Signal length.
ma_source
str
default:"EMA"
Moving average algorithm name, should be one of 'EMA' or 'SMA'.
ma_signal
str
default:"EMA"
Moving average algorithm name, should be one of 'EMA' or 'SMA'.
Returns series of Moving Average Convergence/Divergence, Signal Line and Histogram Line values calculated from series of src for fast_len, slow_len and sig_len bars periods using moving averages specified by ma_source and ma_signal argument.
src
indie.Series[float]
required
Series data to perform the calculation.
fast_len
int
required
Fast length.
slow_len
int
required
Slow length.
sig_len
int
required
Signal length.
ma_source
str
default:"EMA"
Moving average algorithm name, should be one of 'EMA' or 'SMA'.
ma_signal
str
default:"EMA"
Moving average algorithm name, should be one of 'EMA' or 'SMA'.
Represents context of an instrument which is currently bound to this algorithm instance. An indicator has at least one instrument — the main instrument of a chart where the indicator was added to. Besides the main instrument an indicator may have several additional instruments, which is done with the help of Context.calc_on function.
Methods
__init__
(ctx) -> None
Class constructor (initializer for the data type).
ctx
indie.Context
required
Context object.
calc
(src, length) -> indie.Series[float]
Returns series of Moving Median values calculated from series of src for the length bars period.
src
indie.Series[float]
required
Series data to perform the calculation.
length
int
required
Number of bars in calculation taken into account.
Static methods
new
(src, length) -> indie.Series[float]
Returns series of Moving Median values calculated from series of src for the length bars period.
Represents context of an instrument which is currently bound to this algorithm instance. An indicator has at least one instrument — the main instrument of a chart where the indicator was added to. Besides the main instrument an indicator may have several additional instruments, which is done with the help of Context.calc_on function.
Methods
__init__
(ctx) -> None
Class constructor (initializer for the data type).
ctx
indie.Context
required
Context object.
calc
(src, length) -> indie.Series[float]
Returns series of Money Flow Index values calculated from series of src for the length bars period.
src
indie.Series[float]
required
Series data to perform the calculation.
length
int
required
Number of bars in calculation taken into account.
Static methods
new
(src, length) -> indie.Series[float]
Returns series of Money Flow Index values calculated from series of src for the length bars period.
Represents context of an instrument which is currently bound to this algorithm instance. An indicator has at least one instrument — the main instrument of a chart where the indicator was added to. Besides the main instrument an indicator may have several additional instruments, which is done with the help of Context.calc_on function.
Methods
__init__
(ctx) -> None
Class constructor (initializer for the data type).
Represents context of an instrument which is currently bound to this algorithm instance. An indicator has at least one instrument — the main instrument of a chart where the indicator was added to. Besides the main instrument an indicator may have several additional instruments, which is done with the help of Context.calc_on function.
Methods
__init__
(ctx) -> None
Class constructor (initializer for the data type).
ctx
indie.Context
required
Context object.
calc
(src) -> indie.Series[float]
Returns series created from src by replacing math.nan values with zeros.
src
indie.Series[float]
required
Series data to perform the calculation.
Static methods
new
(src) -> indie.Series[float]
Returns series created from src by replacing math.nan values with zeros.
src
indie.Series[float]
required
Series data to perform the calculation.
# indie:lang_version = 5import mathfrom indie import indicator, MutSeriesFfrom indie.algorithms import NanToZero@indicator('Example')defMain(self):# Variable `s` is just an example of a series with `nan` values: s = MutSeriesF.new(math.nan)if self.close[0]> self.open[0]: s[0]=0if math.isnan(s[1])else s[1]+1# `NanToZero` replaces every `nan` value in `s` with zero s2 = NanToZero.new(s)return s2[0]
Represents context of an instrument which is currently bound to this algorithm instance. An indicator has at least one instrument — the main instrument of a chart where the indicator was added to. Besides the main instrument an indicator may have several additional instruments, which is done with the help of Context.calc_on function.
Methods
__init__
(ctx) -> None
Class constructor (initializer for the data type).
ctx
indie.Context
required
Context object.
calc
(src) -> indie.Series[float]
Returns series of Net Volume values calculated on src series.
src
indie.Series[float]
required
Series data to perform the calculation.
Static methods
new
(src) -> indie.Series[float]
Returns series of Net Volume values calculated on src series.
Represents context of an instrument which is currently bound to this algorithm instance. An indicator has at least one instrument — the main instrument of a chart where the indicator was added to. Besides the main instrument an indicator may have several additional instruments, which is done with the help of Context.calc_on function.
Methods
__init__
(ctx) -> None
Class constructor (initializer for the data type).
ctx
indie.Context
required
Context object.
calc
(src, length) -> indie.Series[float]
Returns series of Percent Rank (number of previous values that are less or equal to the current value) calculated on src series for the length bars period.
src
indie.Series[float]
required
Series data to perform the calculation.
length
int
required
Number of bars in calculation taken into account.
Static methods
new
(src, length) -> indie.Series[float]
Returns series of Percent Rank (number of previous values that are less or equal to the current value) calculated on src series for the length bars period.
Represents context of an instrument which is currently bound to this algorithm instance. An indicator has at least one instrument — the main instrument of a chart where the indicator was added to. Besides the main instrument an indicator may have several additional instruments, which is done with the help of Context.calc_on function.
Methods
__init__
(ctx) -> None
Class constructor (initializer for the data type).
ctx
indie.Context
required
Context object.
calc
(src, length) -> indie.Series[float]
Returns a Moving Average that is used in calculations of Rsi.
src
indie.Series[float]
required
Series data to perform the calculation.
length
int
required
Number of bars in calculation taken into account.
Static methods
new
(src, length) -> indie.Series[float]
Returns a Moving Average that is used in calculations of Rsi.
Represents context of an instrument which is currently bound to this algorithm instance. An indicator has at least one instrument — the main instrument of a chart where the indicator was added to. Besides the main instrument an indicator may have several additional instruments, which is done with the help of Context.calc_on function.
Methods
__init__
(ctx) -> None
Class constructor (initializer for the data type).
ctx
indie.Context
required
Context object.
calc
(src, length) -> indie.Series[float]
Returns series of Rate Of Change (percentage of change between the current value and value length bars ago) calculated on src series.
src
indie.Series[float]
required
Series data to perform the calculation.
length
int
required
Number of bars in calculation taken into account.
Static methods
new
(src, length) -> indie.Series[float]
Returns series of Rate Of Change (percentage of change between the current value and value length bars ago) calculated on src series.
Represents context of an instrument which is currently bound to this algorithm instance. An indicator has at least one instrument — the main instrument of a chart where the indicator was added to. Besides the main instrument an indicator may have several additional instruments, which is done with the help of Context.calc_on function.
Methods
__init__
(ctx) -> None
Class constructor (initializer for the data type).
ctx
indie.Context
required
Context object.
calc
(src, length) -> indie.Series[float]
Returns series of Relative Strength Index values calculated on src series for the length bars period.
src
indie.Series[float]
required
Series data to perform the calculation.
length
int
required
Number of bars in calculation taken into account.
Static methods
new
(src, length) -> indie.Series[float]
Returns series of Relative Strength Index values calculated on src series for the length bars period.
Represents context of an instrument which is currently bound to this algorithm instance. An indicator has at least one instrument — the main instrument of a chart where the indicator was added to. Besides the main instrument an indicator may have several additional instruments, which is done with the help of Context.calc_on function.
Methods
__init__
(ctx) -> None
Class constructor (initializer for the data type).
Represents context of an instrument which is currently bound to this algorithm instance. An indicator has at least one instrument — the main instrument of a chart where the indicator was added to. Besides the main instrument an indicator may have several additional instruments, which is done with the help of Context.calc_on function.
Methods
__init__
(ctx) -> None
Class constructor (initializer for the data type).
ctx
indie.Context
required
Context object.
calc
(src, length) -> indie.Series[int]
Returns the number of bars after the maximum price for the length bars period.
src
indie.Series[float]
required
Series data to perform the calculation.
length
int
required
Number of bars in calculation taken into account.
Static methods
new
(src, length) -> indie.Series[int]
Returns the number of bars after the maximum price for the length bars period.
Represents context of an instrument which is currently bound to this algorithm instance. An indicator has at least one instrument — the main instrument of a chart where the indicator was added to. Besides the main instrument an indicator may have several additional instruments, which is done with the help of Context.calc_on function.
Methods
__init__
(ctx) -> None
Class constructor (initializer for the data type).
ctx
indie.Context
required
Context object.
calc
(src, length) -> indie.Series[int]
Returns the number of bars after the minimum price for the length bars period.
src
indie.Series[float]
required
Series data to perform the calculation.
length
int
required
Number of bars in calculation taken into account.
Static methods
new
(src, length) -> indie.Series[int]
Returns the number of bars after the minimum price for the length bars period.
Represents context of an instrument which is currently bound to this algorithm instance. An indicator has at least one instrument — the main instrument of a chart where the indicator was added to. Besides the main instrument an indicator may have several additional instruments, which is done with the help of Context.calc_on function.
Methods
__init__
(ctx) -> None
Class constructor (initializer for the data type).
ctx
indie.Context
required
Context object.
calc
(condition) -> indie.Series[int]
Returns an index of the last True in condition series; if no such True is found, returns -1.
condition
indie.Series[bool]
required
Bool series to find True.
Static methods
new
(condition) -> indie.Series[int]
Returns an index of the last True in condition series; if no such True is found, returns -1.
condition
indie.Series[bool]
required
Bool series to find True.
# indie:lang_version = 5from indie import indicator, MutSeriesfrom indie.algorithms import SinceTrue@indicator('Example')defMain(self): cond = MutSeries[bool].new(self.close[0]> self.open[0]) index = SinceTrue.new(cond)return index
Represents context of an instrument which is currently bound to this algorithm instance. An indicator has at least one instrument — the main instrument of a chart where the indicator was added to. Besides the main instrument an indicator may have several additional instruments, which is done with the help of Context.calc_on function.
Methods
__init__
(ctx) -> None
Class constructor (initializer for the data type).
ctx
indie.Context
required
Context object.
calc
(src, length) -> indie.Series[float]
Returns series of Simple Moving Average values calculated from series of src for the length bars period.
src
indie.Series[float]
required
Series data to perform the calculation.
length
int
required
Number of bars in calculation taken into account.
Static methods
new
(src, length) -> indie.Series[float]
Returns series of Simple Moving Average values calculated from series of src for the length bars period.
Represents context of an instrument which is currently bound to this algorithm instance. An indicator has at least one instrument — the main instrument of a chart where the indicator was added to. Besides the main instrument an indicator may have several additional instruments, which is done with the help of Context.calc_on function.
Methods
__init__
(ctx) -> None
Class constructor (initializer for the data type).
ctx
indie.Context
required
Context object.
calc
(src, length) -> indie.Series[float]
Returns series of Standard Deviation values calculated from series of src for the length bars period.
src
indie.Series[float]
required
Series data to perform the calculation.
length
int
required
Number of bars in calculation taken into account.
Static methods
new
(src, length) -> indie.Series[float]
Returns series of Standard Deviation values calculated from series of src for the length bars period.
Represents context of an instrument which is currently bound to this algorithm instance. An indicator has at least one instrument — the main instrument of a chart where the indicator was added to. Besides the main instrument an indicator may have several additional instruments, which is done with the help of Context.calc_on function.
Methods
__init__
(ctx) -> None
Class constructor (initializer for the data type).
ctx
indie.Context
required
Context object.
calc
(src, low, high, length) -> indie.Series[float]
Returns series of Stochastic on src series with high and low highs and lows of the source over a period of length bars.
src
indie.Series[float]
required
Series data to perform the calculation.
low
indie.Series[float]
required
Series of low values.
high
indie.Series[float]
required
Series of high values.
length
int
required
Number of bars in calculation taken into account.
Static methods
new
(src, low, high, length) -> indie.Series[float]
Returns series of Stochastic on src series with high and low highs and lows of the source over a period of length bars.
Represents context of an instrument which is currently bound to this algorithm instance. An indicator has at least one instrument — the main instrument of a chart where the indicator was added to. Besides the main instrument an indicator may have several additional instruments, which is done with the help of Context.calc_on function.
Methods
__init__
(ctx) -> None
Class constructor (initializer for the data type).
ctx
indie.Context
required
Context object.
calc
(src, length) -> indie.Series[float]
Returns series of Sliding Sum values calculated on src series for the length bars period.
src
indie.Series[float]
required
Series data to perform the calculation.
length
int
required
Number of bars in calculation taken into account.
Static methods
new
(src, length) -> indie.Series[float]
Returns series of Sliding Sum values calculated on src series for the length bars period.
Represents context of an instrument which is currently bound to this algorithm instance. An indicator has at least one instrument — the main instrument of a chart where the indicator was added to. Besides the main instrument an indicator may have several additional instruments, which is done with the help of Context.calc_on function.
Methods
__init__
(ctx) -> None
Class constructor (initializer for the data type).
Represents context of an instrument which is currently bound to this algorithm instance. An indicator has at least one instrument — the main instrument of a chart where the indicator was added to. Besides the main instrument an indicator may have several additional instruments, which is done with the help of Context.calc_on function.
Methods
__init__
(ctx) -> None
Class constructor (initializer for the data type).
ctx
indie.Context
required
Context object.
calc
(handle_na) -> indie.Series[float]
Returns series of True Range values.
handle_na
bool
default:False
Flag that says how NaN close values of the previous day are handled.
Static methods
new
(handle_na) -> indie.Series[float]
Returns series of True Range values.
handle_na
bool
default:False
Flag that says how NaN close values of the previous day are handled.
Represents context of an instrument which is currently bound to this algorithm instance. An indicator has at least one instrument — the main instrument of a chart where the indicator was added to. Besides the main instrument an indicator may have several additional instruments, which is done with the help of Context.calc_on function.
Methods
__init__
(ctx) -> None
Class constructor (initializer for the data type).
Represents context of an instrument which is currently bound to this algorithm instance. An indicator has at least one instrument — the main instrument of a chart where the indicator was added to. Besides the main instrument an indicator may have several additional instruments, which is done with the help of Context.calc_on function.
Methods
__init__
(ctx) -> None
Class constructor (initializer for the data type).
Represents context of an instrument which is currently bound to this algorithm instance. An indicator has at least one instrument — the main instrument of a chart where the indicator was added to. Besides the main instrument an indicator may have several additional instruments, which is done with the help of Context.calc_on function.
Methods
__init__
(ctx) -> None
Class constructor (initializer for the data type).
Represents context of an instrument which is currently bound to this algorithm instance. An indicator has at least one instrument — the main instrument of a chart where the indicator was added to. Besides the main instrument an indicator may have several additional instruments, which is done with the help of Context.calc_on function.
Methods
__init__
(ctx) -> None
Class constructor (initializer for the data type).
ctx
indie.Context
required
Context object.
calc
(src, length) -> indie.Series[float]
Returns series of Volume Weighted Moving Average values calculated for src series for the length bars period.
src
indie.Series[float]
required
Series data to perform the calculation.
length
int
required
Number of bars in calculation taken into account.
Static methods
new
(src, length) -> indie.Series[float]
Returns series of Volume Weighted Moving Average values calculated for src series for the length bars period.
Represents context of an instrument which is currently bound to this algorithm instance. An indicator has at least one instrument — the main instrument of a chart where the indicator was added to. Besides the main instrument an indicator may have several additional instruments, which is done with the help of Context.calc_on function.
Methods
__init__
(ctx) -> None
Class constructor (initializer for the data type).
ctx
indie.Context
required
Context object.
calc
(src, length) -> indie.Series[float]
Returns series of Weighted Moving Average values calculated for src series for the length bars period.
src
indie.Series[float]
required
Series data to perform the calculation.
length
int
required
Number of bars in calculation taken into account.
Static methods
new
(src, length) -> indie.Series[float]
Returns series of Weighted Moving Average values calculated for src series for the length bars period.