Login Page - Create Account

Support Board


Date/Time: Fri, 27 Dec 2024 02:39:14 +0000



Issue with sc.ActiveToolYValue and Limit orders

View Count: 691

[2016-03-08 02:46:18]
rhovega - Posts: 279
I spotted an issue entering limit orders with attached orders using sc.ActiveToolYValue.

The following Limit order enters a limit order at the last level clicked on the chart upon selecting chart custom menu "MenuIDXXX".

      if (sc.MenuEventID != 0 && sc.MenuEventID == MenuIDXXX)
      {  s_SCNewOrder NewOrder;
        NewOrder.OrderQuantity = 1;  
        NewOrder.OrderType = SCT_ORDERTYPE_LIMIT;
        NewOrder.Price1 = sc.ActiveToolYValue;
        NewOrder.AttachedOrderTarget1Type = SCT_ORDERTYPE_LIMIT;
        NewOrder.AttachedOrderStopAllType = SCT_ORDERTYPE_STOP;
        NewOrder.Target1Price = 1.2;
        NewOrder.StopAllPrice = 1.1;
        int Result = sc.BuyEntry(NewOrder); }

Its a BuyEntry, so if I click above the current price, the limit order will execute at market. Say price is at 1.1025. If I click on 1.1050, the limit will create a BuyEntry at 1.1025. The issue is that the system modifies the attached order prices by 25 pips, rather than leaving them at 1.2 and 1.1. Attached order prices are specified as fixed absolute levels, rather than offsets, so I don't see why the system is modifying the levels.
[2016-03-08 04:03:04]
Sierra Chart Engineering - Posts: 104368
Refer to:
http://www.sierrachart.com/index.php?page=doc/doc_AttachedOrders.html#Fills
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