Support Board
Date/Time: Sat, 12 Jul 2025 09:40:22 +0000
Post From: Reversal Order in ACSIL not getting created with Attached Orders
[2025-07-09 16:13:35] |
User431178 - Posts: 739 |
Did you review / debug your code before posting? There are two while loops in your code where you do not increment the orderIndex variable >>> infinite loop >>> application hang. Unrelated to the hang, but you do not need to recalculate the barSize for every bar in the array on each chart update. You can just change the below code from this // Calculate bar sizes: abs(high - low)
for (int i = 0; i < sc.ArraySize; ++i) { barSize[i] = std::fabs(sc.High[i] - sc.Low[i]); } to this barSize[sc.Index] = std::fabs(sc.High[sc.Index] - sc.Low[sc.Index]);
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.
The reason is that your subgraph Subgraph_AvgBarSize contains very small values compared to the main chart.In setdefaults add the below. sc.ScaleRangeType = SCALE_SAMEASREGION;
|