PDA

View Full Version : Indicator: Drawing unique objects and objects that update


NinjaTrader_Josh
09-24-2007, 10:01 PM
Being able to mark visually conditions of interest on the chart is useful for the discretionary trader. With NinjaScript you can draw various objects onto your chart to alert you of these points of interest.

The attached reference sample demonstrates the following key concepts:

Drawing unique diamonds to mark the beginning and end of uptrends
Drawing and updating a single rectangle that marks the current uptrend

Important methods and properties used include:

DrawDiamond() (http://www.ninjatrader.com/support/helpGuides/nt7/drawdiamond.htm)
DrawRectangle() (http://www.ninjatrader.com/support/helpGuides/nt7/drawrectangle.htm)

Other methods and properties of interest include:

DrawArrowDown() (http://www.ninjatrader.com/support/helpGuides/nt7/drawarrowdown.htm)
DrawDot() (http://www.ninjatrader.com/support/helpGuides/nt7/drawdot.htm)
DrawLine() (http://www.ninjatrader.com/support/helpGuides/nt7/drawline.htm)
DrawOnPricePanel (http://www.ninjatrader.com/support/helpGuides/nt7/drawonpricepanel.htm)
DrawSquare() (http://www.ninjatrader.com/support/helpGuides/nt7/drawsquare.htm)
DrawText() (http://www.ninjatrader.com/support/helpGuides/nt7/drawtext.htm)
DrawTriangleDown() (http://www.ninjatrader.com/support/helpGuides/nt7/drawtriangledown.htm)

There are many more draw methods that can be used. You can see the complete list in the NinjaTrader Help Guide.

Import instructions:

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