ITextFixed info_text = DrawTextFixed("info_text", "some text", TextPosition.TopLeft, Color.FromArgb( 200, 70, 70, 70), new Font("Arial Narrow", 14, FontStyle.Bold), Color.FromArgb( 255, 000, 000, 000), Color.FromArgb( 100, 100, 100, 255), 1);
SolidColorBrush unnesessary_text_brush = new SolidColorBrush( Color.FromArgb( 100, 000, 000, 000)); unnesessary_text_brush.Freeze(); SolidColorBrush unnesessary_outline_brush = new SolidColorBrush( Color.FromArgb( 255, 000, 000, 000)); unnesessary_outline_brush.Freeze(); SolidColorBrush unnesessary_area_brush = new SolidColorBrush( Color.FromArgb( 100, 100, 100, 255)); unnesessary_area_brush.Freeze(); NinjaTrader.Gui.Tools.SimpleFont unnesessary_font = new NinjaTrader.Gui.Tools.SimpleFont("Courier New", 12) { Size = 50, Bold = true }; TextFixed info_text = Draw.TextFixed(this, "Info_Text", "some text, TextPosition.TopLeft, unnesessary_text_brush, unnesessary_font, unnesessary_outline_brush, unnesessary_area_brush, 1);
May be there is more compact way to put fixed text on chart?
At the time I see only one way out: to create add-on and to encapsulate all this code in static methods with short names.
Comment