Support Board
Date/Time: Wed, 05 Feb 2025 22:54:44 +0000
[Resolved] ExtendedArrayElementsToGraph not working?
View Count: 572
[2020-03-31 07:07:15] |
ivory - Posts: 95 |
Hello, I am trying to plot bars with some data in a region below an OHLC chart using ACSIL. I succeeded with plotting the bars with the exception of Forward Projected Area. I referred to the documentation and I believe that I am using the functionality correctly, without results. Suppose four bars need to be added: std::vector<float> Bars; Bars.push_back(25); Bars.push_back(50); Bars.push_back(45); Bars.push_back(90); std::vector<SCDateTime> Dates; Dates.push_back(YMDHMS_DATETIME(2020, 3, 16, 0, 0, 0)); Dates.push_back(YMDHMS_DATETIME(2020, 3, 20, 0, 0, 0)); Dates.push_back(YMDHMS_DATETIME(2020, 3, 27, 0, 0, 0)); Dates.push_back(YMDHMS_DATETIME(2020, 3, 31, 0, 0, 0)); These will be added to a Subgraph, which is configured to have 150 bars in the ExtendedArray: SCSFExport scsf_Bars(SCStudyGraphRef sc) { int ExtendedAreaSize = 150; SCSubgraphRef Sg = sc.Subgraph[0]; if (sc.SetDefaults) { sc.GraphName = "Bars Study"; Sg.Name = "Bars"; Sg.DrawStyle = DRAWSTYLE_BAR; Sg.ExtendedArrayElementsToGraph = ExtendedAreaSize; sc.GraphRegion = 1; sc.AutoLoop = 0; return; } The loop that adds bars to the Subgraph has bounds ranging from UpdateStartIndex to ArraySize + ExtendedArrayElementsToGraph, which is aligned with what I see in Studies8.cpp: for (int Index = sc.UpdateStartIndex; Index < (sc.ArraySize + Sg.ExtendedArrayElementsToGraph); ++Index) { SCDateTime dt = sc.BaseDateTimeIn[Index]; for (int i = 0; i < CompBars.size(); i++) { if (dt == CompDates.at(i)) { Sg[Index] = CompBars.at(i); } } } And yet, the bar at 31-Mar-2020 is not plotted. Is the functionality working as expected? Thanks, I. Date Time Of Last Edit: 2020-03-31 07:09:49
|
Screenshot from 2020-03-31 08-55-40.png / V - Attached On 2020-03-31 06:55:57 UTC - Size: 6.68 KB - 196 views |
[2020-03-31 08:49:36] |
ivory - Posts: 95 |
Updating to the newest version resolved the issue.
|
To post a message in this thread, you need to log in with your Sierra Chart account: