当前位置: 首页>>代码示例>>C#>>正文


C# CandleSeries.ToString方法代码示例

本文整理汇总了C#中StockSharp.Algo.Candles.CandleSeries.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# CandleSeries.ToString方法的具体用法?C# CandleSeries.ToString怎么用?C# CandleSeries.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在StockSharp.Algo.Candles.CandleSeries的用法示例。


在下文中一共展示了CandleSeries.ToString方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ChartWindow

		public ChartWindow(CandleSeries candleSeries, DateTime from, DateTime to)
		{
			InitializeComponent();

			if (candleSeries == null)
				throw new ArgumentNullException(nameof(candleSeries));

			_candleSeries = candleSeries;
			_trader = MainWindow.Instance.Trader;

			Chart.ChartTheme = "ExpressionDark";

			var area = new ChartArea();
			Chart.Areas.Add(area);

			_candleElem = new ChartCandleElement
			{
				Antialiasing = false, 
				UpFillColor = Colors.White,
				UpBorderColor = Colors.Black,
				DownFillColor = Colors.Black,
				DownBorderColor = Colors.Black,
			};

			area.Elements.Add(_candleElem);

			_trader.NewCandles += ProcessNewCandles;
			_trader.SubscribeCandles(_candleSeries, from, to);

			Title = candleSeries.ToString();
		}
开发者ID:zjxbetter,项目名称:StockSharp,代码行数:31,代码来源:ChartWindow.xaml.cs

示例2: Main

        static void Main(string[] args)
        {
            _candleManager = new CandleManager();

            if (!GetSetings())
                return;

            var storageRegistry = new StorageRegistry();
            ((LocalMarketDataDrive)storageRegistry.DefaultDrive).Path = _historyPath;

            var cbs = new TradeStorageCandleBuilderSource { StorageRegistry = storageRegistry };
            _candleManager.Sources.OfType<TimeFrameCandleBuilder>().Single().Sources.Add(cbs);


            

            _candleManager.Processing += GetCandles;


            foreach (var Sec in listOfName)
            {
                foreach (var timeFrame in listOfTimeFrame)
                {
                  
                   

                _series = new CandleSeries(typeof(TimeFrameCandle), Sec, timeFrame);

                LisfStreamWriters.Add(_series.ToString(), new StreamWriter(GetFileName(_series), false));


                _candleManager.Start(_series, _startTime, _endTime);

                


 
    }

            }

     

            Console.ReadKey();

            // Закроем все потоки которые мы записывали

            foreach (var strim in LisfStreamWriters)
            {
                strim.Value.Close();   
            }

        

        }
开发者ID:draco777,项目名称:GetHydraData,代码行数:55,代码来源:Program.cs

示例3: HistoryCandlesClick

		private void HistoryCandlesClick(object sender, RoutedEventArgs e)
		{
			var series = new CandleSeries
			{
				CandleType = typeof(TimeFrameCandle),
				Security = SelectedSecurity,
				Arg = CandlesPeriods.SelectedItem,
			};

			var wnd = new CandlesWindow { Title = series.ToString() };
			_сandles.Add(series, wnd);
			Trader.SubscribeCandles(series, DateTime.Today.Subtract(TimeSpan.FromTicks(((TimeSpan)series.Arg).Ticks * 30)), DateTime.Now);
			wnd.Show();
		}
开发者ID:kknet,项目名称:StockSharp,代码行数:14,代码来源:SecuritiesWindow.xaml.cs

示例4: GetCandles

        private static void GetCandles(CandleSeries series, Candle candle)
        {
            if (candle.State == CandleStates.Finished)
            {
                LisfStreamWriters[series.ToString()].WriteLine(candle.OpenTime.Date.ToString("d") + " " + candle.OpenTime.DateTime.ToString("T") +
                                       " " + candle.OpenPrice.ToString()+ " "+ candle.HighPrice.ToString() +" "+
                                       candle.LowPrice.ToString() +" "+candle.ClosePrice.ToString() +" "+candle.TotalVolume.ToString());

                Console.Write(".");
            }
        }
开发者ID:draco777,项目名称:GetHydraData,代码行数:11,代码来源:Program.cs

示例5: GetFileName

        private static string GetFileName(CandleSeries candleSeries)
        {

            // [email protected]_00-30-00
            TimeSpan temp = (TimeSpan) candleSeries.Arg;
            string fullPath = _Path + temp.ToString("hhmmss");

            if (!Directory.Exists(fullPath))
            {
                Directory.CreateDirectory(fullPath);
            }

            return fullPath + @"\"+ candleSeries.ToString().Replace("TimeFrameCandle_","") + ".txt";
        }
开发者ID:draco777,项目名称:GetHydraData,代码行数:14,代码来源:Program.cs


注:本文中的StockSharp.Algo.Candles.CandleSeries.ToString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。