Login Page - Create Account

Support Board


Date/Time: Mon, 17 Mar 2025 18:28:09 +0000



[Programming Help] - Maximum Positions Allowed infrequently does not work as intended

View Count: 429

[2022-09-14 23:46:13]
User404097 - Posts: 10
Hello.
We are currently running a strategy that relies heavily on the SC.MaximumPositionsAllowed. 99.8% of the time, it works perfectly, meaning we do not enter a position if already in one. However, there has been 2 occurrences in the last month where we were put in 54 and 40 contracts when our MaximumPositionAllowed was set to 8. Directly after flattening the 54 contract trade we re-entered, (without changing anything) and we were capped at the expected 8 contracts.

I guess my question is, why does this happen? Are there other approaches anyone could suggest? I would assume there is some sort of lag happening with the confirmation of an order being placed. However because we cannot pinpoint it down to a specific scenario, it is extremely hard for me as a developer to approach this issue. I guess we can try to use persistent variables but I figured that is the same kind of data storage used for SC.MaximumPositionsAllowed.

Any sort of help, advice, or insights would be greatly appreciated. Thank you so much!

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

Login

Login Page - Create Account