tensortrade.env.actions.simple_orders module¶
- class tensortrade.env.actions.simple_orders.SimpleOrders(*args, **kwargs)[source]¶
Bases:
AbstractActionScheme
A discrete action scheme that determines actions based on a list of trading pairs, order criteria, and trade sizes.
- Parameters:
criteria (List[OrderCriteria]) – A list of order criteria to select from when submitting an order. (e.g. MarketOrder, LimitOrder w/ price, StopLoss, etc.)
trade_sizes (List[float]) – A list of trade sizes to select from when submitting an order. (e.g. ‘[1, 1/3]’ = 100% or 33% of balance is tradable. ‘4’ = 25%, 50%, 75%, or 100% of balance is tradable.)
durations (List[int]) – A list of durations to select from when submitting an order.
trade_type (TradeType) – A type of trade to make.
order_listener (OrderListener) – A callback class to use for listening to steps of the order process.
min_order_pct (float) – The minimum value when placing an order, calculated in percent over net_worth.
min_order_abs (float) – The minimum value when placing an order, calculated in absolute order value.
- property action_space: Space¶
The action space of the
TradingEnv
.- Returns:
The gymnasium action space of the
TradingEnv
.- Return type:
Space
- get_orders(action: int) List[Order] [source]¶
Gets the list of orders to be submitted for the given action.
- Parameters:
action (
gymnasium.core.ActType
) – The action to be interpreted.- Returns:
A list of orders to be submitted to the broker.
- Return type:
List[Order]
- registered_name = 'simple'¶