Login Page - Create Account

Support Board


Date/Time: Thu, 13 Feb 2025 02:57:30 +0000



Post From: sc.MaximumPositionAllowed no longer works from sc.SetDefaults block

[2020-11-14 20:44:45]
Sierra Chart Engineering - Posts: 104368
This has been verified to be untrue. There simply is not a problem here. A thorough code review on how this works also shows there is not a possibility of a problem.

This is the relevant line from the Set Defaults block where the maximum position quantity is set to a nondefault value:
  if (sc.SetDefaults)
  {


    //This must be equal to or greater than the order quantities you will be submitting orders for.
    sc.MaximumPositionAllowed = 4;
}

And this is what is received when submitting an order with a larger value:
Auto-trade: Replay 10.00X: MESZ20-CME[M] 1 Min #1 | Trading Test 2 | BuyEntry | Bar start date-time: 2020-11-12 11:31:00.000 | BuyEntry signal is ignored because maximum Long Position quantity allowed has been reached or would be exceeded with new order. Max. Position allowed: 4. Resulting Position without working orders: 10. Resulting Position with all working orders except exits: 10. Resulting Position with Market working orders: 10 | 2020-11-14 15:43:36.628

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-11-14 20:46:03