Trading pairs metrics and stopLoss at pair level

Hy everybody,

I would appreciate if someone could help me with the following:

I have a system that trades with pairs. I enter long in asset and at the same time I enter short in another one.
When I run the bactest , the statistics in the report , the trade report and the list of trades treat each leg as a separate trade, and what I would like is to add to them the following metrics but treating both legs of each trade as one transaction or trade. And if possible to be optimized based also on those metrics.

The metrics I am interested in are the following:
Number of trades
Win %
Profit Factor
Average Gain
Average Loss Average P/L
Max Loss

In addition, I would like to set up a stop loss based on the total loss of the pair. I want the stop loss triggers if the total Loss in the sum of the two legs of the pair add to 4000$US.

I read that to do both I have to do it using de CBT. I read the manual about the CBT And I donĀ“t feel capable of doing it. I also checked this forum, the Library and in Google and I did not found how to write it.

If anyone can help me I would grateful.

Best

This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.