• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# HydraTaskSettings类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中HydraTaskSettings的典型用法代码示例。如果您正苦于以下问题:C# HydraTaskSettings类的具体用法?C# HydraTaskSettings怎么用?C# HydraTaskSettings使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



HydraTaskSettings类属于命名空间,在下文中一共展示了HydraTaskSettings类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: ApplySettings

		protected override void ApplySettings(HydraTaskSettings settings)
		{
			_settings = new FinVizSettings(settings);

			if (settings.IsDefault)
				_settings.Interval = TimeSpan.FromDays(1);
		}
开发者ID:hbwjz,项目名称:StockSharp,代码行数:7,代码来源:FinVizTask.cs


示例2: ApplySettings

		protected override void ApplySettings(HydraTaskSettings settings)
		{
			_settings = new OandaHistorySettings(settings);

			if (settings.IsDefault)
			{
				_settings.Offset = 1;
				_settings.StartFrom = new DateTime(1990, 1, 1);
				_settings.Interval = TimeSpan.FromDays(1);
			}
		}
开发者ID:hbwjz,项目名称:StockSharp,代码行数:11,代码来源:OandaHistoryTask.cs


示例3: ApplySettings

		protected override void ApplySettings(HydraTaskSettings settings)
		{
			_settings = new RtsCompetitionSettings(settings);

			if (settings.IsDefault)
			{
				_settings.StartFrom = new DateTime(2006, 09, 15);
				_settings.Interval = TimeSpan.FromDays(1);
				_settings.Offset = 1;
				_settings.IgnoreWeekends = true;
			}
		}
开发者ID:hbwjz,项目名称:StockSharp,代码行数:12,代码来源:RtsCompetitionTask.cs


示例4: ApplySettings

		protected override void ApplySettings(HydraTaskSettings settings)
		{
			_settings = new TrueFXSettings(settings);

			if (settings.IsDefault)
			{
				_settings.DayOffset = 1;
				_settings.StartFrom = new DateTime(2009, 5, 1);
				_settings.Interval = TimeSpan.FromDays(1);
				_settings.UseTemporaryFiles = TempFiles.UseAndDelete;
			}
		}
开发者ID:rudrp,项目名称:StockSharp,代码行数:12,代码来源:TrueFXTask.cs


示例5: ApplySettings

		protected override void ApplySettings(HydraTaskSettings settings)
		{
			_settings = new YahooSettings(settings);

			if (settings.IsDefault)
			{
				_settings.DayOffset = 1;
				_settings.StartFrom = new DateTime(2000, 1, 1);
				_settings.Interval = TimeSpan.FromDays(1);
				_settings.IgnoreWeekends = true;
			}
		}
开发者ID:reddream,项目名称:StockSharp,代码行数:12,代码来源:YahooTask.cs


示例6: InitTask

		private void InitTask(IHydraTask task, HydraTaskSettings settings)
		{
			Core.Extensions.Tasks.Add(task);

			task.Init(settings);

			_logManager.Sources.Add(task);

			task.DataLoaded += (security, dataType, arg, time, count) =>
			{
				if (dataType == typeof(NewsMessage))
				{
					LoadedNews += count;
					return;
				}

				var allSecurity = _taskAllSecurities.SafeAdd(task, key => task.GetAllSecurity());
				var taskSecurity = _taskSecurityCache.SafeAdd(task).SafeAdd(security, key => task.Settings.Securities.FirstOrDefault(s => s.Security == key));

				HydraTaskSecurity.TypeInfo info;
				HydraTaskSecurity.TypeInfo allInfo;

				if (dataType == typeof(ExecutionMessage))
				{
					switch ((ExecutionTypes)arg)
					{
						case ExecutionTypes.Tick:
						{
							info = taskSecurity?.TradeInfo;
							allInfo = allSecurity?.TradeInfo;

							LoadedTrades += count;
							break;
						}
						case ExecutionTypes.OrderLog:
						{
							info = taskSecurity?.OrderLogInfo;
							allInfo = allSecurity?.OrderLogInfo;

							LoadedOrderLog += count;
							break;
						}
						case ExecutionTypes.Order:
						case ExecutionTypes.Trade:
						{
							info = taskSecurity?.TransactionInfo;
							allInfo = allSecurity?.TransactionInfo;

							LoadedTransactions += count;
							break;
						}
						default:
							throw new ArgumentOutOfRangeException(nameof(arg));
					}
				}
				else if (dataType == typeof(QuoteChangeMessage))
				{
					info = taskSecurity?.DepthInfo;
					allInfo = allSecurity?.DepthInfo;

					LoadedDepths += count;
				}
				else if (dataType == typeof(Level1ChangeMessage))
				{
					info = taskSecurity?.Level1Info;
					allInfo = allSecurity?.Level1Info;

					LoadedLevel1 += count;
				}
				else if (dataType.IsCandleMessage())
				{
					info = taskSecurity?.CandleInfo;
					allInfo = allSecurity?.CandleInfo;

					LoadedCandles += count;
				}
				else
					throw new ArgumentOutOfRangeException(nameof(dataType), dataType, LocalizedStrings.Str1018);

				if (allInfo != null)
				{
					allInfo.Count += count;
					allInfo.LastTime = time.LocalDateTime;

					task.Settings.Securities.Update(allSecurity);
				}

				if (info == null)
					return;

				info.Count += count;
				info.LastTime = time.LocalDateTime;

				task.Settings.Securities.Update(taskSecurity);
			};
		}
开发者ID:zjxbetter,项目名称:StockSharp,代码行数:96,代码来源:MainWindow_Tasks.cs


示例7: DukasCopySettings

			public DukasCopySettings(HydraTaskSettings settings)
				: base(settings)
			{
				ExtensionInfo.TryAdd("UseTemporaryFiles", TempFiles.UseAndDelete.To<string>());
			}
开发者ID:rudrp,项目名称:StockSharp,代码行数:5,代码来源:DukasCopyTask.cs


示例8: ConvertTaskSettings

			public ConvertTaskSettings(HydraTaskSettings settings)
				: base(settings)
			{
				ExtensionInfo.TryAdd("DestinationStorageFormat", StorageFormats.Binary.To<string>());
				ExtensionInfo.TryAdd("MarketDepthBuilder", OrderLogBuilders.Plaza2.To<string>());
			}
开发者ID:hbwjz,项目名称:StockSharp,代码行数:6,代码来源:ConvertTask.cs


示例9: MfdSettings

			public MfdSettings(HydraTaskSettings settings)
				: base(settings)
			{
				ExtensionInfo.TryAdd("CandleDayStep", 30);
			}
开发者ID:kknet,项目名称:StockSharp,代码行数:5,代码来源:MfdTask.cs


示例10: ApplySettings

		protected override void ApplySettings(HydraTaskSettings settings)
		{
			_settings = new UxFtpSettings(settings);

			if (!settings.IsDefault)
				return;

			_settings.DayOffset = 3;
			_settings.StartFrom = RtsHistorySource.UxMinAvaliableTime;
			_settings.IsSystemOnly = true;
			_settings.Interval = TimeSpan.FromDays(1);
			_settings.IgnoreWeekends = true;
			_settings.UseTemporaryFiles = TempFiles.UseAndDelete;
		}
开发者ID:reddream,项目名称:StockSharp,代码行数:14,代码来源:UxFtpTask.cs


示例11: ConvertTaskSettings

			public ConvertTaskSettings(HydraTaskSettings settings)
				: base(settings)
			{
			}
开发者ID:RakotVT,项目名称:StockSharp,代码行数:4,代码来源:ConvertTask.cs


示例12: ApplySettings

		protected override void ApplySettings(HydraTaskSettings settings)
		{
			_settings = new AlorHistorySettings(settings);

			if (settings.IsDefault)
			{
				_settings.Offset = 1;
				_settings.StartFrom = new DateTime(2001, 1, 1);
				_settings.Interval = TimeSpan.FromDays(1);
				_settings.IgnoreWeekends = true;
				_settings.UseTemporaryFiles = TempFiles.UseAndDelete;
			}
		}
开发者ID:hbwjz,项目名称:StockSharp,代码行数:13,代码来源:AlorHistoryTask.cs


示例13: QuandlSettings

			public QuandlSettings(HydraTaskSettings settings)
				: base(settings)
			{
			}
开发者ID:hbwjz,项目名称:StockSharp,代码行数:4,代码来源:QuandlTask.cs


示例14: ApplySettings

		protected override void ApplySettings(HydraTaskSettings settings)
		{
			_settings = new QuandlSettings(settings);

			if (_settings.IsDefault)
			{
				_settings.DayOffset = 1;
				_settings.StartFrom = new DateTime(1980, 1, 1);
				_settings.Interval = TimeSpan.FromDays(1);
				_settings.IgnoreWeekends = true;
				_settings.AuthToken = new SecureString();
				_settings.UseTemporaryFiles = TempFiles.UseAndDelete;
			}

			_quandlSecurityStorage = new QuandlSecurityStorage(EntityRegistry);
		}
开发者ID:hbwjz,项目名称:StockSharp,代码行数:16,代码来源:QuandlTask.cs


示例15: ApplySettings

		protected override void ApplySettings(HydraTaskSettings settings)
		{
			_settings = new RtsSettings(settings);

			if (settings.IsDefault)
			{
				_settings.DayOffset = 3;
				_settings.StartFrom = RtsHistorySource.RtsMinAvaliableTime;
				_settings.UsdRurStartFrom = FortsDailyData.UsdRateMinAvailableTime;
				_settings.IsDownloadUsdRate = true;
				//_settings.UsdRateLastDate = FortsDailyData.UsdRateMinAvailableTime;
				_settings.IsSystemOnly = true;
				_settings.LoadEveningSession = false;
				_settings.SaveRtsStdTrades = false;
				_settings.SaveRtsStdCombinedOnly = false;
				_settings.Interval = TimeSpan.FromDays(1);
				_settings.IgnoreWeekends = true;
				_settings.UseTemporaryFiles = TempFiles.UseAndDelete;
			}
		}
开发者ID:zjxbetter,项目名称:StockSharp,代码行数:20,代码来源:RtsTask.cs


示例16: HydraServerSettings

			public HydraServerSettings(HydraTaskSettings settings)
				: base(settings)
			{
				ExtensionInfo.TryAdd("IgnoreWeekends", true);
			}
开发者ID:hbwjz,项目名称:StockSharp,代码行数:5,代码来源:HydraServerTask.cs


示例17: YahooSettings

			public YahooSettings(HydraTaskSettings settings)
				: base(settings)
			{
				CollectionHelper.TryAdd(ExtensionInfo, "CandleDayStep", 30);
			}
开发者ID:sunwayru,项目名称:StockSharp,代码行数:5,代码来源:YahooTask.cs


示例18: ApplySettings

		protected override void ApplySettings(HydraTaskSettings settings)
		{
			_settings = new ExportSettings(settings);

			if (settings.IsDefault)
			{
				_settings.ExportType = ExportTypes.Txt;
				_settings.Offset = 1;
				_settings.ExportFolder = string.Empty;
				_settings.CandleSettings = new CandleSeries { CandleType = typeof(TimeFrameCandle), Arg = TimeSpan.FromMinutes(1) };
				//_settings.ExportTemplate = "{OpenTime:yyyy-MM-dd HH:mm:ss};{OpenPrice};{HighPrice};{LowPrice};{ClosePrice};{TotalVolume}";
				_settings.Interval = TimeSpan.FromDays(1);
				_settings.StartFrom = DateTime.Today;
				_settings.Connection = null;
				_settings.BatchSize = 50;
				_settings.CheckUnique = true;
				_settings.TemplateTxtRegistry = new TemplateTxtRegistry();
				_settings.Header = string.Empty;
			}
		}
开发者ID:sunwayru,项目名称:StockSharp,代码行数:20,代码来源:ExportTask.cs


示例19: ApplySettings

		protected override void ApplySettings(HydraTaskSettings settings)
		{
			_mfdSecurityStorage = new MfdSecurityStorage(EntityRegistry);

			_settings = new MfdSettings(settings);

			if (!settings.IsDefault)
				return;

			_settings.DayOffset = 1;
			_settings.StartFrom = new DateTime(2001, 1, 1);
			_settings.Interval = TimeSpan.FromDays(1);
			_settings.IgnoreWeekends = true;
			_settings.UseTemporaryFiles = TempFiles.UseAndDelete;
			_settings.CandleDayStep = 30;
		}
开发者ID:kknet,项目名称:StockSharp,代码行数:16,代码来源:MfdTask.cs


示例20: ExportSettings

			public ExportSettings(HydraTaskSettings settings)
				: base(settings)
			{
				ExtensionInfo.TryAdd("Header", string.Empty);
			}
开发者ID:sunwayru,项目名称:StockSharp,代码行数:5,代码来源:ExportTask.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# HyoaClass.DAO类代码示例发布时间:2022-05-24
下一篇:
C# Human类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap