Code for pulling Daily M2M

Dear Frnds,

I am currently Trading in 50stocks portfolio and it is Positional Both Long and Short Strategy.

When I am backtesting I can see the Profit / Loss on Monthly in Profit Table.

Is there any way, where I can get the Daily M2M for the Portfolio, even if it is a Open trade, I would like to count the M2M with Last Candle Close Price, so that I wanted to see Daily M2M.

Please let me know, if some one can help me by solving this.

BRgds,
Rama Reddy

Current portfolio Equity is what you are looking for.

So after running backtest you can run the exploration

Filter = 1;
AddColumn( Foreign("~~~EQUITY", "C" ), "Portfolio Equity" );

More info:
http://www.amibroker.com/guide/a_equity.html

2 Likes