-
Notifications
You must be signed in to change notification settings - Fork 62
Open
Description
This section also does not make sense to me. If self.multi_order_trades==True and the trade is already live, the rest of the validations is skipped.
flumine/flumine/strategy/strategy.py
Lines 166 to 170 in 796ec51
| def validate_order(self, runner_context: RunnerContext, order) -> bool: | |
| # allow multiple orders per trade | |
| if self.multi_order_trades: | |
| if order.trade.id in runner_context.live_trades: | |
| return True |
Should this code not check if len(trade.orders) >= 1 and reject placement if self.multi_order_trades==False? Allowing multiple orders per trade is very different from allowing multiple trades per runner, so the validation should proceed with the other checks. If a trade does not have at least two orders (opening and closing), I would not even call it a trade but a straight bet.
Originally posted by @mzaja in #679 (comment)
Metadata
Metadata
Assignees
Labels
No labels