tensortrade.oms.orders.criteria module¶
- class tensortrade.oms.orders.criteria.Criteria[source]¶
Bases:
object
A criteria to be satisfied before an order will be executed.
- class tensortrade.oms.orders.criteria.CriteriaBinOp(left: Callable[[Order, Exchange], bool], right: Callable[[Order, Exchange], bool], op: Callable[[bool, bool], bool], op_str: str)[source]¶
Bases:
Criteria
A class for using a binary operation for criteria.
- Parameters:
left (Callable[[Order, Exchange], bool]) – The left criteria argument.
right (Callable[[Order, Exchange], bool]) – The right criteria argument.
op (Callable[[bool, bool], bool]) – The binary boolean operation.
op_str (str) – The string representing the op.
- class tensortrade.oms.orders.criteria.Limit(limit_price: float)[source]¶
Bases:
Criteria
An order criteria that allows execution when the quote price for a trading pair is at or below a specific price, hidden from the public order book.
- Parameters:
limit_price (float) – The quote price to check for execution.
- class tensortrade.oms.orders.criteria.NotCriteria(criteria: Callable[[Order, Exchange], bool])[source]¶
Bases:
Criteria
A criteria to invert the truth value of another criteria.
- Parameters:
criteria (Callable[[Order, Exchange], bool]) – The criteria to invert the truth value of.
- class tensortrade.oms.orders.criteria.Stop(direction: StopDirection | str, percent: float)[source]¶
Bases:
Criteria
An order criteria that allows execution when the quote price for a trading pair is above or below a specific price.
- Parameters:
direction (Union[StopDirection, str]) – The direction to watch for the stop criteria.
percent (float) – The percentage of the current price to use for watching.
- class tensortrade.oms.orders.criteria.StopDirection(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]¶
Bases:
Enum
An enumeration for the directions of a stop criteria.
- DOWN = 'down'¶
- UP = 'up'¶