Support Board
Date/Time: Tue, 26 Aug 2025 08:54:29 +0000
Post From: ACSIL - Unable to send concurrent Buy and Sell Orders
[2025-07-28 21:34:38] |
User431178 - Posts: 763 |
Well I don't know anything about the rest of your code. Here are the exact settings I have in bots that send multiple buy and sell entries simultaneously, each with their own OCO stops/targets. sc.SendOrdersToTradeService = 0; sc.MaximumPositionAllowed = 100000; sc.SupportReversals = 0; sc.SupportAttachedOrdersForTrading = 0; sc.UseGUIAttachedOrderSetting = 0; sc.AllowMultipleEntriesInSameDirection = 1; sc.CancelAllOrdersOnEntriesAndReversals = 0; sc.CancelAllOrdersOnReversals = 1; sc.AllowOnlyOneTradePerBar = 0; sc.AllowOppositeEntryWithOpposingPositionOrOrders = 1; sc.AllowEntryWithWorkingOrders = 1; sc.CancelAllWorkingOrdersOnExit = 1; I should add, outside of the set defaults block sc.SendOrdersToTradeService and sc.MaximumPositionAllowed are set to appropriate values, and scale in/out is disabled. sc.SupportTradingScaleIn = 0; sc.SupportTradingScaleOut = 0; This also wouldn't impact the issue cited in the message log since it's the entry order, not an attached order: SellEntry signal is ignored because working orders exist Attached or unattached is nothing to do with it. When CancelAllOrdersOnEntriesAndReversals is set to TRUE (Yes), and there is a Buy Entry or a Sell Entry or a Reversal Order Action given, then all working orders except for market orders, for the Symbol and Trade Account of the chart that the trading system study is applied to will be canceled before the entry or reversal order is submitted. The entry or reversal order is submitted immediately after the orders are requested to be canceled. If the order or orders cannot be canceled and the order cancellation has been rejected by the Trading service, then this can result in a Trade Position Quantity which may exceed what was intended. This is something to consider. When CancelAllOrdersOnEntriesAndReversals is set to FALSE (No), then existing working orders for the Symbol and Trade Account will not be canceled. Suggest reading the documentation about unmanaged automated trading, because that is what you probably need to be doing. Automated Trading Management: Unmanaged Automated Trading Date Time Of Last Edit: 2025-07-29 08:04:48
|