PureBytes Links
Trading Reference Links
|
Hi,
Can anyone pick what the problem is here please?
The following code calculates the closed equity curve but the
addtocomposite is not happening! :)
Thanks.
if( Status("action" == actionPortfolio )
{
bo = GetBacktesterObject();
bo.Backtest();
ClosedEquity = bo.Equity;
for( pos = bo.GetFirstOpenPos(); pos; pos = bo.GetNextOpenPos())
{
ClosedEquity = ClosedEquity - pos.GetProfit();
}
AddToComposite(ClosedEquity,"~ClosedEquity","X",atcFlagEnableInPortfolio|
atcFlagDefaults);
}
|