I am looking for a way to draw a text next to my rectangle.
I can draw the rectangle successfully. The problem comes when I have to draw my text. The text should be drawn right to the rectangle and should not be a fixed text, since the rectangle is drawn dynamically too. That means, when a new bar is formed, the rectangle increases in the length and the text therefore has to move so that the space between the rectangle and the text remains.
I have used the following function to dray the rectangle:
Draw.Rectangle(NinjaScriptBase owner, string tag, DateTime startTime, double startY, DateTime endTime, double endY, Brush brush)
The following function could be appropriate to draw the text:
Draw.Text(NinjaScriptBase owner, string tag, bool isAutoScale, string text, DateTime time, double y, int yPixelOffset, Brush textBrush, SimpleFont font, TextAlignment alignment, Brush outlineBrush, Brush areaBrush, int areaOpacity)
Any help would be welcome.
Thanks
Comment