Is there a way to calculate cumulative Realized PnL of a secondary instrument?
My goal is to Exit primary instrument if cumulative Realized PnL of secondary instrument is > than e.g. $500.
Cumulative Realized PnL of a secondary instrument should start calculating when primary instrument is opened.
When primary instrument is closed, Cumulative Realized PnL of a secondary instrument should reset.
Thanks in advance.
Comment