Support Board
Date/Time: Mon, 02 Feb 2026 08:00:56 +0000
[Programming Help] - ACSIL: Submitting Multiple Symbols | Orders Not Appearing in TAL/Trade Orders Window
View Count: 61
| [2026-01-31 20:50:54] |
| Gradient - Posts: 186 |
|
Hi, I'm testing logic to send several orders from a single chart. The current implementation sends orders from Chart A, for Symbol A, Symbol B, and Symbol C. Chart B and Chart C are open within the Chartbook. Orders are generated and submitted for Symbol B and Symbol C as expected however, orders are not being generated or sent for Symbol A (i.e. the base chart symbol). Orders for Symbol B and Symbol C are appearing in the Trade Orders Window. There are no orders appearing for Symbol A. Orders for Symbol B and Symbol C are not visible on the Chart B or Chart C despite Show Order Fills and Show Orders and Positions being enabled. Only Activity for Symbol B and C is appearing in the Trade Activity Tab of the TAL. No Statistics are appearing for any symbol. No Trades are appearing for any symbol in the Trades Tab of the TAL. Can someone advise why this might be happening? The test code is below: (note: X refers to the Base Chart and Symbol, Y refers to the 2nd Chart and Symbol, Z refers to the 3rd Chart and Symbol, aka A, B, C respectively) //Get Chart Arrays SCFloatArray YPrices; SCFloatArray ZPrices; sc.GetChartArray(chart2Number.GetChartNumber(),SC_LAST,YPrices); sc.GetChartArray(chart3Number.GetChartNumber(),SC_LAST,ZPrices); if (YPrices.GetArraySize() == 0 || ZPrices.GetArraySize()==0){ return; } //Getting Symbols for Each Chart SCString YSymbol=sc.GetChartSymbol(chart2Number.GetChartNumber()); SCString ZSymbol=sc.GetChartSymbol(chart3Number.GetChartNumber()); //Initializing Position Sizes const int xPositionSize=10; const int yPositionSize=xPositionSize/2; const int zPositionSize=(xPositionSize+yPositionSize)/3; //Position Data s_SCPositionData xPositionData; s_SCPositionData yPositionData; s_SCPositionData zPositionData; sc.GetTradePositionForSymbolAndAccount(xPositionData, XSymbol, sc.SelectedTradeAccount); sc.GetTradePositionForSymbolAndAccount(yPositionData, YSymbol, sc.SelectedTradeAccount); sc.GetTradePositionForSymbolAndAccount(zPositionData, ZSymbol, sc.SelectedTradeAccount); //Reading in Bar Numbering Study to Create Test Trading Logic SCFloatArray Nums; sc.GetStudyArrayUsingID(barNumsID.GetInt(),0,Nums); //checking that there are no open positions, working orders, or assigned internal order ids for any symbol //then defining trading logic if(xPositionData.PositionQuantity==0 && yPositionData.PositionQuantity==0 && zPositionData.PositionQuantity==0 && xPositionData.WorkingOrdersExist==0 && yPositionData.WorkingOrdersExist==0 && zPositionData.WorkingOrdersExist==0 && xInternalOrderID==0 && yInternalOrderID==0 && zInternalOrderID==0 ) { //Sample Trading Logic if(static_cast<int>(Nums[sc.Index])%2==0 ){ //Create New Orders s_SCNewOrder xOrder; s_SCNewOrder yOrder; s_SCNewOrder zOrder; xOrder.Symbol=XSymbol; yOrder.Symbol=YSymbol; zOrder.Symbol=ZSymbol; xOrder.OrderQuantity=xPositionSize; yOrder.OrderQuantity=yPositionSize; zOrder.OrderQuantity=zPositionSize; xOrder.OrderType=SCT_ORDERTYPE_MARKET; yOrder.OrderType=SCT_ORDERTYPE_MARKET; zOrder.OrderType=SCT_ORDERTYPE_MARKET; xOrder.TimeInForce=SCT_TIF_DAY; yOrder.TimeInForce=SCT_TIF_DAY; zOrder.TimeInForce=SCT_TIF_DAY; //note: YPrices and ZPrices are SCFloatArrays containing the SC_LAST price from their respective charts xOrder.Price1=sc.Close[sc.Index]; yOrder.Price1=YPrices[sc.Index]; zOrder.Price1=ZPrices[sc.Index]; //Send Orders int xResult=sc.BuyOrder(xOrder); int yResult=sc.SellOrder(yOrder); int zResult=sc.BuyOrder(zOrder); //If no submission error, update the order index, internal order id, and send message to log if(xResult>0){ xOrderIndex=sc.Index; xInternalOrderID=xOrder.InternalOrderID; sc.AddMessageToLog("XOrder Submitted Successfully",1); } else{ sc.AddMessageToLog(sc.GetTradingErrorTextMessage(xResult),0); } if(yResult>0){ yOrderIndex=sc.Index; yInternalOrderID=yOrder.InternalOrderID; sc.AddMessageToLog("YOrder Submitted Successfully",1); } else{ sc.AddMessageToLog(sc.GetTradingErrorTextMessage(yResult),0); } if(zResult>0){ zOrderIndex=sc.Index; zInternalOrderID=zOrder.InternalOrderID; sc.AddMessageToLog("ZOrder Submitted Successfully",1); } else{ sc.AddMessageToLog(sc.GetTradingErrorTextMessage(zResult),0); } } Date Time Of Last Edit: 2026-01-31 23:57:52
|
| |
| [2026-01-31 23:04:07] |
| Gradient - Posts: 186 |
|
I added logic to check if there was an error in the submission of the Base Chart Order (i.e. X Symbol). No error messages are being added to the Alert Manager or the Message Log. Below is the additional logic added after the submission of the xOrder: s_SCTradeOrder TradeOrderData; int xErrorChecking=sc.GetOrderByOrderID(xInternalOrderID,TradeOrderData); int xStatusCode=TradeOrderData.OrderStatusCode; if(xStatusCode==SCTRADING_ORDER_ERROR){ sc.SetAlert(1,"X Order Trading Error"); } |
| [2026-01-31 23:25:54] |
| Gradient - Posts: 186 |
|
I also noticed that at the top of the TAL, Num Fills Filtered was non zero. I couldn't find any documentation specifically for this field. |
| |
To post a message in this thread, you need to log in with your Sierra Chart account:
