Login Page - Create Account

Support Board


Date/Time: Thu, 27 Mar 2025 23:36:36 +0000



Post From: MBO Data and Teton Symbol Settings Issue

[2022-11-17 16:22:57]
Sierra_Chart Engineering - Posts: 18967
The answer at post # 7 is correct and that is the only solution.

However, the change we made recently created a new problem. We are releasing version 2454 in about 20 minutes to revert what we did previously. So you will need version 2454.

And here is the new code example:

SCSFExport scsf_MarketLimitOrdersForPriceExample(SCStudyInterfaceRef sc)
{
  if (sc.SetDefaults)
  {
    // Set the configuration and defaults

    sc.GraphName = "MarketLimitOrdersForPrice Example";

    sc.AutoLoop = 0;
    return;
  }


  // Do data processing
  int BidNumLevels = sc.GetBidMarketDepthNumberOfLevels();
  int AskNumLevels = sc.GetAskMarketDepthNumberOfLevels();

  const int NumberOfMarketOrderDataElements = 20;
  n_ACSIL::s_MarketOrderData MarketOrderData[NumberOfMarketOrderDataElements];
    
  for (int LevelIndex = 0; LevelIndex < BidNumLevels; LevelIndex++)
  {
    s_MarketDepthEntry MarketDepthEntry;
    sc.GetBidMarketDepthEntryAtLevel(MarketDepthEntry, LevelIndex);

    int ActualLevels = sc.GetBidMarketLimitOrdersForPrice(sc.Round(MarketDepthEntry.AdjustedPrice / sc.TickSize), NumberOfMarketOrderDataElements, MarketOrderData);

    for (int OrderDataIndex = 0; OrderDataIndex < ActualLevels; OrderDataIndex++)
    {
      uint64_t OrderID = MarketOrderData[OrderDataIndex].OrderID;
      t_MarketDataQuantity MarketDataQuantity = MarketOrderData[OrderDataIndex].OrderQuantity;
    }

  }

  for (int LevelIndex = 0; LevelIndex < AskNumLevels; LevelIndex++)
  {
    s_MarketDepthEntry MarketDepthEntry;
    sc.GetAskMarketDepthEntryAtLevel(MarketDepthEntry, LevelIndex);

    int ActualLevels = sc.GetAskMarketLimitOrdersForPrice(sc.Round(MarketDepthEntry.AdjustedPrice / sc.TickSize), NumberOfMarketOrderDataElements, MarketOrderData);

    for (int OrderDataIndex = 0; OrderDataIndex < ActualLevels; OrderDataIndex++)
    {
      uint64_t OrderID = MarketOrderData[OrderDataIndex].OrderID;
      t_MarketDataQuantity MarketDataQuantity = MarketOrderData[OrderDataIndex].OrderQuantity;
    }

  }

}


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, use the Teton service:
Sierra Chart Teton Futures Order Routing