dind(Name, Num Bars Ago)
Investigator gives you the flexibility to create indicators that can be used by other indicators. These “sub-indicators” can be used as building blocks in other indicators. By creating "sub-indicators", you can save time by not having to re-write parts of indicators every time you create an indicator.
For example, a regular 5 bar Stochastics %D is simply the sum of the last three regular 5 bar Stochastics %K divided by 3:
(regular stochastic %K for the current bar + regular stochastic %K for the previous bar + regular stochastic %K for two bars ago) / 3
Once you create the Stochastics %K indicator, you could use it to create a Stochastics %D indicator.
If you are using Designer Dialogs, when you type in “dind” in the Indicator Editor, a dialog box will appear asking you to select the “sub-indicator” that you wish to include. You will also be asked to enter a number of bars ago value.
For our example, you would drag in the designer indicator icon three times. You would then select Stochastics %K each time, and first enter a 0 in the number of bars ago edit box, representing today’s Stochastics %K, followed by entering a 1 and then a 2, representing yesterday’s and two bar’s ago Stochastics %K..
For our example, you would type in “dind” three times. You would then select Stochastics %K each time, and first enter a 0 in the number of bars ago edit box, representing today’s Stochastics %K, followed by entering a 1 and then a 2, representing the previous bar and two bar’s ago Stochastics %K.
(dind(Stochastics %K, 0) + dind(Stochastics %K, 1) + dind(Stochastics %K, 2)) / 3
Eventually you will have a huge library of “sub-indicators” to choose from, which will save you time in creating new indicators.