- freeze_position_on_failed_trade(ts, state, trades)[source]#
Move positions of failed sell trades to freeze list.
Iterate through all resolved trades. If any of the trades is failed, freeze its trading position and move the position under the frozen position management. Any base tokens will be added to the blacklist.
Tuple List of succeeded trades, List of failed trades
ts (datetime) –
state (State) –
trades (List[TradeExecution]) –
- Return type: