Skip to content

There is a problem with the logic of calculating OpenPrice in the OpenConsolidate function #1187

@icehawk-hyb

Description

@icehawk-hyb

Problem Description:
1、MTPS has been merged in the OpenConsolidateMergeMtp function.:
existingMtp.Collateral = existingMtp.Collateral.Add(newMtp.Collateral)
existingMtp.Custody = existingMtp.Custody.Add(newMtp.Custody)
existingMtp.Liabilities = existingMtp.Liabilities.Add(newMtp.Liabilities)

2、However, when calculating OpenPrice, the modified existingMtp.Custody is used.
There is a similar problem in calculating TakeProfitPrice

Suggested:
1、The recalculation logic of existingMtp.OpenPrice and existingMtp.TakeProfitPrice can be moved before the OpenConsolidateMergeMtp function processing

Code screenshot:
1、

Image

2、

Image

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