Login Page - Create Account

Support Board


Date/Time: Mon, 02 Jun 2025 14:13:54 +0000



Post From: ACSIL - Unable to send concurrent Buy and Sell Orders

[2025-05-04 02:11:56]
ForgivingComputers.com - Posts: 1061
Try this:

      s_SCNewOrder NewOrder;      
      NewOrder.OrderType = SCT_ORDERTYPE_OCO_BUY_LIMIT_SELL_LIMIT;

      NewOrder.Price1 = sc.Bid - (limit * tickSize); // Buy Price
      NewOrder.Price2 = sc.Ask + (limit * tickSize); // Sell Price      
      NewOrder.OrderQuantity = 1;

      // stops, targets, etc.
      
      int Result = sc.SubmitOCOOrder(NewOrder);

Date Time Of Last Edit: 2025-05-04 02:13:37