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

C# Instruments.Instrument类代码示例

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

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



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


示例16: Add

		internal void Add(Instrument instrument, Bar bar)
		{
			BarSlice barSlice = null;
			if (!this.data.TryGetValue(bar.Size, out barSlice))
			{
				barSlice = new BarSlice(this.InstrumentsCount);
				this.data.Add(bar.Size, barSlice);
			}
			barSlice.Add(instrument, bar);
		}
开发者ID:heber,项目名称:FreeOQ,代码行数:10,代码来源:BarSliceManager.cs


示例17: TrailingStopOrder

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


示例18: OnInit

 protected override void OnInit()
 {
   InstrumentProviderKey instrumentProviderKey = (InstrumentProviderKey) this.Key;
   this.instrument = instrumentProviderKey.Instrument;
   this.marketDataProvider = (IMarketDataProvider) instrumentProviderKey.Provider;
   if ((int) ((IProvider) this.marketDataProvider).Id != 1)
     ThreadPool.QueueUserWorkItem((WaitCallback) (state => Global.ProviderHelper.RequestMarketData(this.marketDataProvider, this.instrument, (MarketDataType) 4)));
   Global.TimerManager.Start((ITimerItem) this);
   this.Text = string.Format("Order Book [{0}]", (object) ((FIXInstrument) this.instrument).Symbol);
 }
开发者ID:smther,项目名称:FreeOQ,代码行数:10,代码来源:OrderBookWindow.cs


示例19: Add

        public void Add(Instrument instrument)
        {
            if (this.instrumentsBySymbol.Contains(instrument.Symbol))
                throw new ApplicationException(instrument.Symbol);

            this.instrumentsBySymbol.Add(instrument.Symbol, instrument);
            this.SB4BlaFNT0.Add(instrument, true);
            foreach (FIXSecurityAltIDGroup group in instrument.SecurityAltIDGroup)
                this.s1kB8GECjT[group.SecurityAltID + "" + group.SecurityAltIDSource] = instrument;
            base.Add(instrument);
        }
开发者ID:heber,项目名称:FreeOQ,代码行数:11,代码来源:InstrumentList.cs


示例20:

		public TimeSeries this[Instrument instrument]
		{
			get
			{
				return this.serieses[instrument] as TimeSeries;
			}
			set
			{
				this.serieses[instrument] = value;
			}
		}
开发者ID:heber,项目名称:FreeOQ,代码行数:11,代码来源:SeriesParam.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# Series.TimeSeries类代码示例发布时间:2022-05-26
下一篇:
C# LibTiff.TIFF类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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