Login Page - Create Account

Support Board


Date/Time: Wed, 15 Jan 2025 18:02:06 +0000



sc.GetOrderByIndex does not return any orders when trading live to Interactive Brokers

View Count: 1003

[2017-08-23 04:10:16]
jseppa - Posts: 18
Hi,

I'm not able to see any orders when I connect my study to live trading feed, however it works fine with simulated trading.

The following code returns nothing when I create a real order directly on the chart (using trading chart dom):
while (true)
  {
    s_SCTradeOrder OrderDetails;
    if (sc.GetOrderByIndex(Index, OrderDetails) == SCTRADING_ORDER_ERROR)
      break;

    Index++; // Increment the index for the next call to sc.GetOrderByIndex

    // Log the order
    logOrderDetails(sc, OrderDetails);
}

however when I enable "Trade Simulated Mode on" and create an order in the same way, it works fine:


Chart: JD [M] 5 Min #1 | Study: Test Function | id=[751938] pid=[751937] [Sell] [Stop(2)] [Pending Child-Client(3)] qty=[0] [JD] price=[41.31] | 2017-08-23 00:06:32 *
Chart: JD [M] 5 Min #1 | Study: Test Function | id=[751937] pid=[0] [Buy] [Limit(1)] [Open(5)] qty=[1000] [JD] price=[41.81] | 2017-08-23 00:06:32 *

Am I missing a setting somewhere? I've set the following:
sc.SendOrdersToTradeService = true;

Cheers,

Jason
[2017-08-23 04:43:52]
jseppa - Posts: 18
It turns out setting
sc.FreeDLL = false;
fixed my issue. Cheers
[2017-08-23 21:47:55]
Sierra Chart Engineering - Posts: 104368
For non-simulated orders this does need to be set:
sc.SendOrdersToTradeService = true;


We do not see how what you describe in post #2 is related. That will make absolutely no difference.
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
[2017-08-23 22:21:00]
jseppa - Posts: 18
yeh I don't know what happened. That's the only thing I changed, I restarted the application, and it started working.
I'll try to reproduce

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account