Exemplo n.º 1
0
        private void BidSolution(Connector ctror, Istrategies Strateg)
        {
            new Thread(() =>
            {
                string QuoteStr = string.Empty;
                while (Run)
                {
                    QuoteStr  = ctror.GetData();
                    var glass = Deserializer.Glass(QuoteStr);
                    FillVisual(glass);

                    ToQuikCommand[] BidComms = Strateg.GetSolution(glass);
                    if (BidComms != null && BidComms.Length > 0)
                    {
                        for (int i = 0; i < BidComms.Length; i++)
                        {
                            if (BidComms[i] != null)
                            {
                                var LuaCommand = Serializer.QuikCommandToTransaction(BidComms[i]);
                                CommandCtor.SendData(LuaCommand);
                            }
                            Thread.Sleep(1);
                        }
                    }
                }
            })
            .Start();
        }
Exemplo n.º 2
0
 public GlassScalping(string ClassCode, string SecCode, string Account, string ordConnMmfName, float K = 2)
 {
     this.ClassCode    = ClassCode;
     this.SecCode      = SecCode;
     this.Account      = Account;
     Orders            = new Connector(ordConnMmfName);
     K_                = K;
     LastOpertionTrend = Trend.Unstable;
 }
Exemplo n.º 3
0
        public Form1()
        {
            InitializeComponent();
            GlassCtor   = new Connector("TerminalQuote");
            CommandCtor = new Connector("QUIKCommand");

            Scalp = new GlassScalping("TQBR", "SBER", "L01-00000F00", "Orders");

            BidSolution(GlassCtor, Scalp);
        }