Support Board
Date/Time: Sun, 09 Aug 2026 17:10:39 +0000
GetTradePosition() reports non-flat position with zero corresponding activity in Trade Act
View Count: 7
| [2026-08-09 15:26:15] |
| User300970 - Posts: 1 |
|
Symbol: MNQU26-CME, Account: Sim1, Trade Simulation Mode: On Method: Trade >> AutoTrade System Replay BackTest (Accurate Trading System Back Test Mode) sc.SendOrdersToTradeService is confirmed set to 0 (matches Trade Simulation Mode On, re-asserted every calculation call outside SetDefaults). Sequence observed: 1. sc.SellEntry() is called with a Target1Price/Stop1Price attached bracket (SCT_ORDERTYPE_LIMIT / SCT_ORDERTYPE_STOP). Return value: 1 (success). 2. On a later bar, price trades through the Target1Price level. 3. sc.GetTradePosition().PositionQuantity continues to read -1 for the remainder of the backtest (6,600+ subsequent bars) -- it never returns to 0. 4. Trade Activity Log (All Activity, Sim, all symbols, date range from before the backtest start) shows ZERO records for this symbol/account in the entire window -- no order, no fill, no rejection. 5. Trade Service Log for the same window shows nothing either -- no ignored-order message of any kind. Expected: either the order should be visible somewhere in Trade Activity Log / Trade Service Log (accepted, filled, or rejected with a reason), or sc.GetTradePosition() should reflect 0 if no order was actually accepted. Right now sc.SellEntry() returning success, sc.GetTradePosition() reporting an open position, and Trade Activity Log / Trade Service Log showing literally nothing are all mutually inconsistent. Relevant sc.SetDefaults flags: sc.AutoLoop=1, sc.SupportAttachedOrdersForTrading=1, sc.AllowMultipleEntriesInSameDirection=0, sc.AllowOnlyOneTradePerBar=1, sc.CancelAllOrdersOnEntriesAndReversals=1, sc.MaximumPositionAllowed=default I'm sending the full Message Log via "Send for Analysis" since it's too large to paste (20MB+, full backtest run) -- noting that here per your posting instructions. |
To post a message in this thread, you need to log in with your Sierra Chart account:
