i am struggling to find how to correctly code for Profit Factor and Average Trade as custom performance report indicators in Portfolio Trader.
I keep getting error messages such as "strategy performance is undefined". The problem is that while there are examples presenting the format, which to the best of my knowledge i have copied, they don't work!
For profit factor i have used the code below.
Any help appreciated.
Thanks
Code: Select all
Profit Factor(0);
id(strategyperformance.grossloss !=0) {
return strategy performance.grossprofit / strategyperformance.grossloss;
}