Login Page - Create Account

Support Board


Date/Time: Tue, 28 May 2024 04:31:39 +0000



Post From: BuyOrder() cannot support Limit Chase Order for different symbol in the chart

[2018-01-24 13:28:29]
User841591 - Posts: 42
I tried to submit the Limit chase order (SCT_ORDERTYPE_LIMIT_CHASE) with BuyOrder(NewOrder) in which the symbol is different from the chart that the studies attached. It return error code -8 (Unsupport order type) However, it work fine with the limit order (SCT_ORDERTYPE_LIMIT). The description of the trade setting and NewOrder is attached below. Pls advise what wrong on it.

sc.AllowMultipleEntriesInSameDirection = true;
sc.MaximumPositionAllowed = 2;
sc.SupportReversals = false;
sc.SendOrdersToTradeService = true;
sc.AllowOppositeEntryWithOpposingPositionOrOrders = true;
sc.SupportAttachedOrdersForTrading = false;
sc.CancelAllOrdersOnEntriesAndReversals= true;
sc.AllowEntryWithWorkingOrders = false;
sc.CancelAllWorkingOrdersOnExit = true;
sc.AllowOnlyOneTradePerBar = true;
sc.MaintainTradeStatisticsAndTradesData = true;

  s_SCNewOrder NewOrder2;
  NewOrder2.Symbol=Symbol2;
  NewOrder2.OrderQuantity = 1;
  NewOrder2.OrderType = SCT_ORDERTYPE_LIMIT_CHASE;
  NewOrder2.MaximumChaseAsPrice = 4;
Result = sc.BuyOrder(NewOrder); \\ Return -8 Unsupport order type