Naming indicators & strategies with hyphens, dashes, spaces, etc.
From time to time I see someone naming an indicator or strategy that uses a hyphen, dash or space. How do they do that in Ninjatrader? From what I can tell it won't allow those characters. Or any special characters. Perhaps this will generate enough of a responce that a new thread can be started. Thanks!!!
Last edited by Zipper Ripper; August 26th, 2012 at 05:36 PM.
In the Initialize method place the following line of code.
this.Name="Any Indicator Name you want, including , ; : and even useless special characters, even such as ®"
Whatever is within the quotes will appear in the Indicator List as the name of the indicator. The Indicator List is the dropdown list of indicators that appears when you select the menu option to add an indicator to a chart.
This has no effect on the file name or the class name.
Don't overdo it with special characters and spaces in the file names, which are governed by what Windows will allow you to put in. Spaces and commas are OK. The file name has no effect on the name that will appear in the indicator list or on the class name, which is the actual name of the indicator by which it is called programatically.
A "funny" trick that some guys use is to set this.Name=""; Ha ha ha, this will show the name of the indicator as an empty string (ie a blank line) at the top of the indicator list. Ferry vunny.
Last edited by Zondor; August 27th, 2012 at 11:58 AM.
The following 2 users say Thank You to Zondor for this post: