Crabel Stretch Levels
Toby Crabel's Day Trading With Short Term Price Patterns and Opening Range Breakout (1990) is where "opening range breakout" as a concept comes from, but the book's own method does not stop at the opening range itself. Crabel measured, day after day, how far price typically travelled BEYOND the opening range by the time the day was done - the "stretch" - and used that historical distance, not the raw opening range, to set the levels that mattered. This indicator does the same measurement, continuously. For every completed day it records the opening range (the first InpORMinutes minutes of the session) and how far that day's high pushed above it and how far that day's low pushed below it. Those two distances feed a rolling average over the last InpLookbackDays completed days. Once today's own opening range closes, this average - built only from days strictly before today - is projected out from today's own opening range as a dashed ray above and below it: today's stretch target, not yesterday's or some fixed multiple of the range. A plain opening-range box is drawn underneath so the raw range and the projected stretch are both visible at once. Notes and limitations - No stretch level is drawn on a day until InpLookbackDays completed days already exist in history - there is nothing to average yet. - The stretch distance is a simple average, not a distribution; a single outsized day can pull it for InpLookbackDays afterwards. - Day boundaries use broker-time midnight. A session that opens after midnight is still anchored correctly, but a broker that closes for part of the day (rather than trading continuously) can still shift which calendar day some late bars are counted under versus how the broker itself defines its trading day. - This is a level-drawing tool, not a signal generator - it does not place trades or judge whether a level held.
Indicator · MT5 · v1.0 · Free
About Crabel Stretch Levels
Crabel Stretch Levels is an indicator for MetaTrader 5. It can alert you with a pop-up, sound, email or push message. It has 7 settings, such as Session start hour, Session start minute and Or minutes. MQL source code included.
Files in the download: CrabelStretchLevels.ex5, CrabelStretchLevels.mq5, CrabelStretchLevels.txt.
Settings
| Setting | Default | What it does |
|---|---|---|
| Session start hour | 8 | Opening range start hour (broker time, 0-23) |
| Session start minute | 0 | Opening range start minute (0-59) |
| Or minutes | 30 | Opening range length, in minutes |
| Lookback days | 20 | Completed days averaged into the stretch distance |
| Or color | clrSilver | Opening range box colour |
| Stretch color | clrOrange | Projected stretch level colour |
| Alerts | true | Alert once per day when price first trades beyond a stretch level |
How to install
- Download the ZIP from your PolyMaria library and unzip it.
- In MetaTrader 5 open File → Open Data Folder, then go to MQL5 → Indicators.
- Copy the .mq5 file(s) there. Put any .mqh files in MQL5 → Include.
- Open the .mq5 file in MetaEditor and press Compile (F7) if MetaTrader does not show it.
- Drag the indicator from the Navigator onto a chart and adjust the settings.
Tags: Breakout · Alerts · MT5 Indicator · MQL5 Source Code