Class responsible for processing orders.
Parameters: |
|
---|
Returns the amount of cash.
Returns the number of shares for an instrument.
Returns the portfolio value (cash + shares) for the given bars prices.
Parameters: | bars (pyalgotrade.bar.Bars.) – The bars to use to calculate share values. |
---|
Base class for orders.
Parameters: |
|
---|
Note
This is a base class and should not be used directly.
Cancels an accepted order. If the order is filled an Exception is raised.
Returns the order action.
Returns the order execution info if the order was filled, or None otherwise.
Return type: | OrderExecutionInfo. |
---|
Returns True if the order is good till canceled.
Returns the instrument identifier.
Returns the quantity.
Returns the order state.
Returns True if the order state is Order.State.ACCEPTED.
Returns True if the order state is Order.State.CANCELED.
Returns True if the order state is Order.State.FILLED.
An Order subclass that instructs the broker to buy or sell the stock immediately at the prevailing price, whatever that may be. If useClosingPrice is set to False then the opening price will be used to fill the order, otherwise the closing price will be used.