@algorithm()
Overloads
new
static method, read more here.
indie.algorithms
package are decorated with @indie.algorithm
decorator. Read more about it in Series processors chapter.Algorithm
@band()
Overloads
@level()
@indicator()
Overloads
Main
entry point of any indicator.@sec_context()
@level()
Overloads
@param_ref()
Overloads
@sec_context
function that is linked to the input parameter of Main
by id
.@sec_context()
param
param
Static methods
Main
entry point.options
parameter is used then in Settings panel there will be a combobox widget for changing value of this input.Main
entry point.options
parameter is not used then in Settings panel nevertheless there will be a combobox widget with all possible values from the source
enum.Main
entry point.time_frame
in the example variable will be TimeFrame
. But please note, that for the convenience, default value has str
type. String representation of TimeFrame
has a form of <number>[m|h|D|W|M|Y]
where suffixes mean: m
- minutes, h
- hours, D
- days, W
- weeks, M
- months, Y
- years. If options
parameter is used then in Settings panel there will be a combobox widget for changing value of this input.TimeFrame
@sec_context()
Overloads
Main
entry point for additional instrument of an indicator. Additional instruments are requested with the help of Context.calc_on
function and this decorator.Algorithm
Fields
Context.calc_on
function.Color
color
Context
Fields
Methods
SeriesF
objects which match with the arity of values that sec_context
function returns. All the returned series values are merged into the timescale of current context’s instrument.exchange
, ticker
or time_frame
) must be provided. More info about this function as well as code examples you may find in Request additional instruments chapter.@sec_context()
SecContext
MutSeriesF
(an alias for MutSeries[float]
) object, which is a container for float
values in Indie code. The main feature of the MutSeriesF
container is its ability to store (or ‘remember’) the historical values of a variable. These values can be accessed later using the square brackets operator (via the __getitem__
method).MutSeriesF
MutSeries[T]
object, which is a container for T
values in Indie code. The main feature of the MutSeries[T]
container is its ability to store (or ‘remember’) the historical values of a variable. These values can be accessed later using the square brackets operator (via the __getitem__
method).True
if the current bar is the first bar of the trading session or False
if the current bar is not the first in the session or if no session has started.
False
if the first bar of the session does not exist or is unavailable (e.g., due to data gaps or missing information).True
if the current bar is the first bar of the regular trading session or False
if the current bar is not the first in the regular session or if no session has started.
False
if the first bar of the regular session does not exist or is unavailable (e.g., due to data gaps or missing information).True
if the current bar is the last bar of the trading session or False
if the current bar is not the last in the session.
False
if the session ends without a valid last bar (e.g., due to missing data).True
if the current bar is the last bar of the regular trading session or False
if the current bar is not the last in the regular session.
False
if the session ends without a valid last bar (e.g., due to missing data).IndieError
MainContext
Parent
Inherited fields
0
and this is the oldest bar.self.bar_count
is equal to self.bar_index + 1
.True
if the current bar is a historical bar or it is a final update for a realtime bar.True
if the current bar is a historical bar.True
if the current bar is the last bar in the history or it is a realtime bar.True
if the current bar is the last bar of the historical part of prices data.True
if the current bar is a historical bar or it is a first update for a realtime bar.True
if the last (current) bar is a realtime bar.Inherited methods
SeriesF
objects which match with the arity of values that sec_context
function returns. All the returned series values are merged into the timescale of current context’s instrument.exchange
, ticker
or time_frame
) must be provided. More info about this function as well as code examples you may find in Request additional instruments chapter.@sec_context()
SecContext
MutSeriesF
(an alias for MutSeries[float]
) object, which is a container for float
values in Indie code. The main feature of the MutSeriesF
container is its ability to store (or ‘remember’) the historical values of a variable. These values can be accessed later using the square brackets operator (via the __getitem__
method).MutSeriesF
MutSeries[T]
object, which is a container for T
values in Indie code. The main feature of the MutSeries[T]
container is its ability to store (or ‘remember’) the historical values of a variable. These values can be accessed later using the square brackets operator (via the __getitem__
method).Var[T]
object, which is a container for T
value in Indie code. The main feature of the Var[T]
container is its ability to rollback the value of the variable when a new realtime update appears to its value after the previous bar.True
if the current bar is the first bar of the trading session or False
if the current bar is not the first in the session or if no session has started.
False
if the first bar of the session does not exist or is unavailable (e.g., due to data gaps or missing information).True
if the current bar is the first bar of the regular trading session or False
if the current bar is not the first in the regular session or if no session has started.
False
if the first bar of the regular session does not exist or is unavailable (e.g., due to data gaps or missing information).True
if the current bar is the last bar of the trading session or False
if the current bar is not the last in the session.
False
if the session ends without a valid last bar (e.g., due to missing data).True
if the current bar is the last bar of the regular trading session or False
if the current bar is not the last in the regular session.
False
if the session ends without a valid last bar (e.g., due to missing data).MutSeries[T]
T
. Type T
can be float, int, str, or almost any other type.
Aliases
Parent
Methods
MutSeries[T]
object at the specified index.MutSeriesF.set_last(value: float)
but we like the syntax of square brackets. Maybe this will be fixed in the future versions of Indie, hard to say for sure. (2) Method __setitem__
should never be called directly, instead syntax series_obj[index] = value
should be used.Static methods
MutSeries[T]
object, which is a container for T
values in Indie code. The main feature of the MutSeries[T]
container is its ability to store (or ‘remember’) the historical values of a variable. These values can be accessed later using the square brackets operator (via the __getitem__
method).Context.new_mut_series()
Inherited methods
Series[T]
object at the specified index or given default
if the value is missing.Series[T]
object (number of elements that Series[T]
object should store in memory).Series[T]
object at the specified index. If the value is missing, then the default value of type T
is returned (e.g. math.nan
if T
is float).__getitem__
should never be called directly. Instead syntax series_obj[index]
should be used.Series[T]
object.__len__
should never be called directly. Instead syntax len(series_obj)
should be used.Context.new_mut_series()
Series[T]
Optional[T]
typing.Optional
).
Methods
SecContext
Parent
Inherited fields
0
and this is the oldest bar.self.bar_count
is equal to self.bar_index + 1
.True
if the current bar is a historical bar or it is a final update for a realtime bar.True
if the current bar is a historical bar.True
if the current bar is the last bar in the history or it is a realtime bar.True
if the current bar is the last bar of the historical part of prices data.True
if the current bar is a historical bar or it is a first update for a realtime bar.True
if the last (current) bar is a realtime bar.Inherited methods
SeriesF
objects which match with the arity of values that sec_context
function returns. All the returned series values are merged into the timescale of current context’s instrument.exchange
, ticker
or time_frame
) must be provided. More info about this function as well as code examples you may find in Request additional instruments chapter.@sec_context()
SecContext
MutSeriesF
(an alias for MutSeries[float]
) object, which is a container for float
values in Indie code. The main feature of the MutSeriesF
container is its ability to store (or ‘remember’) the historical values of a variable. These values can be accessed later using the square brackets operator (via the __getitem__
method).MutSeriesF
MutSeries[T]
object, which is a container for T
values in Indie code. The main feature of the MutSeries[T]
container is its ability to store (or ‘remember’) the historical values of a variable. These values can be accessed later using the square brackets operator (via the __getitem__
method).Var[T]
object, which is a container for T
value in Indie code. The main feature of the Var[T]
container is its ability to rollback the value of the variable when a new realtime update appears to its value after the previous bar.True
if the current bar is the first bar of the trading session or False
if the current bar is not the first in the session or if no session has started.
False
if the first bar of the session does not exist or is unavailable (e.g., due to data gaps or missing information).True
if the current bar is the first bar of the regular trading session or False
if the current bar is not the first in the regular session or if no session has started.
False
if the first bar of the regular session does not exist or is unavailable (e.g., due to data gaps or missing information).True
if the current bar is the last bar of the trading session or False
if the current bar is not the last in the session.
False
if the session ends without a valid last bar (e.g., due to missing data).True
if the current bar is the last bar of the regular trading session or False
if the current bar is not the last in the regular session.
False
if the session ends without a valid last bar (e.g., due to missing data).Series[T]
T
. Type T
can be float, int, str, or almost any other type.
Aliases
Methods
MutSeries[T]
Context
SymbolInfo
Fields
exchange_code
for the New York Stock Exchange, Inc. is 'XNYS'
.Context
TimeFrame
Static methods
TimeFrame
type. String representation of TimeFrame
has a form of <number>[m|h|D|W|M|Y]
where suffixes mean: m
- minutes, h
- hours, D
- days, W
- weeks, M
- months, Y
- years. For example TimeFrame.from_str('15m')
creates a TimeFrame
object which corresponds to 15 minute time frame.TradingSession
Fields
Methods
True
if the timestamp falls within the trading session’s active periods, otherwise returns False
.True
if both timestamps fall within the same period of the trading session, even if they are in different calendar days. False if the timestamps belong to different periods within the trading session.Var[T]
T
. Type T
can be float, int, str, or almost any other type.
Context.new_var()
MutSeries[T]
format
Static fields
@indicator()
line_style
source
@indie.param.source
).
Static fields
@param.source()
time_frame_unit
Static fields
TimeFrame