PDA

View Full Version : Indicator: Changing fonts for draw objects


NinjaTrader_Josh
07-29-2009, 10:08 AM
Reference sample for NinjaTrader 6.5.xxxx.x or greater.

Drawing text on a chart can be useful for outputting information, but when all information is displayed with the same font and size it could be difficult to quickly see the key information. Since NinjaScript is based on C#, it is possible to use Font objects to create more styles for your text.

This reference sample demonstrates the following concepts:

Drawing text on a chart
Changing the font size on a chart

Important methods and properties used include:

DrawText() (http://www.ninjatrader.com/support/helpGuides/nt7/drawtext.htm)

Other methods and properties of interest include:

Font (http://msdn.microsoft.com/en-us/library/system.drawing.font.aspx)

Import instructions for NinjaTrader 6.5.XXXX.X or greater:

Download the file contained in this thread to your PC desktop
From the Control Center window, select the menu File > Utilities > Import NinjaScript
Select the downloaded file