Key concepts in this example:
- Creating a custom string for the label of the NinjaScript item.
Important related documentation:
NinjaTrader 8
NinjaTrader 7
- DrawTextFixed()
- DrawText()
- Overriding the ToString() method
- ToString()
TIP: When adding an indicator onto a chart you can also completely remove any labeling on the chart of the indicator name. You can do this by clearing the “Label” field under the “General” category when you add the indicator onto the chart.
Import instructions:
NinjaTrader 8
- Download the file contained in this thread to your PC desktop
- From the Control Center window, select the menu Tools > Import > NinjaScript
- Select the downloaded file
NinjaTrader 7
- 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 and click Import.