Login Page - Create Account

Support Board


Date/Time: Thu, 02 May 2024 03:49:10 +0000



scale in question 3

View Count: 792

[2015-04-24 04:01:27]
onnb - Posts: 661
I have an ACSIL trading system that has sc.SupportTradingScaleIn = 1;

I am seeing something strange.

I submit a market order with attached stop and then I submit a limit order with attached stop. When the limit order gets filled, the stop order increments and all is working fine.

Now I have another case where the first order submitted is a limit order. So in this case, I submit a limit order with attached stop that gets filled. Then there is a second limit order with attached stop that gets filled. In this case a separate stop order is created.

Any ideas why?

For what its worth, the order creation code posted below so you can see how the order properties are set.

void TradeBase::InitMarketOrder(SCStudyGraphRef sc, float stop_price, s_SCNewOrder &order)
{
  int quantity = GetMarketOrderQuantity(sc);
  order.OrderType = SCT_MARKET;
  order.OrderQuantity = quantity;
  order.Stop1Price = stop_price;
}

void TradeBase::InitLimit1Order(SCStudyGraphRef sc, float stop_price, s_SCNewOrder &order)
{
  int quantity = GetLimit1OrderQuantity(sc);
  float price = GetLimit1Price(sc);

  order.OrderType = SCT_LIMIT;
  order.OrderQuantity = quantity;
  order.Price1 = price;
  order.Stop1Price = stop_price;
}

void TradeBase::InitLimit2Order(SCStudyGraphRef sc, float stop_price, s_SCNewOrder &order)
{
  int quantity = GetLimit2OrderQuantity(sc);
  float price = GetLimit2Price(sc);

  order.OrderType = SCT_LIMIT;
  order.OrderQuantity = quantity;
  order.Price1 = price;
  order.Stop1Price = stop_price;
}

[2015-04-25 06:24:50]
Sierra Chart Engineering - Posts: 104368
The obvious reason that this would happen is that the Attached Stop of the first order has not yet gone into an Open status before the second limit order is submitted.
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

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

Login

Login Page - Create Account