Support Board
Date/Time: Fri, 22 Nov 2024 16:23:43 +0000
Post From: ACSIL - Arbitrary vertical text alignment
[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 |