Trigger#

API documentation for tradeexecutor.state.trigger.Trigger Python class in Trading Strategy framework.

class Trigger[source]#

Bases: object

Trigger data for market orders.

  • Trigger orders can be created to make trades to happen outside the strategy decision cycle

  • Market limit order is the most famous trigger order from the TradFi markets, used to enter into breakout positions

  • Triggers are executed in the s

  • Nested structure inside tradeexecutor.state.trade.TradeExecution

__init__()#

Methods

__init__()

is_expired(ts)

Attributes

triggered_at

When the trigger happened

type

Do we trigger when price crossed above or below

price_level

When to take action

expiration

After expiration, this trade execution is removed from the hanging queue

type: TriggerType#

Do we trigger when price crossed above or below

price_level: float | None#

When to take action

expiration: datetime.datetime | None#

After expiration, this trade execution is removed from the hanging queue

triggered_at: datetime.datetime | None = None#

When the trigger happened