Exemplo n.º 1
0
        public ThreeDucksStrategy(Dictionary<string,string> settings)
            : this()
        {
            foreach (string s in settings.Keys)
            {
                switch (s)
                {
                    case "FIRST_DUCK_SECONDS":
                        Int32.TryParse(settings[s], out FIRST_DUCK_SECONDS);
                        break;
                    case "SECOND_DUCK_SECONDS":
                        Int32.TryParse(settings[s], out SECOND_DUCK_SECONDS);
                        break;
                    case "THIRD_DUCK_SECONDS":
                        Int32.TryParse(settings[s], out THIRD_DUCK_SECONDS);
                        break;
                    case "MOVING_AVERAGE_WINDOW":
                        Int32.TryParse(settings[s], out AVERAGE_WINDOW);
                        break;
                }
            }

            _quoteProvider = new QuoteProvider(this);
            _quoteProvider.Start();
            _symbolProvider = new SymbolProvider(this);
            _symbolProvider.Start();
        }
Exemplo n.º 2
0
        public ThreeDucksStrategy(Dictionary <string, string> settings)
            : this()
        {
            foreach (string s in settings.Keys)
            {
                switch (s)
                {
                case "FIRST_DUCK_SECONDS":
                    Int32.TryParse(settings[s], out FIRST_DUCK_SECONDS);
                    break;

                case "SECOND_DUCK_SECONDS":
                    Int32.TryParse(settings[s], out SECOND_DUCK_SECONDS);
                    break;

                case "THIRD_DUCK_SECONDS":
                    Int32.TryParse(settings[s], out THIRD_DUCK_SECONDS);
                    break;

                case "MOVING_AVERAGE_WINDOW":
                    Int32.TryParse(settings[s], out AVERAGE_WINDOW);
                    break;
                }
            }

            _quoteProvider = new QuoteProvider(this);
            _quoteProvider.Start();
            _symbolProvider = new SymbolProvider(this);
            _symbolProvider.Start();
        }