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
When the trigger happened
Do we trigger when price crossed above or below
When to take action
After expiration, this trade execution is removed from the hanging queue
- type: TriggerType#
Do we trigger when price crossed above or below
- 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