if(marketPosition != 2) { Print("short"); Order mar****rder = account.CreateOrder(Instrument, OrderAction.Sell, OrderType.Market, OrderEntry.Automated, TimeInForce.Day, 1, 0, 0, string.Empty, "Bearish Diamond Short Confirmed", new DateTime(), null); account.Submit(new Order[] { mar****rder }); } else if(marketPosition == 1) { Print("Sell to cover"); Order mar****rder = account.CreateOrder(Instrument, OrderAction.SellShort, OrderType.Market, OrderEntry.Automated, TimeInForce.Day, 1, 0, 0, string.Empty, "Bearish Diamond Short Confirmed SellShort", new DateTime(), null); account.Submit(new Order[] { mar****rder }); } else { if (!semiButtonToggled) { Dispatcher.InvokeAsync(() => { semiButton.RaiseEvent(new RoutedEventArgs(Button.ClickEvent)); semiButtonToggled = true; }); } }
Comment