Support Board
Date/Time: Fri, 22 Nov 2024 16:00:02 +0000
[Programming Help] - ACSIL - Arbitrary vertical text alignment
View Count: 89
[2024-10-15 02:25:34] |
User457894 - Posts: 4 |
I am programmatically adding text labels to a chart and need to specify a Y axis alignemnt independant of price to prevent labels overlapping but can't find the proper approach in the forums or documentation. X axis should follow the main chart datetime axis Y axis need to be completely independant so that the label vertical alignment doesn't change when scrolling through the chart If someone can point me to the file for the Volume study I think that may give me the information I need. Function that I'm using to place the text markers void PlaceTextMarker(SCStudyInterfaceRef sc, SCDateTime dateTime, int UniqueLineNumber, int textY, int red, int green, int blue, SCString text)
{ s_UseTool Tool; Tool.Clear(); Tool.ChartNumber = sc.ChartNumber; Tool.DrawingType = DRAWING_TEXT; Tool.Region = 0; Tool.Text.Format("%s", text.GetChars()); Tool.FontSize = 16; Tool.FontBold = true; Tool.ReverseTextColor = 0; Tool.LineNumber = UniqueLineNumber; int BarIndex = sc.GetNearestMatchForSCDateTime(sc.ChartNumber, dateTime); Tool.BeginDateTime = sc.BaseDateTimeIn[BarIndex]; Tool.BeginValue = textY; Tool.Color = RGB(red, green, blue); Tool.AddMethod = UTAM_ADD_OR_ADJUST; sc.UseTool(Tool); } // End PlaceTextMarker |
[2024-10-15 06:53:51] |
User457894 - Posts: 4 |
Figured it out. I needed to set Tool.UseRelativeVerticalValues = 1
Using Drawing Tools From an Advanced Custom Study: s_UseTool::UseRelativeVerticalValues / s_UseTool::UseRelativeValue |
To post a message in this thread, you need to log in with your Sierra Chart account: