Skip to content

Seems that monitor is built mainly for spread orders, update for single leg orders. #49

@ffahimi

Description

@ffahimi

Here is an example where we are assuming the legs,

for leg in position.legs:
# Extract order parameters
symbol = leg.symbol
orderSide = leg.orderSide
# orderQuantity = leg.orderQuantity

        # TODO: I'm not sure about this order side check here
        if orderSide != 0:
            targets.append(PortfolioTarget(symbol, orderSide))

Same thing is in positionPnl calculation in the position class, which we use extensively in monitor.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions