tbapi.api.interfaces.orders.istrategy_order_manager
1from __future__ import annotations 2from typing import TYPE_CHECKING 3from tbapi.common.decorators import tb_interface 4from tbapi.common.converters import to_python_datetime, to_net_datetime 5from datetime import datetime 6from Tickblaze.Scripts.Api.Interfaces.Orders import IStrategyOrderManager as _IStrategyOrderManager 7from typing import Any, overload 8from abc import ABC, abstractmethod 9from tbapi.api.interfaces.orders.iorder_manager import IOrderManager 10 11@tb_interface(_IStrategyOrderManager) 12class IStrategyOrderManager(IOrderManager): 13 14 15 @abstractmethod 16 def flatten(self, comment: str = "") -> None: 17 """Closes positions and cancel pending orders. Optional comment for the orders and cancellations. Will also automatically flatten incoming fills appearing after the call is made. This behavior is automatically disabled when a new entry is made.""" 18 result = self._value.Flatten(comment) 19 return result 20 21 @abstractmethod 22 def cancel_pending_orders(self, include_attached_orders: bool, comment: str = "") -> None: 23 """Cancels all pending orders True if attached orders should be included Comment to place on order""" 24 result = self._value.CancelPendingOrders(include_attached_orders, comment) 25 return result 26
@tb_interface(_IStrategyOrderManager)
class
IStrategyOrderManager17@tb_interface(_IStrategyOrderManager) 18class IStrategyOrderManager(IOrderManager): 19 20 21 @abstractmethod 22 def flatten(self, comment: str = "") -> None: 23 """Closes positions and cancel pending orders. Optional comment for the orders and cancellations. Will also automatically flatten incoming fills appearing after the call is made. This behavior is automatically disabled when a new entry is made.""" 24 result = self._value.Flatten(comment) 25 return result 26 27 @abstractmethod 28 def cancel_pending_orders(self, include_attached_orders: bool, comment: str = "") -> None: 29 """Cancels all pending orders True if attached orders should be included Comment to place on order""" 30 result = self._value.CancelPendingOrders(include_attached_orders, comment) 31 return result
Provides methods for managing orders and positions within the trading system.
@abstractmethod
def
flatten(self, comment: str = '') -> None:
21 @abstractmethod 22 def flatten(self, comment: str = "") -> None: 23 """Closes positions and cancel pending orders. Optional comment for the orders and cancellations. Will also automatically flatten incoming fills appearing after the call is made. This behavior is automatically disabled when a new entry is made.""" 24 result = self._value.Flatten(comment) 25 return result
Closes positions and cancel pending orders. Optional comment for the orders and cancellations. Will also automatically flatten incoming fills appearing after the call is made. This behavior is automatically disabled when a new entry is made.
@abstractmethod
def
cancel_pending_orders(self, include_attached_orders: bool, comment: str = '') -> None:
27 @abstractmethod 28 def cancel_pending_orders(self, include_attached_orders: bool, comment: str = "") -> None: 29 """Cancels all pending orders True if attached orders should be included Comment to place on order""" 30 result = self._value.CancelPendingOrders(include_attached_orders, comment) 31 return result
Cancels all pending orders True if attached orders should be included Comment to place on order
Inherited Members
- tbapi.api.interfaces.orders.iorder_manager.IOrderManager
- execute_market_order
- place_order
- place_limit_order
- place_stop_order
- place_stop_limit_order
- set_stop_loss
- set_stop_loss_ticks
- set_stop_loss_percent
- set_take_profit
- set_take_profit_ticks
- set_take_profit_percent
- modify_order
- cancel_order
- close_position
- get_order_expected_price