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、

2、
