Login Page - Create Account

Support Board


Date/Time: Sun, 19 May 2024 23:12:39 +0000



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

[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