Opening Range Gaps [TFO]

This indicator displays Opening Range Gaps with an adjustable time window. Its intention is to capture the discrepancy between the close price of previous and new Real Trading Hours (RTH) sessions, i.e. yesterday's close compared to today's open. A gap will be drawn from this area with a solid line denoting its midpoint, and dashed lines denoting the upper and lower quartiles of its range. Its color is determined by whether the new session open price is above or below the previous session close.

The Gap Session parameter allows users to define the specific time window for which to capture the "gap" in price. Using U.S. index futures as an example, we can use 16:00 - 09:30 (EST) to capture the discrepancy between the previous day's close price and the current day's open price. However, this parameter is left as adjustable for users that may want to observe different markets or simply experiment with different time windows.

Show Session Delineations will draw vertical timestamps denoting the start and end times of the provided Gap Session. Track Start Price serves as a visual aid to track the initial price of the Gap Session until its end price is validated, for easy visual verification of a gap's upper and lower bounds. With both options turned off, the indicator will only display the gap boxes and lines, as shown here:

Extend Boxes will draw all gaps with an indefinite extension to the right. This can get messy with a large number of boxes, which is why we have a Keep Last parameter to limit how many sessions' drawings should be stored. Any drawings that were made beyond this number of sessions in the past will automatically be deleted.

The Timeframe Limit will dictate that the indicator as a whole will only draw objects on timeframes less than or equal to this timeframe, determined by the user. In some cases this may help users avoid resolution errors which may arise from using timeframes that are too large for a given session. For example, if a user wanted to track a Gap Session of 16:15-09:30, the Timeframe Limit should be set to 15 minutes because the close price at 16:15 cannot be observed on a 30 minute chart (or greater).

Script de código aberto

Dentro do verdadeiro espírito TradingView, o autor deste script publicou ele como um script de código aberto, para que os traders possam compreender e checar ele. Um viva ao autor! Você pode usá-lo gratuitamente, mas a reutilização deste código em uma publicação é regida pelas Regras da Casa. Você pode favoritá-lo para usá-lo em um gráfico.

Aviso legal

As informações e publicações não devem ser e não constituem conselhos ou recomendações financeiras, de investimento, de negociação ou de qualquer outro tipo, fornecidas ou endossadas pela TradingView. Leia mais em Termos de uso.

Quer usar esse script no gráfico?