Login Page - Create Account

Support Board


Date/Time: Mon, 24 Aug 2026 06:26:56 +0000



Post From: sc.AddAndManageSingleTextUserDrawnDrawingForStudy() and sc.StorageBlock

[2026-08-24 04:14:48]
drinkcodejava - Posts: 44
I have a custom study that uses https://www.sierrachart.com/index.php?page=doc/ACSIL_Members_Functions.html#scAddAndManageSingleTextUserDrawnDrawingForStudy. The same study also uses sc.StorageBlock. According to the function documentation:

void AddAndManageSingleTextUserDrawnDrawingForStudy(SCStudyInterfaceRef& sc, int Unused, int HorizontalPosition, int VerticalPosition, SCSubgraphRef Subgraph, int TransparentLabelBackground, SCString& TextToDisplay, int DrawAboveMainPriceGraph, int LockDrawing, int UseBoldFont);

The sc.AddAndManageSingleTextUserDrawnDrawingForStudy function adds a text drawing to the chart based upon the given parameters and implements the low-level management of that drawing...

Internally this function uses the first four bytes of the sc.StorageBlock. Therefore, do not use the same part of the storage block in the study function that you call sc.AddAndManageSingleTextUserDrawnDrawingForStudy from.

How do you avoid using the first four bytes of sc.StorageBlock?

Thanks!