Ejemplo n.º 1
0
 private void OnExecRejected(ExecutionReport report)
 {
     if (_record.Cancelling)
     {
         return;
     }
     var(errorId, _) = report.GetErrorId();
     if (errorId == TimeOutOfBoundsError)
     {
         if (Agent.TradingStatus == XProviderEventType.MarketClosed)
         {
             if (Order.TimeInForce == TimeInForce.GTC)
             {
                 RecreateOrder(report.Order);
             }
             return;
         }
         RecreateOrder(report.Order);
         return;
     }
     else if (errorId == PriceOutOfBoundsError && Order.TimeInForce == TimeInForce.GTC)
     {
         RecreateOrder(report.Order);
     }
 }