Login Page - Create Account

Support Board


Date/Time: Sat, 12 Jul 2025 09:52:08 +0000



Post From: Reversal Order in ACSIL not getting created with Attached Orders

[2025-07-09 04:41:47]
rajeshh - Posts: 14
Update 7/11/2025 - Hello, I have renamed the original thread because that issue was due to a bug, and I did not want folks to get confused by the title. The initial posts below are about fixing that bug. Please jump to Reversal Order in ACSIL not getting created with Attached Orders | Post: 420860 to see the issue relevant to the current title.


Hello - I have coded a sample trading strategy in the attached cpp file to demo my problem that when run hangs Sierra Chart fairly quickly. The idea is that if one is long, and encounters a bear bar and wants to scale-in at the close of the bear bar, but also submit an opposite short order at the low of the bear bar, I am not able to get this to work without Sierra Chart hanging.
In the attached cpp file, the strategy initiates a long position above a bull bar (and has attached PT, and SL at 1x average bar size, and 2x barsize respectively), and scales in at the close of every bull bar thereafter. When it encounters a bear bar, it updates the stop loss of the long position to below the low of the bear bar, initiates a scale-in long ( in case, the stop is never triggered), but also submits a pending short order below the low of the bar in case the market does go below the bear bar. Once a short position is opened, the same idea repeats until the market goes above a bull bar. Note I am not using Reversals functionality of ACSIL.
All the actions are happening when the bar has closed, which is when its meaningful, so as to also avoid overhead.
Sierra Chart starts fine, but within a few bars will hang around 10 seconds before the close of a bar. It doesn't necessarily hang on the same bar. When it hangs, the whole app becomes unresponsive, and I have to end the Task in Windows 11 Task Manager. Another weirdness I see is the green open positions line disappears intermittently. At times, I also see that the open position quantity has increased, but the attached orders don't increment accordingly. So I have an open position of quantity 3, but attached orders are quantity 2.

If I only pursue the long side of the strategy, it seems to go longer (as long as bull bars exist), but hangs around 10 secs time of the CountDown timer of a bear bar closing.

I have tested this on a Windows 11 Alienware AMD laptop with 32 GB ram using SPY 5 min chart. Can you please try reproducing this on your side?
p.s: When I add this study to a chart, I have to click on Settings, and scale Same as Region for Region 1, for the bars of the chart to show.
Date Time Of Last Edit: 2025-07-11 20:51:35
attachmentRVH-opposing-orders.cpp - Attached On 2025-07-09 04:36:35 UTC - Size: 14.64 KB - 14 views