The Position indicator is a versatile indicator: it calculates various output results related to the position of the bar with regards to multiple references such as session start or end (the calculated position can be expressed in bars, minutes, or seconds from the start or end of the trading session) or various calendar references (day/week/month/quarter/year).
It is primarily used through the POS token in the RTL syntax of filter rules within signal or custom indicators. Some outputs are also dedicated to being used inside SCAN or backtesting rules
Here is the full list of results available using the Position Indicator:
- Bars from Start of Session: The actual number of existing bars from the end of the session. The last bar of each completed session will always be 1. In a current open session, the result of the most recent bar will reflect the theoretical number of bars remaining in the session.
- Bars from End of Session: The actual number of existing bars from the start of the session. The first bar of each session will have a value of 1, the second bar a value of 2, and so on. This result considers only existing bar and ignores any gaps.
- Bars from Start of Session (Theoretical): The theoretical number of bars remaining in the session. It ignores bars that may be missing or on which no trades occurred. The bar that ends on the ending time of the session has a value of 1.
- Bars from End of Session (Theoretical): The theoretical number of bars from the start of the session. It ignores bars that may be missing or on which no trades occurred. The bar that begins on the start time of the session has a value of 1.
- Minutes from End of Session: The number of minutes from the start of the bar to the end of the session. The last bar of the session on a 10-minute chart (bar whose ending time coincides with ending time of session) would have a value of 10. (Only valid for Time-based bar)
- Minutes from Start of Session: The number of minutes from the start of the session to the end of the bar. The first bar of the session on a 10-minute chart (bar which ends 10 minutes after session start time) would have a value of 10.
- Seconds from End of Session: The number of seconds from the start of the bar to the end of the session. The last bar of the session on a 15-second chart (bar whose ending time coincides with ending time of session) would have a value of 15. (Only valid for Time-based bar)
- Seconds from Start of Session: The number of seconds from the start of the session to the end of the bar. The first bar of the session on a 15-second chart (bar which ends 15 seconds after session start time) would have a value of 15.
- Bars from End of Data: The number of bars from the bar to the end of the data. This result is useful for performing backtesting cleanup on the last bar tested, for which the result will be 1 (POS = 1).
- Bars from Start of Data: The number of bars from the start of the data to the bar. This result is useful for performing backtesting initialization on the first bar tested, for which the result will be 1 (POS = 1).
- Missing Bars in Session: The time-based bars that are missing thus far in the session. If the session begins at 9:30 on a 1-minute chart, a value of 10 on the 10:30 bar means there were 50 of 60 1-minute bars.(Only valid for Time-based bar)
- Missing Bars in Data: The time-based bars that are missing thus far in the data. This result can be useful in custom columns to detect incomplete data.
- Missing Bars over Period (Historical): The time-based bars that are missing over a given period specified below. This result can be useful in charts to detect incomplete data.
- Missing Bars over Period (Scan): The time-based bars that are missing over a recent period specified below. This result can be useful in custom columns or scans to detect incomplete data.
Presentation
Above is a 5-Minute Candle Chart of the S&P Mini (ES). The Position Indicator has been added to the lower pane displaying the result "Bars Since Start of Session" and drawn as a histogram. The preferences seen below reflect those used for the Position Indicator above.