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


C# HydraTaskSettings类代码示例

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


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


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