Пример #1
0
        public static void SendOrder(Trade t, bool Matched)
        {
            var o = new AlsiWebService.xlTradeOrder();

            if (t.BuyorSell == Trade.BuySell.Buy)
            {
                o.BS = AlsiWebService.BuySell.Buy;
            }
            if (t.BuyorSell == Trade.BuySell.Sell)
            {
                o.BS = AlsiWebService.BuySell.Sell;
            }
            o.Timestamp = t.TimeStamp;
            o.Volume    = t.TradeVolume;
            o.Price     = t.TradedPrice;
            o.Contract  = t.InstrumentName;
            o.Status    = Matched ? AlsiWebService.orderStatus.Completed : AlsiWebService.orderStatus.Ready;
            service.InsertNewOrder(o);
            var s = new AlsiWebService.AlsiNotifyService();

            s.InsertNewOrder(o);

            if (t.Reason == Trade.Trigger.CloseLong || t.Reason == Trade.Trigger.CloseLong)
            {
                WebSettings.General.MANUAL_CLOSE_TRIGGER = true;
            }
        }
 /// <remarks/>
 public void InsertNewOrderAsync(xlTradeOrder Order, object userState) {
     if ((this.InsertNewOrderOperationCompleted == null)) {
         this.InsertNewOrderOperationCompleted = new System.Threading.SendOrPostCallback(this.OnInsertNewOrderOperationCompleted);
     }
     this.InvokeAsync("InsertNewOrder", new object[] {
                 Order}, this.InsertNewOrderOperationCompleted, userState);
 }
 public void InsertNewOrder(xlTradeOrder Order) {
     this.Invoke("InsertNewOrder", new object[] {
                 Order});
 }
 /// <remarks/>
 public void InsertNewOrderAsync(xlTradeOrder Order) {
     this.InsertNewOrderAsync(Order, null);
 }
        public static void SendOrder(Trade t, bool Matched)
        {
            var o = new AlsiWebService.xlTradeOrder();
            if (t.BuyorSell == Trade.BuySell.Buy) o.BS = AlsiWebService.BuySell.Buy;
            if (t.BuyorSell == Trade.BuySell.Sell) o.BS = AlsiWebService.BuySell.Sell;
            o.Timestamp = t.TimeStamp;
            o.Volume = t.TradeVolume;
            o.Price = t.TradedPrice;
            o.Contract = t.InstrumentName;
            o.Status = Matched ? AlsiWebService.orderStatus.Completed : AlsiWebService.orderStatus.Ready;
            service.InsertNewOrder(o);
            var s = new AlsiWebService.AlsiNotifyService();
            s.InsertNewOrder(o);

            if (t.Reason == Trade.Trigger.CloseLong || t.Reason == Trade.Trigger.CloseLong) WebSettings.General.MANUAL_CLOSE_TRIGGER = true;
        }