NinjaTrader_Josh
04-05-2008, 11:20 PM
When running a strategy on a chart you may find the need to plot values onto a chart. If these values are internal strategy calculations that are difficult to migrate to an indicator, you can use the following technique to achieve a plot. The technique involves the use of a custom indicator, StrategyPlot(), that is included in the import.
Note: This technique has limited functionality. It will NOT work for charts in the Strategy Analyzer during backtesting, but it will work on real-time charts.
This reference sample demonstrates the following concept:
Set values to a blank indicator from a strategy
Plot multi-time/instrument values
Important methods and properties used include:
Add() (http://www.ninjatrader.com/support/helpGuides/nt7/add2.htm)
Value.Set()
Other methods and properties of interest include:
Pen.Width
Pen.DashStyle
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
Note: This technique has limited functionality. It will NOT work for charts in the Strategy Analyzer during backtesting, but it will work on real-time charts.
This reference sample demonstrates the following concept:
Set values to a blank indicator from a strategy
Plot multi-time/instrument values
Important methods and properties used include:
Add() (http://www.ninjatrader.com/support/helpGuides/nt7/add2.htm)
Value.Set()
Other methods and properties of interest include:
Pen.Width
Pen.DashStyle
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