Retrieve Profit Factor value

Questions about MultiCharts and user contributed studies.
no erocla
Posts: 134
Joined: 31 May 2013
Has thanked: 60 times
Been thanked: 7 times

Retrieve Profit Factor value

Postby no erocla » 11 Feb 2016

Hi all,

anyone know if there's a way to retrieve profit factor information from Signal or Portfolio Trader Signal ?

Regards
No Erocla

User avatar
JoshM
Posts: 2195
Joined: 20 May 2011
Location: The Netherlands
Has thanked: 1544 times
Been thanked: 1565 times
Contact:

Re: Retrieve Profit Factor value

Postby JoshM » 12 Feb 2016

anyone know if there's a way to retrieve profit factor information from Signal or Portfolio Trader Signal?
If I'm not mistaken:

Profit factor = GrossProfit / AbsValue(GrossLoss)
or
Profit factor = Portfolio_GrossProfit / AbsValue(Portfolio_GrossLoss)

Xyzzy
Posts: 162
Joined: 19 Mar 2011
Has thanked: 43 times
Been thanked: 79 times

Re: Retrieve Profit Factor value

Postby Xyzzy » 12 Feb 2016

Here's how I implemented it in a signal for portfolio trading:

Code: Select all

ProfitFactor = Portfolio_GrossProfit / Portfolio_GrossLoss * -1;
For a single instrument, you could use:

Code: Select all

ProfitFactor = GrossProfit / GrossLoss * -1;
These are equivalent to JoshM's code, just using "*-1" to get the absolute value.


Return to “MultiCharts”