Esempio n. 1
0
        private void SendTEST()
        {
            bool Matched = true;
            var  t       = new AlsiUtils.Trade()
            {
                TimeStamp      = DateTime.Now,
                BuyorSell      = Trade.BuySell.Buy,
                InstrumentName = "Test",
                TradedPrice    = 34465,
                TradeVolume    = 1,
            };


            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;
            }
        }
        private void SendTEST()
        {
            bool Matched = true;
            var t = new AlsiUtils.Trade()
            {
                TimeStamp = DateTime.Now,
                BuyorSell = Trade.BuySell.Buy,
                InstrumentName = "Test",
                TradedPrice = 34465,
                TradeVolume = 1,

            };


            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;
        }