Support Board
Date/Time: Tue, 26 Nov 2024 09:21:07 +0000
Post From: REPORT CODING ISSUE -8998
[2023-12-21 13:38:36] |
User431178 - Posts: 543 |
Order error -8998 means skipped due to full recalculation. Before your order entry logic, insert the following line, this will mean that the order execution is not done until after the full calculation. if (sc.UpdateStartIndex==0) return; Also, the element below is not quite right. // Send the order int OrderID = 0; SCString logMessage; int result = sc.BuyEntry(newOrder, OrderID); The second parameter of sc.BuyEntry is not for the OrderID, you set it to the current bar index, in your case sc.ArraySize-1. Automated Trading From an Advanced Custom Study: Buy Entry | Buy Order Date Time Of Last Edit: 2023-12-21 13:39:03
|