Login Page - Create Account

Support Board


Date/Time: Mon, 23 Dec 2024 03:31:41 +0000



Post From: ACSIL - List Closed Orders

[2015-07-05 15:13:39]
ejtrader - Posts: 688
By the way - My original problem of Unable to fetch the InternalOrderID's for the Closed orders remain the same. It only fetches the "Open" Orders. I have tested this with Live account / sim account / replay Account. All of them - I get the internalOrderID for Open Orders and not the Closed Orders.


if (sc.SetDefaults) {
sc.MaintainTradeStatisticsAndTradesData = true;
sc.SendOrdersToTradeService = !sc.GlobalTradeSimulationIsOn;
}

Though I don't have any filter in this while loop - it ONLY lists the Open Orders and NOT closed Orders

int Index = 0;
s_SCTradeOrder OrderDetails;

while( sc.GetOrderByIndex(Index, OrderDetails) != SCTRADING_ORDER_ERROR)
{
Index++;
//Print Internal Order ID - this ONLY prints the Open Orders (I don't have any other logic here to filter the trades)
}


I can get the all the details of the closed trades from here but unfortunately this structure doesn't have internalOrderID.


std::vector <s_ACSTrade> TradesList;

s_ACSTrade TradeEntry;
int Size = sc.GetTradeListSize();

for(int Index = 0; Index < Size;Index++)
{
if(sc.GetTradeListEntry(Index, TradeEntry))
TradesList.push_back(TradeEntry);
}

for (unsigned int TradeIndex = 0; TradeIndex < TradesList.size(); TradeIndex++)
{
// Print All Order details - This lists all the Closed Orders Correctly - but There is no OrderID available with this data
}

Date Time Of Last Edit: 2015-07-05 15:23:26