Skip to content

multi_order_trades does not do what it says on the tin #683

@mzaja

Description

@mzaja

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.

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions