Login Page - Create Account

Support Board


Date/Time: Thu, 06 Mar 2025 19:07:47 +0000



[Programming Help] - Performance impact with copied drawings

View Count: 581

[2022-02-09 03:02:36]
User275839 - Posts: 61
Hello -

I have a custom study (ACSIL) that draws vertical lines a specific points on a chart. I'm using the s_UseTool APIs.

I have a second chart that is set to automatically copy those vertical lines from the first chart. (Chart > Chart Settings > Advanced Settings 2 > Copy Chart Drawings from Chart #'s).

I'm finding that all sorts of operations like panning or scrolling those charts, or even just switching to that chartbook, are really laggy and stuttery compared to charts with no drawings on them.

Here is a sample snippet of code that does the drawing on the original chart.


if (Input_DrawTradingSignalLines.GetYesNo())
{
s_UseTool VLineTool;

VLineTool.Clear();
VLineTool.ChartNumber = 0;
VLineTool.DrawingType = DRAWING_VERTICALLINE;
VLineTool.BeginDateTime = sc.BaseDateTimeIn[barIndex];
VLineTool.Region = 0;
VLineTool.DrawWithinRegion = Input_KeepSignalLinesInRegion.GetYesNo();
if (Input_CustomLongSignalLine.GetInt() > 0) {
VLineTool.UseToolConfigNum = Input_CustomLongSignalLine.GetInt();
} else {
VLineTool.Color = Subgraph_LongEntryVLineColor.PrimaryColor;
VLineTool.LineWidth = 1;
VLineTool.LineStyle = LINESTYLE_SOLID;
}
VLineTool.AddMethod = UTAM_ADD_OR_ADJUST;
VLineTool.AddAsUserDrawnDrawing = 1;
VLineTool.AllowCopyToOtherCharts = 1;
sc.UseTool(VLineTool);
}

Is there something about the way I'm drawing these lines that would cause the chart rendering to bog down?

Thanks for any advice you can provide!
[2022-02-09 03:23:44]
Sierra Chart Engineering - Posts: 104368
Yes, a lot of drawings can create an inefficiency. This is a simple fact.

If you do not make them user drawn, and specify the horizontal position by bar Index they will be much faster. But they cannot be copied to another chart in this case. Do it this way and do not copy them to another chart.
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
Date Time Of Last Edit: 2022-02-09 03:24:02
[2022-02-09 04:47:19]
User275839 - Posts: 61
Thank you for the quick response.

Because I need the signals (time-stamped vertical lines) to show up on the target chart, what I did was simply decrease the number of days I'm loading in both charts. I was plastering 30 days worth of tick bars with a bunch of drawn and copied lines when I don't really need that much historical data.

With the reduced number of days, even when copying lines from the signal chart, things are back to normal Sierra speediness.
[2022-02-09 11:00:29]
norvik_ - Posts: 106
Hi, using p_GDIFunction can remove a problem. Much more faster.

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

Login

Login Page - Create Account