Skip to content

There is a problem in the logic of calculating the merged OpenPrice and TakeProfitPrice in the OpenConsolidate function. #1207

@icehawk-hyb

Description

@icehawk-hyb

Description:
The code implementation only handles long positions, not short positions.
When shorting, existingMtp.Custody is the base asset, and existingMtp.OpenPrice is the price of the trading asset.

Code logic:
Image

suggestion:

Position_SHORT: Custody is base asset

((existingMtp.Custody + newMtp.Custody)/ ( (existingMtp.Custody / existingMtp.OpenPrice) + ( newMtp.Custody / newMtp.OpenPrice))

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