What is Intellisense?
Intellisense is a form of automated autocompletion popularized by the Microsoft Visual Studio Integrated Development Environment. It also serves as documentation
and disambiguation for variable names, functions and methods. Intellisense is built into the NinjaScript Editor resulting in an efficient environment to code your custom indicators and strategies.
Accessing the Intellisense List Box
Within the NinjaScript Editor you can type "this." to bring up the Intellisense list box. The list box contains all methods (functions) and properties available for use. You can select a method or property by simply selecting it via your mouse, or scrolling with your up or down arrow key. Pressing either the "Tab" or "Enter" key will automatically insert the code into the NinjaScript Editor. While in the list box, you can press any letter key to rapidly scroll down to the next property or method beginning with the letter of the key you pressed.
In the image below:
1. A property
2. A method
If you know that you want to access the Simple Moving Average indicator method which is SMA(), you think it starts with "SM" in "SM" and press CTRL-SpaceBar which would display the Intellisense list box below.
Pressing CTRL-SpaceBar after any text will always either:
Method Description and Signatures
When selecting a method:
1. Type in "(" to display the method description and signature
2. A light yellow colored frame will appear with the method description and availabe signatures
3. In the image below you will see "2 of 2" which means that we are looking at the 2nd of 2 available method signatures. You can scroll through all available signatures by pressing on the arrow up and down keys.
What is a method signature? A method signature is a common term used in object-orientated programming to uniquely identify a method. This usually includes the method name, the number and type of its parameters and its return type.
From the image below, the DMI() method which represents the Dynamic Momentum Index indicator has two method signatures:
DMI(IDataSeries inputData, int period)
Accessing Method and Property Descriptions
You can hover your mouse cursor over any method or property in the NinjaScript Editor to display any associated description.