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


C# Instruments.Instrument类代码示例

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


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

示例1:

		public Position this[Instrument instrument]
		{
			get
			{
				return this.positions[instrument.Symbol] as Position;
			}
		}
开发者ID:heber,项目名称:FreeOQ,代码行数:7,代码来源:PositionList.cs

示例2: LongEntry

		public virtual SingleOrder LongEntry(Instrument instrument, string text)
		{
			if (!this.Strategy.IsInstrumentActive(instrument))
				return null;
			else
				return this.Strategy.BgvpSPpUAD(new Signal(DateTime.Now, ComponentType.CrossEntry, SignalType.Market, SignalSide.Buy, instrument, text));
		}
开发者ID:heber,项目名称:FreeOQ,代码行数:7,代码来源:CrossEntry.cs

示例3: MarketDataSubscription

		internal MarketDataSubscription(IMarketDataProvider provider, Instrument instrument, MarketDataType mdType, int count)
		{
			this.Provider = provider;
			this.Instrument = instrument;
			this.MDType = mdType;
			this.Count = count;
		}
开发者ID:heber,项目名称:FreeOQ,代码行数:7,代码来源:MarketDataSubscription.cs

示例4: ShortEntry

		public virtual SingleOrder ShortEntry(Instrument instrument, string text)
		{
			if (!this.Strategy.IsInstrumentActive(instrument))
				return (SingleOrder)null;
			else
				return this.Strategy.BgvpSPpUAD(new Signal(Clock.Now, ComponentType.CrossEntry, SignalType.Market, SignalSide.SellShort, instrument, text));
		}
开发者ID:heber,项目名称:FreeOQ,代码行数:7,代码来源:CrossEntry.cs

示例5:

		public SingleOrder this[Instrument instrument, string name]
		{
			get
			{
				return (this.orders[instrument] as NamedOrderTable)[name];
			}
		}
开发者ID:heber,项目名称:FreeOQ,代码行数:7,代码来源:OrderTable.cs

示例6: QuoteViewRow

 public QuoteViewRow(Instrument instrument) : base(instrument, 10)
 {
     this.prevPrice = 0.0;
     Color color1 = Color.FromArgb((int)byte.MaxValue, (int)byte.MaxValue, 200);
     Color color2 = Color.FromArgb((int)byte.MaxValue, 230, 230);
     Color color3 = Color.FromArgb(220, (int)byte.MaxValue, 220);
     this.Cells[0].Value = (object)((FIXInstrument)instrument).Symbol;
     this.Cells[0].Style.BackColor = color1;
     this.Cells[2].Style.Format = instrument.PriceDisplay;
     this.Cells[3].Style.Format = instrument.PriceDisplay;
     this.Cells[7].Style.Format = instrument.PriceDisplay;
     this.Cells[7].Style.BackColor = color2;
     this.Cells[8].Style.Format = instrument.PriceDisplay;
     this.Cells[8].Style.BackColor = color3;
     NumberFormatInfo numberFormatInfo = (NumberFormatInfo)NumberFormatInfo.CurrentInfo.Clone();
     numberFormatInfo.NumberDecimalDigits = 0;
     this.Cells[4].Style.FormatProvider = (IFormatProvider)numberFormatInfo;
     this.Cells[6].Style.FormatProvider = (IFormatProvider)numberFormatInfo;
     this.Cells[6].Style.BackColor = color2;
     this.Cells[9].Style.FormatProvider = (IFormatProvider)numberFormatInfo;
     this.Cells[9].Style.BackColor = color3;
     this.Cells[4].Style.Format = "n";
     this.Cells[6].Style.Format = "n";
     this.Cells[9].Style.Format = "n";
     this.Cells[1].Style.Format = DateTimeFormatInfo.CurrentInfo.LongTimePattern;
 }
开发者ID:smther,项目名称:FreeOQ,代码行数:26,代码来源:QuoteViewRow.cs

示例7: Signal

		public Signal(DateTime datetime, ComponentType sender, SignalType type, SignalSide side, double qty, double strategyPrice, Instrument instrument, string text)
			: base()
		{
			this.BuyColor = Color.Blue;
			this.BuyCoverColor = Color.SkyBlue;
			this.SellColor = Color.Pink;
			this.SellShortColor = Color.Red;
			this.ToolTipEnabled = true;
			this.ToolTipFormat = "dfdfs";

			this.DateTime = datetime;
			this.Sender = sender;
			this.Type = type;
			this.Side = side;
			this.Qty = qty;
			this.StrategyPrice = strategyPrice;
			this.Instrument = instrument;
			this.Price = this.Instrument.Price();
			this.TimeInForce = TimeInForce.GTC;
			this.Text = text;
			this.Strategy = (Strategy)null;
			this.Rejecter = ComponentType.Unknown;
			this.StopPrice = 0.0;
			this.LimitPrice = 0.0;
			this.Status = SignalStatus.New;
		}
开发者ID:heber,项目名称:FreeOQ,代码行数:26,代码来源:Signal.cs

示例8: SendMarketOrder

		public MarketOrder SendMarketOrder(Instrument instrument, Side side, double qty)
		{
			MarketOrder marketOrder = new MarketOrder(instrument, side, qty);
			this.Strategy.EB2iXBUSFK((SingleOrder)marketOrder);
			marketOrder.Send();
			return marketOrder;
		}
开发者ID:heber,项目名称:FreeOQ,代码行数:7,代码来源:ATSComponent.cs

示例9: Remove

		public static void Remove(Instrument instrument)
		{
			InstrumentManager.Server.Remove(instrument);
			InstrumentManager.Instruments.Remove(instrument);
			if (InstrumentManager.InstrumentRemoved == null)
				return;
			InstrumentManager.InstrumentRemoved(new InstrumentEventArgs(instrument));
		}
开发者ID:heber,项目名称:FreeOQ,代码行数:8,代码来源:InstrumentManager.cs

示例10: NamedOrderTable

		public NamedOrderTable this[Instrument instrument]
		{
			get
			{
				if (!this.orders.ContainsKey(instrument))
					this.orders.Add(instrument, new NamedOrderTable());
				return this.orders[instrument] as NamedOrderTable;
			}
		}
开发者ID:heber,项目名称:FreeOQ,代码行数:9,代码来源:OrderTable.cs

示例11: AddInstrument

		public void AddInstrument(Instrument instrument)
		{
			if (this.instrumentNodes.ContainsKey(instrument))
				return;
			InstrumentNode instrumentNode = new InstrumentNode(instrument);
			this.instrumentNodes.Add(instrument, instrumentNode);
			this.Nodes.Add(instrumentNode);
			this.UpdateToolTipText();
		}
开发者ID:smther,项目名称:FreeOQ,代码行数:9,代码来源:GroupNode.cs

示例12: AddInstruments

 public void AddInstruments(Instrument[] instruments)
 {
   this.treeView.BeginUpdate();
   foreach (Instrument instrument in instruments)
     this.AddInstrument(instrument);
   if (this.treeView.Nodes.Count == 1)
     this.treeView.Nodes[0].Expand();
   this.treeView.EndUpdate();
 }
开发者ID:smther,项目名称:FreeOQ,代码行数:9,代码来源:InstrumentSelectorPanel.cs

示例13: AddInstrument

		public void AddInstrument(Instrument instrument, IMarketDataProvider marketDataProvider, IExecutionProvider executionProvider)
		{
			if (!this.cYRAR9UWJy.Contains(instrument))
				this.cYRAR9UWJy.Add(instrument);
			this.nxTAjlViDK[instrument] = marketDataProvider == null ? this.strategyMarketDataProvider : marketDataProvider;
			if (executionProvider != null)
				this.utDAWNS3ic[instrument] = executionProvider;
			else
				this.utDAWNS3ic[instrument] = this.strategyExecutionProvider;
		}
开发者ID:heber,项目名称:FreeOQ,代码行数:10,代码来源:MarketManager.cs

示例14: MarketOrder

		public MarketOrder(IExecutionProvider provider, Portfolio portfolio, Instrument instrument, Side side, double qty, string text) : base()
		{
			this.OrdType = OrdType.Market;
			this.Provider = provider;
			this.Portfolio = portfolio;
			this.Instrument = instrument;
			this.Side = side;
			this.OrderQty = qty;
			this.Text = text;
		}
开发者ID:heber,项目名称:FreeOQ,代码行数:10,代码来源:MarketOrder.cs

示例15: InstrumentRow

 public InstrumentRow(Instrument instrument)
 {
   this.Instrument = instrument;
   this.Trades = 0;
   this.Quotes = 0;
   this.Bars = 0;
   this.MarketDepths = 0;
   this.Cells[0].Value = (object) ((FIXInstrument) instrument).Symbol;
   this.UpdateValues();
 }
开发者ID:smther,项目名称:FreeOQ,代码行数:10,代码来源:InstrumentRow.cs


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