OPEN-SOURCE SCRIPT
Cập nhật 5m ORB with Dynamic Position Size and Target

This script is based off of the 5 minute high and low (opening range) of the NY session, specifically developed for ES/MES. It marks the high and low of the first five minutes of trading, as well as marks profit targets if price breaks out high or low.
In settings you can configure the maximum capital to risk, high volatility target and regular volatility, and the ORB size in points that indicates if it is a high or normal volatility regime. I use a maximum risk of $500, normal volatility target of 1.5 RR, and a high volatility target of 1.0 RR. The maximum ORB range that I assume is normal volatility is 20 points, so below 20 points it targets 1.5 RR, above it targets 1.0 RR.
For illustrative purposes, I will outline my current strategy below. This is not financial advice, obviously.
When price breaks out of the 5 minute opening range, I enter in the direction of the move (break out of the high, I enter long; break down from low, I enter short). Stop loss is set at one tick outside of the opposite end of the range. I currently exit the full position at the target price, but will be playing around with leaving a runner for trend days.
Again, not financial advice. Be sure to paper trade before committing any real funds.
In settings you can configure the maximum capital to risk, high volatility target and regular volatility, and the ORB size in points that indicates if it is a high or normal volatility regime. I use a maximum risk of $500, normal volatility target of 1.5 RR, and a high volatility target of 1.0 RR. The maximum ORB range that I assume is normal volatility is 20 points, so below 20 points it targets 1.5 RR, above it targets 1.0 RR.
For illustrative purposes, I will outline my current strategy below. This is not financial advice, obviously.
When price breaks out of the 5 minute opening range, I enter in the direction of the move (break out of the high, I enter long; break down from low, I enter short). Stop loss is set at one tick outside of the opposite end of the range. I currently exit the full position at the target price, but will be playing around with leaving a runner for trend days.
Again, not financial advice. Be sure to paper trade before committing any real funds.
Phát hành các Ghi chú
This script is based off of the 5 minute high and low (opening range) of the NY session, specifically developed for ES/MES. It marks the high and low of the first five minutes of trading, as well as marks profit targets if price breaks out high or low.In settings you can configure the maximum capital to risk, high volatility target and regular volatility, and the ORB size in points that indicates if it is a high or normal volatility regime. I use a maximum risk of $500, normal volatility target of 1.5 RR, and a high volatility target of 1.0 RR. The maximum ORB range that I assume is normal volatility is 20 points, so below 20 points it targets 1.5 RR, above it targets 1.0 RR.
For illustrative purposes, I will outline my current strategy below. This is not financial advice, obviously.
When price breaks out of the 5 minute opening range, I enter in the direction of the move (break out of the high, I enter long; break down from low, I enter short. Stop loss is set at one tick outside of the opposite end of the range. I currently exit the full position at the target price, but will be playing around with leaving a runner for trend days.
Again, not financial advice. Be sure to paper trade before committing any real funds.
23 FEB 2026: Fixed improper identification of ORB high during high volatility.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.