Hi all,
anyone know if there's a way to retrieve profit factor information from Signal or Portfolio Trader Signal ?
Regards
No Erocla
Retrieve Profit Factor value
- JoshM
- Posts: 2195
- Joined: 20 May 2011
- Location: The Netherlands
- Has thanked: 1544 times
- Been thanked: 1565 times
- Contact:
Re: Retrieve Profit Factor value
If I'm not mistaken:anyone know if there's a way to retrieve profit factor information from Signal or Portfolio Trader Signal?
Profit factor = GrossProfit / AbsValue(GrossLoss)
or
Profit factor = Portfolio_GrossProfit / AbsValue(Portfolio_GrossLoss)
Re: Retrieve Profit Factor value
Here's how I implemented it in a signal for portfolio trading:
For a single instrument, you could use:
These are equivalent to JoshM's code, just using "*-1" to get the absolute value.
Code: Select all
ProfitFactor = Portfolio_GrossProfit / Portfolio_GrossLoss * -1;
Code: Select all
ProfitFactor = GrossProfit / GrossLoss * -1;