コード例 #1
0
//		[Test]
        public void RunLiveTest()
        {
            Starter starter = new RealTimeStarter();

            starter.Symbol = "USD_JPY";
            starter.Run();

//          TODO find a way to connect to engine to test.
//          Assert.AreEqual(4,engine.Model.Data.Get(Intervals.Hour1).BarCount,"Number of hour bars ");
//			Assert.AreEqual(1000,engine.Model.Data.Ticks.BarCount,"Number of tick bars ");
        }
コード例 #2
0
ファイル: TradeService.cs プロジェクト: prid77/TickZoomPublic
        public void OrderServer(BackgroundWorker bw)
        {
#if REALTIME
            Starter starter = new RealTimeStarter();
            starter.ProjectProperties.Starter.StartTime = (TimeStamp)startTime;
            starter.BackgroundWorker = bw;
// Leave off charting unless you will write chart data to a database or Web Service.
//          starter.ShowChartCallback = new ShowChartCallback(ShowChartInvoke);
//          starter.CreateChartCallback = new CreateChartCallback(CreateChartInvoke);
//	        starter.ProjectProperties.Chart.ChartType = chartType;
            starter.ProjectProperties.Starter.Symbols         = txtSymbol.Text;
            starter.ProjectProperties.Starter.IntervalDefault = intervalDefault;
            if (defaultOnly.Checked)
            {
                starter.ProjectProperties.Chart.IntervalChartDisplay = intervalDefault;
                starter.ProjectProperties.Chart.IntervalChartBar     = intervalDefault;
                starter.ProjectProperties.Chart.IntervalChartUpdate  = intervalDefault;
            }
            else
            {
                starter.ProjectProperties.Chart.IntervalChartDisplay = intervalChartDisplay;
                starter.ProjectProperties.Chart.IntervalChartBar     = intervalChartBar;
                starter.ProjectProperties.Chart.IntervalChartUpdate  = intervalChartUpdate;
            }
            if (intervalChartDisplay.BarUnit == BarUnit.Default)
            {
                starter.ProjectProperties.Chart.IntervalChartDisplay = intervalDefault;
            }
            if (intervalChartBar.BarUnit == BarUnit.Default)
            {
                starter.ProjectProperties.Chart.IntervalChartBar = intervalDefault;
            }
            if (intervalChartUpdate.BarUnit == BarUnit.Default)
            {
                starter.ProjectProperties.Chart.IntervalChartUpdate = intervalDefault;
            }
            starter.Run(Plugins.Instance.GetLoader(modelLoaderText));
#endif
        }