OPEN-SOURCE SCRIPT

Opening Range with Breakouts & Targets [LuxAlgo]

Opening Range with Breakouts & Targets is based on the long-standing Opening Range Breakout strategy popularized by traders such as Toby Crabel and Mark Fisher.

This indicator measures and displays the price range created from the first period within a new trading session, along with price breakouts from that range and targets associated with the range width.

🔶 USAGE

快照

The Opening Range (OR) can be a powerful tool for making a clear distinction between ranging and trending trading days. Using a rigid structure for drawing a range, provides a consistent basis to make judgments and comparisons that will better assist the user in determining a hypothesis for the day's price action.

NOTE: During a suspected "Range Day", the Opening Range can be used for reversion strategies, typically targeting the opposite extreme of the range or the mean of the range. However, more commonly the Opening Range is used for breakouts on suspected "Trend Days", targeting further upward or downward market movement.

The common Opening Range Breakout Strategy (ORB) outlines a structure to enter and exit positions based on rigid points determined by the Opening Range. This methodology can be adjusted based on markets or trading styles.

  1. Determine Opening Range High & Low: These are the high and low price within a chosen period of time after the market opens. This can be customized to the user's trading style and preference. Common Ranges are from 5-60 mins.

  2. Watch for a Breakout with Volume: A Breakout occurs when price crosses the OR High (ORH) or OR Low (ORL), an increase in volume is typically desired when witnessing these breakouts to confirm a stronger movement.

  3. Manage Risk: Based on user preference and the appropriately determined amount of risk, multiple ways can be determined to manage risk by using Opening Range.
    For Example: A stop-loss could be set at OR Mean (ORM) or the opposite side of the range, while a profit target could optionally be set at the first price target generated by the script.
    Alternatively, a user might want to use a Moving Average (MA) as an adaptive stop-loss and use price targets to scale out. These are just 2 examples of the possible options, both capable with this tool.


🔹 Signals

快照

Signals will fire based on the break of the opening range, this is indicated by arrows above and below the range boundaries.

Optionally, a bias can be added to these signals to aid in mitigating false signals by using a directional filter based on the current day's OR relative to the previous day's OR.

Regardless of the signal bias being enabled, the Opening Range Zone will always be colored directionally according to this.

  • If the current day's OR is above the previous day's OR, the Zone will be Green.
  • If the current day's OR is below the previous day's OR, the Zone will be Red.


By enabling the signal bias, signals in the opposite direction of the daily bias will fire on the cross of the first target in that direction.

🔹 Targets

快照

In this indicator, targets are not limited and will generate infinitely based on a % width of the Opening Range.

Additionally, there are 2 display methods for these targets.

  1. Extended: Extends the targets to the current bar and displays all targets that have been crossed so far within the session.
  2. Adaptive: Extends only the 2 closest targets surrounding price, allowing for a display consisting of fewer lines at one time.


🔶 DETAILS

🔹 Historical Display

This indicator can be utilized in multiple ways, for use in real-time, and for historical analysis to form methods. Because of this, the indicator has an option to display only the current day's data or the entire historical data. This can also help clean up the chart when it is in use.

🔹 Time Period

The specific time period to create the opening range is entirely up to each user's preference, by default it is set to 30 mins; however, this time period can be edited with full control if desired.

Simply toggle on the "Custom Range" and input a range of time to create the range.

快照

🔹 Session Moving Average

The Session Moving Average is a common Moving Average, which resets at the beginning of a new session. This allows for an unbiased MA that was created entirely from the current session's price action.

Note: The start of the session is determined by the start of the Opening Range if using a custom range of time.

快照

🔶 SETTINGS

  • Show Historical Data: Choose to display only the current session's data or the full history of data.
  • Opening Range Time Period: Select the time period to form the opening range from. This operates on Session Start, so it will change with the chart.
  • Custom Range: Opt for a custom Range by enabling this and inputting your range times as well as your needed timezone.
  • Breakout Signal Bias: Select if the Breakout Signals will use a Daily Directional Bias for firing.
  • Target % of Range: Sets the % of the Range width that will be used as an increment for the Targets to display in.
  • Target Cross Source: Choose to use the Close price or High/Low price as the crossing level for Target displays. When this source crosses a target it will generate more targets.
  • Target Display: Choose which style of display to use for targets.
  • Session Moving Average: Optionally enable a Moving average of your choice that resets at the beginning of each session (start of opening range).
breakoutbreakoutsluxalgoMoving AveragesopeningrangerangesessionsignalstargetsTrend Analysis
LuxAlgo
Wizard
Get access to our exclusive tools: luxalgo.com

Join our 150k+ community: discord.gg/lux

All content provided by LuxAlgo is for informational & educational purposes only. Past performance does not guarantee future results.

开源脚本

本着真正的TradingView精神,此脚本的作者已将其开源,以便交易者可以理解和验证它。向作者致敬!您可以免费使用它,但在出版物中重复使用此代码受网站规则约束。 您可以收藏它以在图表上使用。

想在图表上使用此脚本?

免责声明