Login Page - Create Account

Support Board


Date/Time: Wed, 08 Apr 2026 09:07:43 +0000



Post From: Works properly in simulation mode but not for live trading.

[2026-04-08 05:06:08]
User4930 - Posts: 2
I have tested my ASCIL with both chart replay and live data for over 48 hours each and everything works as intended.

I am no longer on simulation mode and trying to do live trading.
My initial orders get placed and my trailing child stop orders are modifying properly, however, my resting stop orders with attached stops are not modifying.

Is there something wrong with this code block such that it works in simulation mode, but not for live trading?:

//------------------------------------------------------
// MODIFY SHORT PRICE TO MATCH ShortLevel
//------------------------------------------------------
if (PendingShortID > 0 && fabs(PendingShortPrice -L1) >sc.TickSize && ActiveStrategy == 1)
{
s_SCNewOrder modify;
modify.InternalOrderID = PendingShortID;
modify.Price1 = sc.RoundToTickSize(level - interval);
modify.Stop1Price = sc.RoundToTickSize(level);

int result = sc.ModifyOrder(modify);

if (result > 0)
{
char msg[256];
sprintf(msg,
"Modified Pending SHORT order ID=%d from %.2f to %.2f",
PendingShortID, PendingShortPrice, modify.Price1);
sc.AddMessageToLog(msg, 0);
}
else
{
// Retrieve order details to get the failure reason
s_SCTradeOrder OrderDetails;
if (sc.GetOrderByOrderID(PendingShortID, OrderDetails) == SCTRADING_ORDER_ERROR)
{
sc.AddMessageToLog("Failed to modify SHORT order, and could not retrieve order details.", 1);
}
else
{
char msg[512];
sprintf(msg,
"FAILED to modify SHORT order ID=%d\n"
"Status Code: %d\n"
"Last Action Source: %s\n"
"Attempted Price: %.2f",
PendingShortID,
OrderDetails.OrderStatusCode,
OrderDetails.LastOrderActionSource,
modify.Price1);

sc.AddMessageToLog(msg, 1);
}
}
}