Inheritance: FastQuant.InstrumentStrategy
示例#1
0
        public override void Run()
        {
            Instrument instrument1 = InstrumentManager.Instruments["AAPL"];
            Instrument instrument2 = InstrumentManager.Instruments["MSFT"];

            strategy = new MyStrategy(framework, "BollingerBands");

            strategy.AddInstrument(instrument1);
            strategy.AddInstrument(instrument2);

            strategy.DataProvider      = ProviderManager.GetDataProvider("QuantRouter");
            strategy.ExecutionProvider = ProviderManager.GetExecutionProvider("QuantRouter");

            BarFactory.Add(instrument1, BarType.Time, barSize);
            BarFactory.Add(instrument2, BarType.Time, barSize);

            StartStrategy();
        }
示例#2
0
        public override void Run()
        {
            Instrument instrument1 = InstrumentManager.Instruments["AAPL"];
            Instrument instrument2 = InstrumentManager.Instruments["MSFT"];

            strategy = new MyStrategy(framework, "ChannelBreakout");

            strategy.AddInstrument(instrument1);
            strategy.AddInstrument(instrument2);

            DataSimulator.DateTime1 = new DateTime(2013, 01, 01);
            DataSimulator.DateTime2 = new DateTime(2013, 12, 31);

            BarFactory.Add(instrument1, BarType.Time, barSize);
            BarFactory.Add(instrument2, BarType.Time, barSize);

            StartStrategy();
        }
示例#3
0
        public override void Run()
        {
            Instrument instrument1 = InstrumentManager.Instruments["AAPL"];
            Instrument instrument2 = InstrumentManager.Instruments["MSFT"];

            strategy = new MyStrategy(framework, "BollingerBands");

            strategy.AddInstrument(instrument1);
            strategy.AddInstrument(instrument2);

            strategy.DataProvider = ProviderManager.GetDataProvider("QuantRouter");
            strategy.ExecutionProvider = ProviderManager.GetExecutionProvider("QuantRouter");

            BarFactory.Add(instrument1, BarType.Time, barSize);
            BarFactory.Add(instrument2, BarType.Time, barSize);

            StartStrategy();
        }
示例#4
0
        public override void Run()
        {
            Instrument instrument1 = InstrumentManager.Instruments["AAPL"];
            Instrument instrument2 = InstrumentManager.Instruments["MSFT"];

            strategy = new MyStrategy(framework, "ChannelBreakout");

            strategy.AddInstrument(instrument1);
            strategy.AddInstrument(instrument2);

            DataSimulator.DateTime1 = new DateTime(2013, 01, 01);
            DataSimulator.DateTime2 = new DateTime(2013, 12, 31);

            BarFactory.Add(instrument1, BarType.Time, barSize);
            BarFactory.Add(instrument2, BarType.Time, barSize);

            StartStrategy();
        }