Login Page - Create Account

Support Board


Date/Time: Wed, 08 May 2024 12:54:15 +0000



ACSIL sc.GetOrderFillEntry() TradePositionQuantity error when position quantity is negativ

View Count: 443

[2020-07-27 07:44:00]
CMG - Posts: 179
Hi There,

1. Im using function sc.GetOrderFillEntry() to output trade data to spreadsheets. However, member variable TradePositionQuantity returns the correct quantity only when net position is positive. Whenever the position quantity is negative, irrelevant of the size, "-2147483647" is returned.

Im using the following code taken from one of the examples, not sure if the problem is here:

sc.GetOrderFillEntry(CurrentOrderFillEntrySize -1, OrderFillData);
      
uint32_t OrderQuantity = static_cast<uint32_t>(OrderFillData.Quantity);
  uint32_t InternalOrderID = static_cast<uint32_t>(OrderFillData.InternalOrderID);
  uint32_t TradePositionQuantity = static_cast<uint32_t>(OrderFillData.TradePositionQuantity);

2. I noticed that after upgrade to SC 2138, the Spreadsheet>NUMBER FORMAT>Default is changing CUSTOM CELL BACKGROUND COLORS to to the default white.

Thanks
[2020-07-27 19:03:44]
Sierra Chart Engineering - Posts: 104368
1. We do not see any problem with this. The issue might have to do with the fact that you are putting the quantity into an unsigned integer when it needs to be signed.

2. We will look into this.
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
Date Time Of Last Edit: 2020-07-27 19:03:52

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

Login

Login Page - Create Account