Login Page - Create Account

Support Board


Date/Time: Mon, 29 Apr 2024 01:41:03 +0000



BuyEntry signal is ignored because working orders exists

View Count: 972

[2020-06-05 07:01:21]
yellowandy - Posts: 20
Hello, we are getting the error message "BuyEntry signal is ignored because working orders exists" when submitting multiple orders while one is 'open'. According to the documentation if we specify a target/stop attached orders are automatically used and we should be able to use multiple attached orders even if they are still open. Our use case is simple, under a certain condition we want to submit an order with a target but not a stop. The buy order code is as follows:

s_SCNewOrder createOrder(SCStudyInterfaceRef sc, float currentPrice, int quantity, float stopOffset, float targetOffset, bool isLong)
{
  SCString DebugMessage;
  DebugMessage.Format("*************** ************* Creating new order. Quantity=%d Current Price %f- Stop=%f, Traget=%f, TickSize=%f", quantity, currentPrice, stopOffset, targetOffset, sc.TickSize);
  sc.AddMessageToLog(DebugMessage, 0);
    
  s_SCNewOrder NewOrder;
  NewOrder.OrderQuantity = quantity;
  NewOrder.TimeInForce = SCT_TIF_GOOD_TILL_CANCELED;
  NewOrder.OrderType = SCT_ORDERTYPE_MARKET;
  NewOrder.OCOGroup1Quantity = 1;

  NewOrder.Target1Offset = targetOffset;
  NewOrder.AttachedOrderTarget1Type = SCT_ORDERTYPE_LIMIT;
  //NewOrder.Stop1Offset = stopOffset;
  
  return NewOrder;
}

Then we just send that to a buyEntry call, any ideas as to what may be wrong?
[2020-06-05 22:12:50]
Sierra Chart Engineering - Posts: 104368
Refer to:
Automated Trading Management: Troubleshooting Automated Trading System Behavior

You may want to set this automated trading variable to true:
Automated Trading Management: CancelAllWorkingOrdersOnExit

Or use Scaling In:
Attached Orders: Scaling In

There is also a corresponding ACSIL variable for scaling in.
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
Date Time Of Last Edit: 2020-06-05 22:16:29

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account