I'm having great difficulty trying to completely close Long OR Short positions that have previously had part of the position closed out. I seem to be only able to close positions that have the same number of units as had been originally entered when the trade was opened.
For example if I'm trying to close a max. of 3 open Long positions using the following code it will not work if part of the positions have been previously exited:
if(Position.MarketPosition == MarketPosition.Long)
{
ExitLong("TRADE HI1");
ExitLong("TRADE HI2");
ExitLong("TRADE HI3");
}
I was under the impression that "ExitLong/ExitShort" was supposed to completely close a position regardless of how many units remain from the original opening...but this seems not the case...how am I supposed to close these "partial" positions??? Thank you.
Comment