Support Board
Date/Time: Sat, 27 Apr 2024 04:45:07 +0000
Using AddLineUntilFutureIntersectionEx after a full recalculation
View Count: 675
[2021-07-19 19:07:09] |
@sstfrederik - Posts: 403 |
Hi, I have an issue with the function: AddLineUntilFutureIntersectionEx. When I use it to plot a line until intercept on some previous bar after a full recalulation the line plots all the way and is not plotted until intercept from the set StartBarIndex. I would like to use this function on data I only have available some time after the study is fully recalculated. Can this be resolved? Thank you Frederik See below code example: #include "sierrachart.h" SCDLLName("SomeTestingStudy") SCSFExport scsf_TestStudy(SCStudyInterfaceRef sc) { if (sc.SetDefaults) { // Set the configuration and defaults sc.GraphName = "Test Intercept"; sc.StudyDescription = "test"; sc.AutoLoop = 0; sc.GraphRegion = 0; return; } int& Testplot = sc.GetPersistentInt(0); if(sc.UpdateStartIndex == 0){ Testplot = 0; } //Do data processing //comment 2 lines below to see plotting working if(sc.IsFullRecalculation) return; //we only plot after a full recalulation has happened ... not working for (int BarIndex = sc.UpdateStartIndex; BarIndex < sc.ArraySize; BarIndex++){ int IndexToPlot = 3248; //some index number; choose any //used a 30 days 5 min ES chart for testing if(Testplot == 0){ n_ACSIL::s_LineUntilFutureIntersection LineUntilFutureIntersection; LineUntilFutureIntersection.StartBarIndex = IndexToPlot; LineUntilFutureIntersection.EndBarIndex = 0; LineUntilFutureIntersection.LineIDForBar = 0; LineUntilFutureIntersection.LineValue = 4333.75; //some test value LineUntilFutureIntersection.LineColor = RGB(0,0,255); LineUntilFutureIntersection.LineWidth = 2; LineUntilFutureIntersection.LineStyle = LINESTYLE_SOLID; LineUntilFutureIntersection.PerformCloseCrossoverComparison = 0; LineUntilFutureIntersection.AlwaysExtendToEndOfChart = 0; sc.AddLineUntilFutureIntersectionEx(LineUntilFutureIntersection); Testplot = 1; } } } Date Time Of Last Edit: 2021-07-19 19:18:44
|
[2021-07-20 08:52:25] |
Sierra Chart Engineering - Posts: 104368 |
We will look this over, but we cannot do it very soon.
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, *change* to the Teton service: Sierra Chart Teton Futures Order Routing |
[2021-07-20 18:54:45] |
@sstfrederik - Posts: 403 |
I have looked at this some more and it seems that I can make the drawing happen during a self induced recalculation and this function will consequently work as intended. No need to look into this anymore. Thank you.
|
[2021-11-16 16:24:41] |
Sierra Chart Engineering - Posts: 104368 |
Understood.
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, *change* to the Teton service: Sierra Chart Teton Futures Order Routing |
To post a message in this thread, you need to log in with your Sierra Chart account: