Inside-Bar Outcome Tracker: Analyzing Breakout Direction, Failure Rate, and Time to Resolve
Info
The Inside-Bar Outcome Tracker: Analyzing Breakout Direction, Failure Rate, and Time to Resolve is a Indicator for MetaTrader 5 that inside-bar outcome tracker: breakout direction, failure rate and time to resolveoverviewthe inside bar is a prevalent pattern on trading charts, often associated with various trading theories such as market consolidation before a breakout, trading the initial breakout direction, the significance of multiple consecutive inside bars, or the unreliability of the first breakout. This indicator allows for empirical testing of these hypotheses against historical data for any symbol, timeframe, and broker.
Usage
This tool is typically used for breakout trading when price moves beyond key support/resistance levels.
Platform
This Indicator works exclusively on MetaTrader 5 (both build 600+ and newer versions).
Setup
Place the downloaded file in MQL5/Indicators folder via File ? Open Data Folder in MetaTrader 5.
How to Install and Use Inside-Bar Outcome Tracker: Analyzing Breakout Direction, Failure Rate, and Time to Resolve
1. Installation: Place your file in the MQL/Indicators folder via "Open Data Folder" and restart your terminal.
2. Loading: Find the indicator in the Navigator, drag it onto your chart, and configure the input parameters in the popup window.
3. Customization: Press Ctrl+I to open the indicator list, select your tool, and click "Properties" to change colors, levels, or visual styles.
4. Updating: Replace the old file in the Indicators folder with the new version and restart the platform to apply changes.
Frequently Asked Questions
Q: Why is my indicator not showing? A: Verify the file is in the MQL/Indicators folder, or try right-clicking the "Indicators" tree in the Navigator and clicking "Refresh."
Q: Do custom indicators slow down the platform? A: Too many complex indicators can impact performance; remove unused ones via the "Indicator List" (Ctrl+I).
Q: Can I use MT4 indicators on MT5? A: No, MQL4 and MQL5 are distinct languages; ensure the indicator is compiled specifically for your platform version.
What this tool does
Inside-Bar Outcome Tracker: Breakout Direction, Failure Rate and Time to ResolveOVERVIEWThe inside bar is a prevalent pattern on trading charts, often associated with various trading theories such as market consolidation before a breakout, trading the initial breakout direction, the significance of multiple consecutive inside bars, or the unreliability of the first breakout.
Typical Use Case
This Indicator excels in automated trading and technical analysis on MetaTrader 5.
Compatible Platform & Setup
This Indicator works on MetaTrader 5. Place the file in the MQL5/Indicators folder and restart the terminal.
Description & Settings
Related: rex (extended) - another powerful indicator for MetaTrader 5 traders.
Inside-Bar Outcome Tracker: Breakout Direction, Failure Rate and Time to ResolveOVERVIEW
The inside bar is a prevalent pattern on trading charts, often associated with various trading theories such as market consolidation before a breakout, trading the initial breakout direction, the significance of multiple consecutive inside bars, or the unreliability of the first breakout. This indicator allows for empirical testing of these hypotheses against historical data for any symbol, timeframe, and broker. It quantifies these occurrences without requiring complex models.
Also recommended: Session Range Breakout Indicator - similar indicator with strong performance on MetaTrader 5.
Definitions:
Mother bar: The bar whose price range encompasses the subsequent bars. Following a breakout, the bar that achieves the breakout becomes the new mother bar.
Inside bar: A completed bar whose high does not exceed the mother bar's high, and whose low does not fall below the mother bar's low. A difference of less than half a point is considered equal; thus, a bar touching the mother bar's boundary is still classified as an inside bar.
Pattern: A sequence consisting of a mother bar, followed by one or more inside bars, and concluding with a bar that breaches the mother bar's range. This final bar is the breakout bar. The count of inside bars preceding it represents the time to resolution, measured in bars.
Direction: Indicates whether the breakout bar moved above the mother high (up), below the mother low (down), or breached both sides within a single bar (both sides, an outside bar). A breakout affecting both sides is not assigned a specific direction and is categorized separately.
Hold window: This is a period of the first InpHoldBars closes, beginning with the close of the breakout bar. If any of these closes falls back within the mother bar's range, the breakout is considered to have failed. If all closes remain beyond the breached side, the breakout is considered to have held. Patterns within this window are classified as pending and are excluded from the failure rate calculation.
Minimum mother size: The range of the mother bar is assessed using the Average True Range (ATR), calculated using the Wilder's smoothing method on the bar preceding the mother bar. Bars with a range smaller than InpMinMotherAtr are not considered, as smaller mother bars are more easily breached.
The indicator compiles statistics for all patterns collectively, as well as for six distinct, non-overlapping groups. These groups are based on the number of inside bars (1, 2, or 3 or more) and the size of the mother bar relative to ATR (less than InpBucket1, between InpBucket1 and InpBucket2, or greater than InpBucket2). Each pattern is categorized into one row for each of these groupings.
The analysis is performed without look-ahead bias. A bar's status is determined only after it has closed. A bar that is currently forming is displayed with the status of completed bars and is not included in calculations, as its high and low can still change. The calculation process is incremental, processing only new bars and the currently forming bar on each update. Counts are stored in compact tables, and pending breakouts are managed in a short list, eliminating the need for historical rescan.
How to interpret the results:
Histogram (indicator window): A bar appears at each breakout bar of a recognized pattern. Its height denotes the number of inside bars preceding the breakout, positive for an upward break and negative for a downward break. The color indicates the pattern's status: white during the hold window, gray when the breakout held, and dark gray when it failed. A pending breakout's color may change within a few bars.
Dot on the zero line: Appears for a breakout bar that breached both the high and low of the mother bar (an outside bar breakout).
Data Window:
You may also like: Ezo O Prev Levels - Previous Day and Week Reference Levels - excellent alternative for indicator users on MetaTrader 5.
Source Code
#property copyright "RobotFX"
#property link "https://robotfx.org"
#property version "1.00"
#property description "This code is educational. Feel free to use, modify and upgrade as you wish. Visit ROBOTFX.ORG for professional trading tools"
#property indicator_separate_window
#property indicator_buffers 6
#property indicator_plots 4
#property indicator_level1 0.0
#property indicator_levelcolor clrDimGray
#property indicator_levelstyle STYLE_DOT
.......
⚠ Limitations & Risk Warning
- This tool is provided for educational and testing purposes only.
- Past performance does not guarantee future results.
- Trading involves substantial risk of loss. Use on a demo account first.
- Results may vary depending on market conditions, broker, and settings.
- We recommend thorough backtesting and forward testing before using with real funds.