Login Page - Create Account

Support Board


Date/Time: Fri, 08 May 2026 12:22:10 +0000



Stack corruption exception - s_ACSTrade

View Count: 207

[2026-03-22 15:18:08]
User907968 - Posts: 871
In versions 2888 and 2891 I'm seeing exception due to "stack corruption around variable 'trade'" when running studies built on earlier version (in this instance trade is s_ACSTrade used when looping over trades list).
Seems related to the addition of EntryInternalOrderID and ExitInternalOrderID as they are present in both 2888/2891 but not in the version the study was built on.
There is no error message sent to the message log (about the exception) and the chart either doesn't load fully, stops working correctly, or the entire program shuts down.
[2026-03-22 20:13:48]
Sierra_Chart Engineering - Posts: 23700
Sierra Chart will only set EntryInternalOrderID and ExitInternalOrderID in the s_ACSTrade structure, when the study version is built for version 2882 or higher and that is when they were added.

What version was the study built for?
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, use the Teton service:
Sierra Chart Teton Futures Order Routing
Date Time Of Last Edit: 2026-03-22 20:15:37
[2026-03-23 10:53:34]
User907968 - Posts: 871
The build version is 2669.

In both versions tested (2888 and 2891) GetTradeListEntry appears to be writing 16 bytes past the end of s_ACSTrade.
Testing with debug build shows 16 bytes of stack guard (0xCC) immediately after s_ACSTrade being overwritten with zeros after GetTradeListEntry returns.
As 16 bytes corresponds to 2 x uint64, you can see why I might conclude that the new variables were being added to the s_ACSTrade structure.
[2026-03-24 15:41:29]
Sierra_Chart Engineering - Posts: 23700
We do not see how this is possible. We do not know what the exact cause is. If you give us the compiled study we could figure it out.
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, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2026-03-24 15:55:20]
User719512 - Posts: 433
Does s_ACSTrade Clear() need the same pattern like s_UseTool Clear() and do the below?

// Must consider that this function can be called using a new version of this function on an older instance of the structure. Therefore version checks are necessary. This is also why there is member by member resetting.

[2026-03-24 19:29:30]
Sierra_Chart Engineering - Posts: 23700
Yes actually that is the problem. We will solve that.
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, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2026-03-24 20:14:41]
User907968 - Posts: 871
This is good to know, thank you!
Date Time Of Last Edit: 2026-03-24 20:14:58

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

Login

Login Page - Create Account