Tracking net profit for ReversePosition
Tracking net profit for ReversePosition
01 Oct 2019, 10:29
Hi there,
When Bot call ReversePosition, the same position will switch the trade type from Buy to Sell or Sell to Buy. The History will records the net profit. And the reverse position will have it own net profit, not carry the previouse position.
But how can I tracking the net profit of previous position? Because Only OnPositionModify event is triggered. I don't know that it was trigger by reverse or volume or TP/SL.
Please advise
Noppanon
Replies
PanagiotisCharalampous
02 Oct 2019, 10:56
Hi Noppanon,
Use the PositionId property of the HistoricalTrade.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
02 Oct 2019, 08:33
Hi Noppanon,
You can track the closed deal in the History property.
Best Regards,
Panagiotis
@PanagiotisCharalampous