Login Page - Create Account

Support Board


Date/Time: Fri, 24 Jan 2025 01:21:13 +0000



Post From: Replay multiple charts in chartbook. Getting OrderstatusCode == SCT_OSC_UNSPECIFIED

[2017-05-30 09:48:13]
@sstfrederik - Posts: 405
Chart: Replay 240.0X: ESM17 1.00 Range #8 | Study: AS Trading System | OrderStatusCode = 0, FillResult = -1 | 2017-05-30 05:45:11 *

Nothing in the trade service log.

The codesnippet is this:
if(LongOrderExit == true){
  s_SCTradeOrder TradeOrderData;
  FillResult = sc.GetOrderByOrderID(LongOrderID, TradeOrderData);
  OrderStatusCode = TradeOrderData.OrderStatusCode;
    SCString noot;
    noot.Format("OrderStatusCode = %d, FillResult = %d", OrderStatusCode, FillResult);
    sc.AddMessageToLog(noot,1);
  //if filled // added OSC_UNSPECIFIED to make it work with replaying all chartbooks//
  if (OrderStatusCode == SCT_OSC_FILLED || OrderStatusCode == SCT_OSC_UNSPECIFIED){

//reset some persistent values
}