contango.strategy.rule_based.actions.emit
contango.strategy.rule_based.actions.emit
Emit
Emit(intent: INTENT_T)
Bases: Action[TradingContext, INTENT_T], Generic[INTENT_T]
A simple action that emits an intent.
Attributes:
| Name | Type | Description |
|---|---|---|
INTENT_T |
The intent type that the execute() method will always return. |
Initializes Emit.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
intent
|
INTENT_T
|
The intent to release what the action is executed. |
required |
Source code in src\contango\strategy\rule_based\actions\emit.py
20 21 22 23 24 25 26 27 | |
execute
execute(context: TradingContext) -> INTENT_T
Executes the Emit action.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
context
|
TradingContext
|
The context (unused) for the current market data event. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
INTENT_T |
INTENT_T
|
The unchanging intent to emit. |
Source code in src\contango\strategy\rule_based\actions\emit.py
29 30 31 32 33 34 35 36 37 38 39 | |