/// <summary> /// Create an OrderProfile from this existing order /// </summary> /// <returns>A TTAPI OrderProfile object</returns> /// <remarks>There is a problem with using the TTAPI method to create a copy of an order</remarks> public ezOrderProfile CloneProfile() { //ReadOnlyCollection<ezOrderFeed> feeds = Instrument.TTAPI_Instrument.GetValidOrderFeeds(); ReadOnlyCollection <ezOrderFeed> feeds = null; ezOrderFeed feed = feeds[1]; EZOrderRoute.GetOrderRoute(Instrument, Market.Name); ezOrderProfile profile = new ezOrderProfile(feed, Instrument.BaseInstrument); profile.AccountName = TTAPI_Order.AccountName; profile.AccountType = TTAPI_Order.AccountType; profile.BuySell = TTAPI_Order.BuySell; profile.Destination = TTAPI_Order.Destination; profile.FFT2 = TTAPI_Order.FFT2; profile.FFT3 = TTAPI_Order.FFT3; profile.GiveUp = TTAPI_Order.GiveUp; profile.IsAutomated = TTAPI_Order.IsAutomated; profile.LimitPrice = TTAPI_Order.LimitPrice; profile.MinimumQuantity = TTAPI_Order.MinimumQuantity; profile.Modifiers = TTAPI_Order.Modifiers; profile.OpenClose = TTAPI_Order.OpenClose; profile.OrderQuantity = TTAPI_Order.OrderQuantity; profile.OrderTag = TTAPI_Order.OrderTag; profile.OrderType = TTAPI_Order.OrderType; profile.PriceCheck = TTAPI_Order.PriceCheck; profile.Restriction = TTAPI_Order.Restriction; profile.StopPrice = TTAPI_Order.StopPrice; profile.StopTriggerQuantity = TTAPI_Order.StopTriggerQuantity; profile.SubUserId = TTAPI_Order.SubUserId; profile.TimeInForce = TTAPI_Order.TimeInForce; profile.UserName = TTAPI_Order.UserName; profile.UserTag = TTAPI_Order.UserTag; return(profile); }
private ezOrderFeed GetOrderFeed() { ezOrderFeed feed = null; foreach (ezOrderFeed f in SpreadInstrument.GetValidOrderFeeds()) { if (f.Name.Equals(ServerName) && f.IsTradingEnabled) { feed = f; } } return(feed); }
/// <summary> /// Construct an OrderRoute object populated with the necessary route information /// </summary> /// <param name="feed">OrderFeed to use with this order route</param> /// <param name="accountType">AccountType to use with this order route</param> /// <param name="accountName">AccountName to use with this order route</param> public EZOrderRoute(ezOrderFeed feed, zAccountType accountType, string accountName) { OrderFeed = feed; AccountType = accountType; AccountName = accountName; }
public zLaunchReturnCode LaunchToOrderFeed(ezOrderFeed feed) { return(zLaunchReturnCode.CommunicationError); }
public ezAutospreaderSyntheticOrderProfile(ezOrderFeed feed, ezAutospreaderInstrument spreadInstrument) : base(feed, spreadInstrument) { }