Login Page - Create Account

Support Board


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



Post From: Performance impact with copied drawings

[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!