Technical Indicator

Mastering the Open Range Breakout Indicator for MetaTrader 5
MetaTrader5
Mastering the Open Range Breakout Indicator for MetaTrader 5

Overview The Open Range Breakout (ORB) indicator is a game changer for traders looking to pinpoint price breakouts from the day's opening range. The idea behind this tool is straightforward: the high and low prices set during the first few minutes of a trading session often act as vital support and resistance levels for the rest of the day. This nifty indicator automatically calculates the opening range based on your chosen time frame, plots multiple price targets, and even gives you visual and audio alerts for potential trading setups. It’s all about helping you spot high-probability breakout trades and retests! Core Concept The ORB strategy hinges on the fact that traders establish an initial price range when the market opens. When the price breaks free from this range with momentum, it typically continues in the breakout direction. This indicator tracks that opening range and forecasts multiple profit targets based on its size. Key features include automatic breakout detection, retest identification, and progressive profit targets calculated as multiples of the opening range. Indicator Parameters Basic Settings sOpeningRangeMinutes (default: "15") This sets the length of the opening range in minutes. Options are 5, 15, or 30 minutes, or 0 for custom ranges. The 15-minute opening range (9:30-9:45 EST) is popular for US equities, while shorter periods work well in faster markets. alertBreakoutsOnly (default: false) When this is enabled, alerts trigger only on confirmed breakouts, not just price crossing the ORB levels. This helps filter out false signals by ensuring the price closes beyond the range and continues in the breakout direction. showLabels (default: true) This option shows labels for all ORB levels and price targets on your chart, indicating "ORB HIGH", "ORB LOW", and percentage-based profit targets (PT 50%, PT 100%, etc.). showPreviousDayORBs (default: true) This controls whether ORB levels from previous sessions appear on your chart. Disable it to show only the current day's ORB, which can clean up your view. showEntries (default: true) This enables visual markers for potential entry points, including labels like "Breakout - Wait for Retest", "Retest", and "Failed Retest". These help you pinpoint the best entry timing. Display Options showPriceTargets (default: true) Displays primary profit targets at 50% and 100% of the opening range, which are commonly used for taking partial profits. showPriceTargetsExtended (default: false) Adds extended profit targets from 150% to 500% of the opening range, perfect for trending markets or volatile instruments like gold (XAUUSD). showMidPoint (default: false) Plots a line in the center of the opening range, which often acts as a pivot level for mean reversion strategies. showShadedBox (default: true) This features a filled rectangle over the opening range, giving you a clear visual cue of the ORB zone. Color Customization shadeColor (default: clrTeal) This sets the color for the shaded rectangle of the opening range. orb50Color (default: clrPurple) Color for the 50% profit target lines. orb100Color (default: clrBlue) Color for the 100% profit target lines. orbOtherColor (default: clrTeal) Color for all extended profit targets (150% to 450%). Time Settings sORBStartTime (default: "0930-0945") Custom time in 24-hour format (HHMM-HHMM) when sOpeningRangeMinutes is set to 0, allowing flexibility in defining the opening range. sTimeZone (default: "EST") The timezone for the opening range calculation. The indicator calculates times based on your broker's server time. Label Formatting labelOffsetBars (default: 5) This adjusts the horizontal spacing between current price action and label position. Positive values shift labels to the right. labelOffsetPips (default: 0) This adjusts vertical spacing for label positioning, preventing overlap with price action or other elements. labelFontSize (default: 8) The font size for all text labels on your chart, which you can tweak based on your screen resolution. labelAnchor (default: ANCHOR_LEFT) This sets the anchor point for label positioning, with options like ANCHOR_LEFT, ANCHOR_RIGHT, ANCHOR_CENTER, etc. maxLineBars (default: 500) This limits the line length for ORB level lines, preventing excessively long lines on historical data for better performance. How the Indicator Works Opening Range Calculation The indicator identifies the opening range by monitoring the specified time and recording the highest high and lowest low during that period. For instance, with a 15-minute setup, it captures the range from 9:30 to 9:45. Once the opening range time is up, the high and low levels are locked in and extended forward as horizontal lines for the rest of the trading session. Price Target Calculation All profit targets are calculated as multiples of the opening range size. If the range is 20 points, the 50% target is 10 points beyond the ORB high (for long trades) or below the ORB low (for short trades). This ensures profit targets adjust to market volatility, with larger ranges leading to wider targets. Breakout Detection Logic The indicator uses multi-bar confirmation for breakout signals. A valid breakout needs the price to close above the ORB high on one bar, then continue higher on the next bar with the low staying above the ORB high. This helps filter out false breakouts where price just spikes through the level before reversing. For downside breakouts, the price needs to close below the ORB low and continue with highs remaining below that level. Retest Identification After a confirmed breakout, the indicator looks for pullbacks to the broken level. A valid retest occurs when price touches the ORB level and closes on the correct side, confirming the level has flipped from resistance to support (or vice versa). Failed retests are flagged when price breaks back through the ORB level in the opposite direction, invalidating the original breakout signal. Interpretation and Trading Applications Breakout Trading Strategy The main use of this indicator is to spot high-probability breakout trades. When price breaks out of the opening range with volume, traders can jump in the direction of the breakout, placing stops below the ORB low (for longs) or above the ORB high (for shorts). The first profit target is generally the 50% level, where you can take partial profits. The remaining position can target the 100% level or beyond in strongly trending conditions. Retest Entry Method If you're on the more conservative side, waiting for a retest after the initial breakout is a solid strategy. The "Breakout - Wait for Retest" label signals this opportunity. When price pulls back to test the broken level and finds support (or resistance), it gives you a lower-risk entry point with a tighter stop loss. This method significantly improves the risk-reward ratio compared to jumping on the initial breakout. Range-Bound Trading When the price stays within the opening range, you can use mean reversion strategies, buying near the ORB low and selling near the ORB high. The midpoint line serves as a reference for neutral positioning. Multi-Timeframe Analysis This indicator can be applied across multiple timeframes. Many traders use a 5-minute ORB for scalping, a 15-minute ORB for day trading, and a 30-minute ORB for swing trading, providing a comprehensive view of potential support and resistance zones. Recommended Symbols and Timeframes Optimal Timeframes The indicator shines on 1-minute (M1) to 15-minute (M15) charts, where intraday price action is clear. The M5 timeframe hits a sweet spot between reducing noise and maintaining responsiveness. Suitable Instruments The ORB strategy works wonders on liquid instruments with distinct opening sessions: Forex pairs: EURUSD, GBPUSD, USDJPY at their respective regional opens Gold (XAUUSD): Very responsive to opening range breakouts due to strong directional moves Stock indices: US30, NAS100, SPX500 during the New York session open Cryptocurrencies: BTCUSD, ETHUSD during high-volume periods The indicator performs best on instruments with defined trading sessions rather than 24-hour markets without clear opening times. Performance Optimization The indicator comes with several performance enhancements for seamless chart operation. Buffer initialization to EMPTY_VALUE prevents unnecessary line drawing, while the maxLineBars parameter limits the length of historical lines. The rectangle drawing logic waits until the session wraps up before rendering, which cuts down on computational overhead during active trading. Object naming conventions use unique identifiers based on the day of the year, preventing conflicts when multiple ORB sessions are displayed at once. Alert System The notification system gives you real-time alerts through MetaTrader 5’s built-in alert feature. You can configure alerts for simple level crossings or restrict them to confirmed breakouts only. When a breakout happens, the alert message specifies whether it’s above the ORB high or below the ORB low, allowing you to quickly assess opportunities without constantly monitoring the chart. Visual Presentation All chart elements adhere to professional formatting standards with customizable colors. The default color scheme uses lime for ORB high, red for ORB low, purple for 50% targets, blue for 100% targets, and teal for extended targets and the shaded range box. This color-coding system enables quick visual identification of key levels, even on busy charts. The shaded rectangle serves as an intuitive visual reference for the opening range period, making it clear when the price trades within or outside the established range. Conclusion The Open Range Breakout indicator is a powerful trading tool that combines automatic range calculation, multiple profit targets, breakout detection, and retest identification into one easy-to-use package. Its flexibility through extensive input parameters allows you to tailor the indicator to various trading styles, from aggressive breakout trading to conservative retest entries. With its clean visual presentation and logical alert system, it suits both discretionary traders and those developing automated trading strategies. By focusing on the key opening range period, it helps traders identify the most significant support and resistance levels for each trading session.

2025.11.13
Mastering the Statistical Zigzag Indicator for MetaTrader 5
MetaTrader5
Mastering the Statistical Zigzag Indicator for MetaTrader 5

What is the Statistical Zigzag Indicator? The Statistical Zigzag indicator is a powerful tool for traders using MetaTrader 5. It helps identify swing points by confirming them when the price surpasses a specific volatility threshold. This threshold is calculated as the current standard deviation × multiplier. How It Works Unlike traditional methods that look for fixed highs and lows, this indicator assesses extremes based on local volatility. It captures the most extreme price within the move that triggered the threshold, adapting dynamically to the market's ever-changing conditions. Since the standard deviation updates with each new bar, you're always in tune with the current market trends. Understanding the Projected Levels Once a swing point is confirmed, a horizontal line projects from it, creating a statistically meaningful boundary. This line acts as a key level where the price is likely to either bounce back or break through. Think of it as a support or resistance level that you can trade off. Trading Strategies with Zigzag In a bearish trend, consider viewing any price movement above this projected level as mere noise. You might want to set a sell stop just below the line or enter directly at the level, exiting at breakeven if the price starts to go against your position. Key Inputs to Understand Length: A higher length will result in longer legs and fewer turning points, while a lower length will produce shorter legs and more turning points. Volatility Multiplier: A higher multiplier means the threshold is harder to breach, leading to more rigid legs. Conversely, a lower multiplier makes it easier to trigger, creating more responsive legs.

2025.11.07
Unlocking Market Trends with the Custom EMA Indicator for MT5
MetaTrader5
Unlocking Market Trends with the Custom EMA Indicator for MT5

Are you on the lookout for a powerful tool to enhance your trading game? Look no further! This free custom Exponential Moving Average (EMA) indicator is designed specifically for MetaTrader 5, and it’s here to help you identify trends and generate signals right from your chart. The EMA is a go-to technical tool among traders for its ability to smooth out price data and provide insights into potential market movements. Features User-defined period for the EMA, allowing you to tailor it to your strategy. Versatile choice of applied price: Close, Open, High, Low, Median, Typical, or Weighted. Smooth calculations based on the standard EMA formula, initialized with an SMA of the first bars. Lightweight and efficient, making it easy to customize for your unique trading strategies. 📊 How to Interpret The EMA responds quicker to price changes compared to the Simple Moving Average (SMA). If the price is above the EMA, it often signals an uptrend; conversely, if it’s below the EMA, it could indicate a downtrend. This indicator is frequently employed in strategies such as: Trend-following Moving average crossovers (like EMA 50 crossing EMA 200). ⚙️ Customisation Adjust the line color and thickness to fit your style. Change the applied price and period easily in the input settings. Why Use This Indicator? It helps you identify market direction quickly, giving you the edge in your trades. This can serve as a building block for more advanced trading strategies. Ideal for traders looking for a clean and straightforward EMA implementation.

2025.11.02
Unlocking Trading Insights with the Cumulative Volume Delta (CVD) Indicator for MetaTrader 5
MetaTrader5
Unlocking Trading Insights with the Cumulative Volume Delta (CVD) Indicator for MetaTrader 5

Looking to sharpen your trading edge? The Cumulative Volume Delta (CVD) indicator for MetaTrader 5 is a lightweight, open-source tool that visualizes the net buying and selling pressure as CVD candles in a separate window. It’s an excellent starting point for diving into volume and order flow analysis. What It Does Calculates and displays CVD on your chart using M1 data (this is the free version) Offers an option to reset on timeframe boundaries or to keep it running without resets Compatible with any symbol and timeframe, giving you flexibility in your trading How It’s Calculated (Free Version) For each M1 candle: direction = sign(close − open) Volume delta = direction × tick_volume CVD = cumulative sum of volume deltas Displayed as candles (open/close = previous/current CVD) Inputs InpResetPeriod (ENUM_TIMEFRAMES): Choose a timeframe to reset CVD (e.g., H1, D1) InpNoReset (bool): Set to true if you prefer to never reset How to Install Copy CVD_MT5_v3_m1_codebase.mq5 to: MQL5/Indicators Compile it in MetaEditor (just hit F7) or restart MetaTrader 5 Attach it from the Navigator under Indicators Tips & Troubleshooting On your first run, MetaTrader 5 may need to download M1 history. So, be patient! Scrolling through the chart or switching timeframes can help MT5 fetch the necessary data. If CVD doesn’t seem to update, double-check that your chosen symbol/timeframe has M1 history available. For those with slow terminals, consider trading less busy symbols or keeping fewer charts open to boost performance.

2025.11.02
Mastering Market Moves with Wave Weis Bar Force for MetaTrader 5
MetaTrader5
Mastering Market Moves with Wave Weis Bar Force for MetaTrader 5

Wave Weis Bar Force: Understanding Accumulated Wave Volume Wave Weis Bar Force is a powerful indicator designed to utilize the principles of volume waves (Weis) to pinpoint accumulation phases and shifts in market direction. This tool aggregates volume while the trend remains stable, and when the trend shifts, it initiates a new wave and resets the accumulation count to zero. You can monitor the intensity of these movements through the Intensity window, which compares the current wave's volume to the highest recent accumulation. Input Parameters Volume Type: This setting allows you to choose your volume source—either tick or real volume. Intensity: This parameter defines the bar window used for intensity reference. Bullish Levels (1 to 4): A scale of green, ranging from the lightest shade to LIME. Bearish Levels (1 to 4): A scale of red, from the lightest to RED. Here's an example of the input parameters screen: Visual Interpretation Bullish Levels Level 1: Very light green (indicating a low intensity wave). Level 2: Light green. Level 3: Medium green. Level 4: LIME (signifying the maximum intensity bullish wave). Bearish Levels Level 1: Very light red (indicating a low intensity wave). Level 2: Light red. Level 3: Medium red. Level 4: RED (signifying the maximum intensity bearish wave). WaveMax (white): This marks the bar representing the highest volume within the current wave. WaveClimax (yellow): This marks when the current wave's accumulation surpasses the best historical accumulation. Here's an example of the indicator applied to a chart: Quick Notes Only the current cumulative value is shown in the legend for simplicity. WaveMax and WaveClimax markers are hidden by default to keep the display clean. This indicator is versatile for any asset and timeframe, making it especially handy for intraday analysis.

2025.10.25
Mastering ATR: Wilder Smoothing for Enhanced Trading Insights
MetaTrader5
Mastering ATR: Wilder Smoothing for Enhanced Trading Insights

Good morning, fellow traders! If you run into any issues with this code, whether it’s a glitch or due to MQL5 updates, just drop me a line, and I’ll fix it up for you. Thanks! Looking for more indicators? You can check out all my multi-timeframe codes in CodeBase or the Marketplace by simply searching for "William210". There’s both free and paid stuff available! Why This Code Matters The Average True Range (ATR) indicator, crafted by J. Welles Wilder back in 1978, is a key tool for traders to gauge the volatility of an asset. By averaging the largest True Ranges over a specified period, it provides insights into price movements and helps identify potential trading opportunities. It’s worth noting that the original ATR didn’t include any smoothing techniques. Wilder Smoothing came into play later on, designed to smooth out the fluctuations of the ATR indicator, making it much easier to analyze. Essentially, it’s a simple moving average applied to ATR values, typically over a 14-period timeframe. Wishing You Success with This Code! If you find this code helpful, don’t forget to give it a star! And feel free to add me as a friend to be the first to know when my latest codes hit the CodeBase or Marketplace. I’ve also penned down other handy codes over in CodeBase: Adaptive Moving Average using iama() ADX using iadx() Alligator using alligator() ATR using iatr() The ATR can be quite useful for other indicators, like SuperTrend, which you can find in the Marketplace. Awesome Oscillator without iao() Bollinger Bands using ibands() Donchian Channel Envelopes using ienvelopes() Ishimoku using iishimoku() Keltner Channel MACD using imacd() Momentum using iMomentum() Moving Averages using ima(), and other native functions like SimpleMA(), ExponentialMA(), SmoothedMA(), LinearWeightedMA() I also offer plenty of multi-timeframe smoothing options in the Marketplace! From simple averages to more complex ones like EMA, SMA, and even volume-weighted averages such as VWMA and VEMA—there's something for everyone. Have ideas for new codes? I’m all ears! You can request them on this thread.

2025.10.23
Understanding Bollinger Bands Squeeze: Your Guide to Market Volatility
MetaTrader5
Understanding Bollinger Bands Squeeze: Your Guide to Market Volatility

Bollinger Bands Squeeze - The Calm Before the Storm The Bollinger Bands Squeeze is one of the most potent signals you can spot when using the Bollinger Bands indicator. It highlights a phase of low market volatility that’s about to break, hinting at a significant price movement ahead. 1. What are Bollinger Bands? This technical analysis tool consists of three lines: Middle Band: A 20-period Simple Moving Average (SMA). Upper Band: Middle Band + (2 x Standard Deviation). Lower Band: Middle Band - (2 x Standard Deviation). The upper and lower bands expand and contract based on market volatility. 2. When Does the "Squeeze" Happen? A Bollinger Bands Squeeze occurs when the upper and lower bands contract and draw closer together. This indicates: The market is in a "consolidation" phase. Price volatility is significantly low. Buying and selling pressures are balanced. Visually, the bands coiling tightly resemble a squeeze, compressing the market's energy and tension. 3. The Meaning: It Forecasts a Major Move As the saying goes, "The tighter the squeeze, the bigger the move." When the bands start to expand again after a squeeze, it’s a clear signal that: The consolidation phase has ended. A new, strong trend is on the horizon. The price is likely to "break out" of its trading range with considerable momentum. Crucial Note: The Squeeze alerts you to an impending volatile move; however, it doesn’t predict the direction. To confirm the breakout direction (up or down), look for: A sharp increase in trading volume. Additional technical signals (like candlestick patterns, RSI, etc.). In summary, the Bollinger Bands Squeeze is an invaluable tool for identifying when the market is in the "quiet before the storm." When you notice a squeeze, it's time to gear up for a significant price movement.

2025.10.21
Mastering Pin Bars: The Essential Indicator for MetaTrader 5 Traders
MetaTrader5
Mastering Pin Bars: The Essential Indicator for MetaTrader 5 Traders

What is a Pin Bar? A Pin Bar is a specific type of candlestick that features a small body and an elongated shadow. This configuration often signals a potential price reversal, making it a key pattern for traders to watch. The Pin Bar indicator scans your chart for these Price Action patterns and marks them with icons, making it easier to identify trading opportunities: To avoid cluttering your chart with false signals, the indicator looks for patterns on past bars. When it identifies a Pin Bar, it places a signal arrow on the current bar, right at its opening price. This indicator adheres strictly to the formation rules of Pin Bars, so it's recommended to pair it with another indicator for filtering and confirmation, such as one that highlights key support and resistance levels. Customizing Your Pin Bar Indicator The Pin Bar indicator comes with four adjustable parameters: Minimum Size of a Candle (from low to high): This parameter sets the minimum height of a candle (in pips) that the indicator will analyze. Candles smaller than this threshold will be disregarded, helping you filter out noise in low-volatility markets. Increase this value to refine your signals. Maximum Size of the Candle Body Relative to Its Shadows: This establishes the maximum allowable size of the candle body (the difference between Open and Close) compared to the total height of the candle. A smaller value means more pronounced signals with long shadows and small bodies—classic indicators of a Pin Bar. For clean signals, try values between 0.2 to 0.4. Position of the Body Relative to the Previous Candle: This parameter defines how deep the Pin Bar body can penetrate into the range of the previous candle. A smaller value means the body will be closer to the edge, aligning with classic reversal patterns. Values between 0.2 and 0.4 are ideal for identifying signals where the Pin Bar body is near the previous candle’s border. Aspect Ratio of the Shadows: This sets the minimum ratio between the length of the main shadow (upper for a Pin Bar to Sell, lower for a Pin Bar to Buy) and the opposite shadow. The higher the value, the more prominent the main shadow should be. Values between 1.5 and 2.5 help filter signals to only include candles with a clearly defined long shadow. How the Indicator Works It analyzes each candle on the chart and compares it with preceding ones. It identifies candlesticks with small bodies and one shadow significantly longer than the other. It verifies that the body of the candlestick is contained within the range of the previous candlestick, which is crucial for a classic Pin Bar. If a candle meets all the criteria, the indicator marks it with an arrow on the chart: Blue Arrow: Pin Bar to Buy (long lower shadow) on the previous bar (PinBar to Up - buffer 0), and a blue signal arrow on the current bar (Signal Buy - buffer 2). Red Arrow: Pin Bar to Sell (long upper shadow) on the previous bar (PinBar to Down - buffer 1), and a red signal arrow on the current bar (Signal Sell - buffer 3). Parameter Settings Recommendations For More Rigorous Signal Selection: Increase the Minimum Size of a Candle from Low to High and Aspect Ratio of the Shadows. Decrease the Maximum Size of the Candle Body Relative to Its Shadows and Position of the Body Relative to the Previous Candle. For Increased Signal Frequency: Decrease the Minimum Size of a Candle from Low to High and Aspect Ratio of the Shadows. Increase the Maximum Size of the Candle Body Relative to Its Shadows and Position of the Body Relative to the Previous Candle. Adjust parameters based on the volatility of the instrument and timeframe to ensure the indicator finds the most relevant Pin Bars for your trading strategy. Buffer Numbers for External Programs: Buffer 0 (Name PinBar to Up): Marks Pin Bars for Buy. Buffer 1 (Name PinBar to Down): Marks Pin Bars for Sell. Buffer 2 (Name Signal Buy): Indicates a signal to buy. Buffer 3 (Name Signal Sell): Indicates a signal to sell. To get signals from your Expert Advisor, use Buffers 2 and 3 for Buy and Sell signals, respectively. The values in these buffers appear on the current bar and reflect its opening price, while the previous bar contains the details of the identified pattern. If Buffer 0 has a value, it indicates a Buy Pin Bar, while Buffer 1 signifies a Sell Pin Bar. Feel free to tweak the parameters to align with your trading style and the frequency of signals you prefer, ensuring that the indicator integrates smoothly into your overall strategy.

2025.10.12
1 2 3 4 5 6 Next Last