Hello,
does anybody know if trade.marginloan also works
for open positions?
I want to use it like this
< snip>
for (trade = bo.GetFirstOpenPos(); trade;
trade = bo.GetNextOpenPos())
{
value_all_open_pos=value_all_open_pos + trade.GetPrice(i, "C") * trade.shares;
}
my_equity [i] = value_all_open_pos + bo.cash - trade.marginloan; // I use margin in my system
value_all_open_pos= 0;
// resetting to zero for next run - necessary?
bo.UpdateStats(i, 1);
bo.UpdateStats(i, 2);
} // End of
for loop over bars
bo.PostProcess();
AddToComposite(my_equity, "~~~My_Equity","x",
1+2+8+16+32+64+128);
}
For some reason, my_equity is higher if I use " minus trade.marginloan" (see
above) than if I skip it. This is awkward...
Thanks
Markus
__._,_.___
**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.
TO GET TECHNICAL SUPPORT send an e-mail directly to
SUPPORT {at} amibroker.com
TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)
For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/
__,_._,___
|