IndicatorSource#

API documentation for tradeexecutor.strategy.pandas_trader.indicator.IndicatorSource Python class in Trading Strategy framework.

class IndicatorSource[source]#

Bases: Enum

The data on which the indicator will be calculated.

__init__()#

Methods

is_per_pair()

This indicator is calculated to all trading pairs.

Attributes

close_price

Calculate this indicator based on candle close price

open_price

Calculate this indicator based on candle open price

ohlcv

Calculate this indicator based on multipe data points (open, high, low, close, volume)

strategy_universe

This indicator is calculated once per the strategy universe

external_per_pair

Data loaded from an external source.

earlier_indicators

The indicator takes strategy universe + all earlier indicators as an input.

close_price = 'close_price'#

Calculate this indicator based on candle close price

Example indicators

  • RSI

  • Moving overage

open_price = 'open_price'#

Calculate this indicator based on candle open price

Not used commonly

ohlcv = 'ohlcv'#

Calculate this indicator based on multipe data points (open, high, low, close, volume)

Example indicators

  • Money flow index (MFI) reads close, high, low columns

The indicator function can take arguments named: open, high, low, close, volume which all are Pandas US dollar series. If parameters are not present they are discarded.

strategy_universe = 'strategy_universe'#

This indicator is calculated once per the strategy universe

These indicators are custom and do not have trading pair set

external_per_pair = 'external_per_pair'#

Data loaded from an external source.

Per-pair data.

earlier_indicators = 'earlier_indicators'#

The indicator takes strategy universe + all earlier indicators as an input.

is_per_pair()[source]#

This indicator is calculated to all trading pairs.

Return type:

bool