Hello,

I have trouble finding coming up with the proper code for determining the value 
of all open positions for any given day (determined by the close!)

Is it this:

for (trade = bo.GetFirstOpenPos(); trade; trade = bo.GetNextOpenPos())
{
   Value_open_positions = Value_open_positions + trade.GetPositionValue()
    trade.AddCustomMetric ("Open Position Value", trade.Value_open_positions);
}
Incidentally, GetPositionValue doesn´t indicate if it uses closing prices.





__________ Information from ESET Smart Security, version of virus signature 
database 4581 (20091107) __________

The message was checked by ESET Smart Security.

http://www.eset.com

Reply via email to