Why does setting max opened positions above 1 is making Portfolio Equity to remain unchanged?

0 votes
asked Aug 22 in AFL Code Wizard by anonymous
If I set max opened positions to anything above 1, the Portfolio Equity never changes and remain equal to initial Equity. However, if I set max opened positions to 1, the Portfolio Equity varies from trade to trade, however it's never equal to Equity.

I'm backtesting only one symbol in either cases.

1 Answer

0 votes
answered Aug 22 by anonymous
 
Best answer
Because you need to implement POSITION SIZING as explained in the Users Guide

http://www.amibroker.com/guide/h_portfolio.html
commented Aug 23 by Eduardo
Thank you for your reply, I must've been doing something wrong because I couldn't replicate the issue today.

Nevertheless, I'm printing both Portfolio Equity and Equity on the Analysis table for the sake of comparison. They don't match. I suppose it's because the conditions behind opening and closing orders are particular to each one of them. Since Portfolio Equity is well documented and is the default in the Backtest engine, I'll stick to it for the moment.

HOWEVER, the Profit per trade doesn't match the difference on the Portfolio Equity between trades (it doesn't match the Equity difference either). On my understanding last trade's profit or loss should be fully considered for the Portfolio Equity variation.

PS: I'm still trading in only one Symbol on tick data.

Thank you.

Best
Eduardo
...