With the code below I get multiple sell orders any help would be appreciated.
Here is the code I am working with:
protected override void OnBarUpdate()
{
if (PositionAccount.MarketPosition == MarketPosition.Long
&& Close[0] < Position.AveragePrice + -5 * TickSize)
{
SubmitOrderUnmanaged(0, OrderAction.Sell, OrderType.Market, 1, 0, 0, "", "exitLong");
}
}
Thanks,
Comment