Index functions are applied to indicator values on logics. The index refer to the indicators bar value at some point in the past based on the number of bars. It start shifting from the current bar (i.e. index 0) back to the desired index (i.e. index n). For example an index of 1 for a Daily Bar means the previous day’s Bar. For 1 minute bar an index of 4 means the bar that formed 5 minutes ago. The current bar is always at index 0.
In this example the condition is validated when the previous MA bar value is smaller than the current MA bar value. The Index is shown on the lower right of the left MA indicator.
Add or Edit a logics condition and select the Last button, type the index value to get the desired bar in the past and Save the logic.
In this example the Trade Entry logics is based on three successive candlesticks:
We want to model two successive red bars followed by a green bar (see figure below).
The equivalent logic using the Strategy Designer can be defined as follows: