prepare_sorted_trades#
API documentation for tradeexecutor.strategy.runner.prepare_sorted_trades Python function.
- prepare_sorted_trades(approved_trades)[source]#
Set correct execution order of trades.
Take trades in any order
Sells must go before buys, so that we have always enough cash in hand
- Parameters:
approved_trades (list[tradeexecutor.state.trade.TradeExecution]) –
- Return type: