Support Board
Date/Time: Mon, 24 Aug 2026 06:26:53 +0000
[Programming Help] - sc.AddAndManageSingleTextUserDrawnDrawingForStudy() and sc.StorageBlock
View Count: 15
| [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! |
| [2026-08-24 05:42:06] |
| User719512 - Posts: 466 |
|
Are you asking how to do this? // Skip the first 4 bytes reserved by AddAndManageSingleTextUserDrawnDrawingForStudy char* pMyStorage = static_cast<char*>(sc.StorageBlock) + 4; |
To post a message in this thread, you need to log in with your Sierra Chart account:
