MetaTrader

MetaTrader Indicators for MT5

UPDATE
Showing 5615 results

Weekend Gap Statistics and Distribution Analyzer

A common adage in trading is that "all weekend gaps close." However, trading this anomaly without understanding the underlying statistics can lead to significant drawdowns. The Weekend Gap Statistics & Distribution Analyzer quantifies this behavior for any specific instrument and timeframe. It calculates exactly how often gaps close, how much profit you can reasonably expect, and critically, how much heat a trader must endure before the closure occurs.

All metrics are displayed in a non-intrusive dashboard anchored to the lower-left corner of the chart. The display features dynamic contrast, automatically switching between light and dark text to ensure readability against any chart background.

Key Features

  • Multi-Timeframe Analysis: Breaks down statistics into three distinct periods: The Last 5 Gaps, The Last 12 Months, and All Available History.

  • Reward vs. Risk Tracking: Simultaneously tracks Maximum Favorable Excursion (MFE) and Maximum Adverse Excursion (MAE) to give a complete picture of trade viability.

  • Take Profit Predictor: Calculates the exact points reached by historical gaps to establish highly probable Take Profit targets.

  • Stop Loss Optimizer: Calculates the historical drawdown of closed gaps to help you set mathematical Stop Losses that survive market noise.

  • Smart UI: Uses a small, clean monospace font anchored to the lower-left corner, leaving your chart free for your actual trading analysis.

Understanding the Dashboard Metrics The indicator categorizes historical data and displays the following data points for each period:

  • Total & Closed Gaps: The absolute number of weekend gaps identified, alongside the count and percentage of gaps that successfully closed.

  • Avg Size | Avg MFE | Avg MAE: The baseline averages. It shows the average opening Gap Size, the average Maximum Favorable Excursion (reward), and the average Maximum Adverse Excursion (risk/heat).

  • TP Hit Rate (MFE >=): This metric analyzes all historical gaps and calculates the exact points reached by 95%, 70%, 50%, and 25% of them. If the 70% metric reads "85 pts," it means that 70% of the time, fading the gap yielded at least 85 points of profit.

  • SL Survival (MAE <=): This metric analyzes only the gaps that successfully closed and tells you the maximum heat taken. If the 95% metric reads "200 pts," it means that 95% of gaps that successfully closed did so while taking 200 points of heat or less.

Input Parameters

  • Min Gap Size (in Points): The minimum required distance between Friday's close and Monday's open to register as a valid gap. This filters out negligible price differences. You must adjust this based on the asset class and the decimal precision of your broker (e.g., a 10-pip gap on a 5-digit broker is 100 points).

  • Max History Bars to Scan: Limits the historical lookback period to preserve terminal memory and computational resources. The default is 100,000 bars.

Practical Usage Guide

1. Data-Driven Take Profit Targets Instead of blindly targeting the exact Friday close, you can now use the TP Hit Rate tiers. If an asset has a 95% hit rate of achieving 40 points in favorable excursion, you can confidently set a partial or full Take Profit at 40 points. You will know you have overwhelmingly high historical odds of the price reaching that level, even if the gap ultimately fails to close completely.

2. Optimizing Stop Loss Placement By utilizing the SL Survival distributions, traders can place highly accurate stop losses. Standard averages can be heavily skewed by single, massive historical outliers. If you are fading a gap and your stop loss is placed well within the 95th percentile of historical adverse heat, you are statistically protecting your trade from premature stop-outs. Place stops just outside these percentile boundaries to give the trade adequate room to breathe without exposing your account to catastrophic outlier risk.

Chart Water Mark

Transform your MetaTrader 5 charts to look as elegant and professional as TradingView.

Are you tired of the default, plain look of MetaTrader? WaterMark MT5 is a lightweight, fully customizable indicator designed to enhance your charting experience by adding sleek, modern watermarks directly to your trading terminal.

This indicator bridges the visual gap between standard MetaTrader charts and premium web based charting platforms. It allows you to display the current trading pair and timeframe dynamically on your chart, alongside two additional fully customizable text labels. Inspired by the clean aesthetics of modern charting tools, this indicator is perfect for traders who want a more visually appealing workspace. Whether you are a trading mentor sharing technical analysis, a prop firm trader journaling setups, or simply an enthusiast who loves a clean aesthetic, this indicator is an essential addition to your toolkit. It gives your charts a unique professional identity and beautifully brands your screenshots before you share them on social media.

Key Features of the Indicator:

Dynamic Pair and Timeframe Display The indicator automatically detects and displays your current instrument and timeframe. If you switch from a 5 minute chart to a 4 hour chart, the text updates instantly. It supports all default and custom MT5 timeframes. The TradingView Aesthetic Bring the modern, minimalistic look of popular charting platforms right into your MetaTrader desktop. Make your workspace inspiring and easy on the eyes. Complete Customization You are in full control. Adjust the font style, font size, and text color to match your specific chart template. You can easily position the watermark anywhere on your screen using the X and Y distance parameters and corner selection. Dual Custom Text Labels Beyond the pair and timeframe, you can add two custom lines of text. Use this to display your brand name, your trading community, your current trading strategy, or important psychological reminders right on the chart. Lightweight and Optimized Coded with clean and modern MQL5 practices, this indicator runs smoothly without consuming excessive CPU resources. It will not slow down your terminal or interfere with your Expert Advisors. How to Use: Simply attach the indicator to any chart. In the input settings, type your desired font name (such as Arial, Verdana, or Ink Free) and adjust the sizing and colors to fit your light or dark chart theme.

Upgrade your charting aesthetic today. Download this indicator for free and experience a cleaner, more professional MetaTrader workspace.

Correlation Matrix Heatmap with Interactive Dashboard

Interactive Correlation Matrix Dashboard

Stop guessing how your pairs move together. This professional-grade heatmap provides a clear, real-time bird's-eye view of the entire market's relationships directly on your chart.

Β Key Trading Features
  • Live Heatmap Visualization: High-contrast color codingΒ  (Red for positive, Blue/Purple for negative) allows you to spot strong relationships in milliseconds.

  • On-Chart Workspace Control:Β 

    • Draggable: Click and move the panel so it never blocks your price action.

    • Minimize/Restore: One-click "Dash" mode to hide the grid and keep only the title bar visible when you're focusing on a trade.

  • Instant Timeframe Analysis: Switch between D1, H4, H1, and M15Β . Understand if a correlation is a long-term structural trend or just a short-term intraday move.

  • High-Precision Values: Displays exact Pearson coefficients (e.g., 0.85, -0.72) so you can distinguish between "correlated" and "perfectly synced."

Β Real-World Use Cases

1. Risk Management (Avoiding Over-Exposure)Β 

If you are Long $EURUSD$ and Long $GBPUSD$, you might think you have two trades. The matrix will show you if they have a 0.90+ correlation, alerting you that you are actually holding a double-sized position on "USD weakness."

2. Finding Hedge OpportunitiesΒ 

Identify pairs with a strong Negative Correlation (e.g., $EURUSD$ and $USDCHF$). If you want to stay in the market but reduce risk during high volatility, these pairs can act as natural hedges.

3. Confirmation & ConfluenceΒ 

Use the matrix to see if a breakout in $Gold$ is being reflected in correlated pairs like $AUDUSD$. If $Gold$ moves but $AUD$ stays flat, the matrix helps you spot the "divergence" that might save you from a fake-out.

4. Cleaning up your Market WatchΒ 

The dashboard automatically pulls from your Market Watch. Use it to quickly see which pairs are currently "active" and moving in sync, helping you focus only on the most tradable setups.

Β Built for Performance
  • Pure MQL5: No external files or complex setups. Just drag, drop, and trade.

  • Ultra-Lightweight: Optimized to ensure your MT5 terminal remains snappy, even when analyzing 12+ symbols at once.

  • Broker-Friendly: Automatically cleans symbol names (stripping suffixes like .m or +) so it works on any account type.

Swap Fee Monitor Panel

Swap Monitor Panel is a lightweight, fully customizable indicator that overlays a live swap rate dashboard directly on your MT5 chart. It scans every symbol in your MarketWatch window and presents long swap, short swap, estimated daily cost, and weekly cost side by side β€” all in one clean, readable panel.

Key Features

  • Live MarketWatch scanning β€” automatically reads all symbols currently in your MarketWatch; no manual configuration needed.
  • Multi-mode swap calculation β€” correctly handles all MT5 swap modes: points, currency (symbol/deposit/margin), and interest-based (current/open price), so monetary cost estimates are as accurate as possible.
  • Daily & Weekly cost columns β€” shows the estimated real monetary cost or gain per your chosen lot size for both long and short positions, updated every 5 seconds.
  • Best swap highlighting β€” optionally highlights the symbol with the most favorable long or short swap in accent color, helping you quickly spot carry trade opportunities.
  • Flexible sorting β€” sort the table by symbol name (A–Z), best long swap, best short swap, or best daily cost with a single input change.
  • Minimize / Close controls β€” title bar buttons let you collapse the panel to just its header bar or remove it from the chart entirely without detaching the indicator.
  • Fully themeable β€” every color (background, rows, positive/negative values, accent, title) is exposed as an input parameter so the panel fits any chart theme.
  • Font & layout control β€” choose your preferred font, font size, panel X/Y position, and toggle the daily/weekly cost columns on or off to keep the panel as compact or detailed as you need.

How It Works

On load, the panel reads swap rates and contract specifications for each MarketWatch symbol using native SymbolInfo functions. It then converts raw swap values into monetary terms based on the symbol's swap mode, tick value, and your reference lot size. The panel refreshes automatically every 5 seconds via a timer and can also be manually refreshed by clicking anywhere on the panel body.

Use Cases

  • Identifying positive carry (swap-positive) opportunities across your watchlist
  • Comparing rollover costs before holding positions overnight or over the weekend
  • Monitoring weekly swap exposure for a given lot size across multiple instruments

Institutional Fourier Transform (DFT) Dominant Cycle Language: MQL5

The Systemic Flaw in Static Indicators

Retail algorithmic developers universally rely on static lookback periods (e.g., a 14-period RSI or a 20-period Moving Average), this architecture contains a fatal mathematical flaw: Market cycles are dynamic, not static. When macroeconomic liquidity shifts, the natural frequency of the asset expands or contracts. Using a static 14-period oscillator when the true market cycle has shifted to an 8-period frequency guarantees severe phase-lag, forcing your Expert Advisor to buy exactly when the institutional distribution cycle is beginning.

The Institutional Edge: Spectral Analysis (Fourier)

To solve the phase-lag problem, proprietary trading firms discard static periods and utilize Digital Signal Processing (DSP).

The Institutional Fourier Transform (DFT) Cycle Extractor applies the mathematical principles of wave physics to the financial markets. It continuously decomposes complex, noisy price action into its constituent sine and cosine waves, mathematically isolating the single Dominant Cycle driving the current market regime.

Core Quantitative Architecture
  • Discrete Fourier Transform (DFT): The engine executes a rolling algorithmic window, scanning frequencies to identify the highest amplitude wave buried within the erratic price noise.

  • Phase-Aligned Wave Projection: Once the dominant frequency is isolated, the indicator projects the isolated sine wave directly over the price action. This allows you to visually track the true institutional pendulum.

  • Zero-Lag Cycle Detection: Unlike moving averages that trail behind price, a Fourier-extracted wave aligns dynamically with the current phase, identifying peaks and troughs mathematically before lagging indicators even cross.

  • CPU-Optimized Loop: Raw DFT calculations are historically notorious for CPU throttling. This MQL5 engine has been rigorously optimized with array-level memory management to execute complex trigonometry in milliseconds without disrupting your trading terminal.

Algorithmic Execution Protocol
  1. Deploy the Engine: Attach the indicator to your active chart, the engine will calculate the rolling DFT window and plot the dominant wave.

  2. Identify Exhaustion: When the Fourier wave reaches its upper or lower structural limits, it signifies that the current market cycle has completed its mathematical rotation.

  3. Synchronize your EA: Use this dominant frequency to dynamically adjust the lookback periods of your other indicators, forcing your systems to breathe in perfect synchronization with the live market pulse.

Super Trend

Supertrend Indicator: ATR-Based Trend Following for MetaTrader 5

The Supertrend indicator is a widely used trend-following tool built on the Average True Range (ATR). It plots a dynamic support or resistance line directly on the price chart, switching between a green uptrend line and a red downtrend line whenever the market changes direction. Traders use this signal to stay on the right side of the trend without having to interpret complex oscillators or multi-panel setups.

This implementation brings the full Supertrend logic into MetaTrader 5 as a native custom indicator. It supports two ATR calculation methods: the standard function built into the MQL5 library, and a manual Simple Moving Average of True Range for traders who prefer a smoother band. Both methods produce the same trailing band structure, where the upper and lower bands tighten or widen with volatility and lock in once price moves decisively away from them.

When the trend flips from bearish to bullish, an upward arrow is drawn at the bar of the crossover. When it flips from bullish to bearish, a downward arrow appears. These buy and sell signals can be toggled on or off through the input settings, keeping the chart clean for traders who only need the trend line itself. The indicator is fully configurable through four input parameters: ATR period, ATR multiplier, calculation method, and signal visibility.

Input Parameters

Note: This indicator is intended for trend identification and educational purposes. Always validate signals on a demo account before applying them to live trading. Past performance of any indicator does not guarantee future results.

Self-Aware Trend System

The Self-Aware Trend System (SATS) is an advanced multi-engine SuperTrend indicator for MetaTrader 5 that goes far beyond a standard trend-following line. It combines four tightly integrated sub-systems: an Adaptive SuperTrend engine, a Trend Quality Index (TQI), a Signal Scoring filter, and a built-in Risk Management layer with automatic TP/SL projection. The result is a single indicator that not only identifies the trend but also measures how strong and trustworthy that trend is, filters low-quality signals, and draws trade levels directly on the chart.

At the core of the indicator is an ATR-based SuperTrend line whose band width adapts in real time using the Kaufman Efficiency Ratio (ER). When price is trending efficiently (high ER), the bands tighten to stay close to price. When price is choppy (low ER), the bands widen to avoid false flips. This adaptation can be further refined by the Trend Quality Engine (TQI), a composite score built from four weighted sub-components: Efficiency (how directional recent movement is), Volatility Regime (whether current ATR is above or below its long-term baseline), Market Structure (pivot-high and pivot-low alignment), and Momentum Persistence (how consistently price has followed through in the same direction). The TQI score runs from 0 to 1 and is shown live in the on-chart dashboard. A Character-Flip detection module watches for a sharp drop in TQI during an active trend, treating that drop as an early warning that the trend character has changed before the SuperTrend line itself flips.

Signals are only displayed when a composite Signal Score clears a configurable minimum threshold. This score is built from momentum alignment, Efficiency Ratio level, Volume Z-score, RSI zone, pivot structure, and a baseline bonus. The scoring system prevents the indicator from printing arrows on every SuperTrend flip and focuses attention on setups where multiple conditions agree. Once a valid signal fires, the indicator immediately draws an Entry line, a Stop Loss (ATR-distance below/above entry), and three Take Profit levels (TP1, TP2, TP3) defined as R-multiples of the initial risk. As subsequent bars form, the TP and SL lines extend forward and are automatically marked when hit.

The Performance Dashboard displays all of this in a compact panel that can be anchored to any corner of the chart. It shows the current TQI and its four sub-components, trend direction, active preset name, RSI, Volume Z-score, Efficiency Ratio, rolling win rate, average R, rolling drawdown, all-time win/loss streaks, and cumulative R. An experimental Auto-Calibration module monitors recent signal R-results and adjusts the Quality Influence parameter up or down to self-correct when the indicator enters a run of poor signals. The indicator is fully non-repainting: the dashboard and all signals are locked to confirmed closed bars (shift = 1), so no value changes on a chart refresh.

Six built-in Presets (Auto, Scalping, Default, Swing, Crypto 24/7, Custom) adjust ATR length, base multiplier, ER window, RSI period, and SL multiplier in a single dropdown. The Auto preset selects Scalping for timeframes up to M5, Default for M6 through H4, and Swing for H5 and above. All visual elements (band colors, signal labels, TQI-colored line, background shading, watermark) are individually toggleable. Alerts fire with either a plain-text or a structured Webhook JSON payload containing symbol, timeframe, price, SL, TP1-3, score, and TQI, making it straightforward to pipe signals into an external system or trade copier.

Input Parameters

Daily Risk Monitor Lite

Daily Risk Monitor Lite is a free and open-source MetaTrader 5 indicator for traders who want to monitor intraday account risk clearly on the chart.

This indicator focuses on a small, explainable, and practical feature set: - Daily Realized P/L - Floating P/L - Daily Total - Current Drawdown % - SAFE / WARNING / DANGER status with color highlighting The goal of this project is simple: help traders see daily account risk in real time. This is a read-only monitoring tool. It does not close positions, block trading, or act as a full protection engine. It is intentionally positioned as a lightweight CodeBase sample for monitoring, learning, and further custom development. ### Main Features - Compact on-chart panel - Account-level daily risk statistics - Daily realized P/L from closed deals - Floating P/L from open positions - Daily total calculation - Current drawdown percentage - Color-based risk status - Optional commission inclusion - Optional swap inclusion - Broker day or manual day-start logic - Custom draggable on-chart panel during the active session ### Data Scope - Account level only - No symbol-level split - No multi-account aggregation ### Calculation Rules #### Daily Realized P/L - Counts closed deals inside the active daily range - Only exit deals are included - Commission can be included or excluded - Swap can be included or excluded #### Floating P/L - Uses the current floating result of all open positions in the account - Swap can be included or excluded #### Daily Total - `Daily Realized P/L + Floating P/L` #### Current Drawdown % - `max((Balance - Equity) / Balance * 100, 0)` - If `Balance <= 0`, drawdown is displayed as `N/A` #### Risk Usage % - Only calculated when `Daily Total < 0` - Formula: `abs(Daily Total) / Daily Loss Limit * 100` - Warning threshold: `50%` - Danger threshold: `80%` ### Day Definition - If `InpUseBrokerDay = true`, the day starts at broker server `00:00` - If `InpUseBrokerDay = false`, the day starts at `InpManualDayStartHour` on broker server time

### What This Indicator Does Not Do - No auto close - No trade blocking - No one-click close - No ON/OFF protection mode - No full account-protection state machine - No push notifications - No report export - No prop firm full-rule engine - No complex multi-page UI

### Input Parameters

- `InpDailyLossLimitMoney` - `InpIncludeCommission` - `InpIncludeSwap` - `InpUseBrokerDay` - `InpManualDayStartHour` - `InpCorner` - `InpXOffset` - `InpYOffset` - `InpFontSize` - `InpPanelBgColor` - `InpSafeColor` - `InpWarnColor` - `InpDangerColor` ### Installation 1. Place the project folder under `MQL5/Indicators/` 2. Open `DailyRiskMonitorLite.mq5` in MetaEditor 3. Compile the indicator 4. Attach it to any chart ### How To Use 1. Attach the indicator to a chart 2. Set your daily loss limit 3. Choose broker day or manual day-start mode 4. Watch Daily Realized, Floating, Daily Total, and Drawdown in real time 5. Use the panel colors for quick risk awareness 6. Drag the custom panel to a preferred chart position if needed ### Suitable For - Manual traders - Traders who want quick intraday risk awareness - Traders who want a lightweight account-level monitor - Developers who want a clean MT5 sample for daily risk calculations ### Not Intended For - Users looking for auto-trading systems - Users expecting enforced account protection - Users expecting trade restrictions or close-all actions - Users looking for a full prop firm compliance engine ### Notes - This is a monitoring tool only - It does not execute protective actions - Dragged panel position is intended for the active session - On accounts with zero commission or zero swap, the related parameter toggles may not produce visible differences

Keltner Channel + Breakout Signal

Keltner Channel + Breakout SignalNo re-paint

XANDER Adaptive Cross

XANDER Adaptive Cross plots two adaptive moving averages on your chart, each one

reading the market through a different lens. When they cross, the system flags aΒ  trend shift with a color-coded arrow. When they align, you ride the trend withΒ  visual confirmation from both lines. ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ πŸ” HOW THE TWO LINES THINK ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ β–Έ FAST LINE β€” Range-aware adaptive Reads where the current price sits inside the recent High/Low range. When price hugs the extremes, the line accelerates β€” capturing breakouts fast. When price drifts in the middle of the range, it slows down β€” filtering noise. β–Έ SLOW LINE β€” Efficiency-aware adaptive Measures the ratio between net price movement and total path traveled. When the market is trending cleanly, the line tracks price closely. When the market is choppy or noisy, the line flattens β€” refusing to chase. The two lines don't see the same thing. That's the point. When they agree,Β  you have conviction. When they disagree, you have warning. ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 🎨 COLOR LANGUAGE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ FAST LINE 🟒 Spring Green β€” Fast line above Slow (bullish bias) πŸ”΄ Orange RedΒ  β€” Fast line below Slow (bearish bias) SLOW LINE 🟑 GoldΒ  Β  Β  Β  β€” Fast line above Slow (bullish bias) 🟣 OrchidΒ  Β  Β  β€” Fast line below Slow (bearish bias) βšͺ Dim Gray on either line β€” undefined or transitioning state ARROWS 🟒 Green arrow below candle β€” Fast just crossed above Slow (long signal) πŸ”΄ Red arrow above candleΒ  Β β€” Fast just crossed below Slow (short signal) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ πŸ“Œ HOW TO USE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ - Wait for an arrow β€” that's your potential entry trigger. - Confirm both lines have switched to their bullish or bearish color. - Use the Slow line as a dynamic trailing reference. - Avoid trading when both lines are flat and gray β€” the market is undecided. - Higher timeframe = stronger signal. Test on M15 and above for cleaner results. ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ βš™οΈ KEY PARAMETERS ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ - Adaptive Period β€” Lookback window for both adaptive calculations (default 14). - Fast Smoothing Period β€” Maximum responsiveness of the adaptive engines (2). - Slow Smoothing Period β€” Maximum smoothing in flat markets (30). - Efficiency Curve Power β€” Curvature of the adaptation (default 2.0). - Applied Price β€” Close, Open, High, Low, Median, Typical, or Weighted. ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ✨ ABOUT XANDER SYSTEMS ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Free open-source tools for serious traders. Built for dark charts, designed for clarity. πŸ’Ό Freelance & custom development :

Machine Learning Supertrend

This is a next-generation SuperTrend indicator that layers a full machine learning engine on top of the classic trend-following concept. Rather than using fixed ATR multipliers and static rules, the indicator continuously learns from its own signal history, adapts its core parameters bar by bar, and filters entries through a multi-stage confirmation pipeline before plotting any arrow on the chart. It runs entirely inside the MetaTrader 5 indicator framework, requires no external libraries, and exposes a hidden Confidence buffer that any Expert Advisor can read directly for automated trading.

The indicator is organized into 13 input groups covering every aspect of its behavior: signal mode, volatility envelope, momentum filter, flow analysis, signal quality, the master reactivity dial, the auto-tune engine, the optimizer, risk guard, context memory (regime grid), decay traces, alerts, and display. Default values have been chosen so that the indicator works out of the box on any liquid symbol and any timeframe, but every parameter can be adjusted independently to suit a specific instrument or trading style.

How the Indicator Works

At its core the indicator computes two SuperTrend bands β€” a Bull line (blue) and a Bear line (red) β€” using an RMA-smoothed ATR envelope applied to a user-selected price basis. The band width and ATR period are not fixed: they start from the values you enter and are then continuously adjusted by the optimizer each time new trade outcomes are evaluated. This means the envelope naturally widens during high-volatility regimes and tightens during calm markets without any manual intervention.

Signals are generated in one of two modes. In Reversal mode the indicator watches for a confirmed trend flip: a bullish pivot must form while the trend is bearish (producing a green buy arrow), or a bearish pivot must form while the trend is bullish (producing a red sell arrow). In Breakout mode the logic is inverted: a new swing high during an uptrend triggers a sell signal anticipating a failed breakout, and a new swing low during a downtrend triggers a buy signal. Both modes require all active confirmation filters to agree before any arrow is drawn.

Confirmation Filters

Every candidate signal passes through three independent filters before it is accepted.

The Momentum Filter uses a standard RSI. For a buy signal to fire, RSI must have touched or crossed below the Cold Level (default 30) within the recent lookback window. For a sell signal, RSI must have touched or crossed above the Hot Level (default 70). This prevents the indicator from generating counter-trend entries during one-sided momentum runs.

The Flow Analysis filter examines tick volume. When the Require Surge option is enabled, a signal is only accepted if the current bar's volume exceeds the average of the preceding sample bars by at least the Surge Threshold factor. This eliminates signals that occur on low-activity bars where breakouts are more likely to be false.

The Signal Quality filter, when Key Levels Only mode is active, requires that the pivot behind the signal is a major structural level: the distance from the swing high to the nearest swing low (or vice versa) must exceed the Key Level Depth multiplied by the current ATR. This keeps signals anchored to significant price structure rather than minor wiggles.

Machine Learning Engine

The ML engine operates through four cooperating subsystems.

The Context Memory (Regime Grid) is an 8x8 grid (configurable) that maps market regime on one axis and volatility on the other. Each cell accumulates exponentially weighted statistics from past trades that occurred under similar conditions. When a new signal is being evaluated, the indicator reads the cell corresponding to the current regime and volatility, blends its recommendations across neighboring cells using a Gaussian kernel (controlled by the Neighbor Blend Radius), and adjusts the confidence score accordingly. Cells decay over time via a half-life parameter so that stale market memory is gradually forgotten.

The Optimizer runs every few bars (set by Update Cooldown). It evaluates a rolling window of recent trade outcomes and computes gradient-style updates for five parameters: band width multiplier, ATR smoothing length, stop distance, take-profit distance, and breakout buffer. Updates are quantized to avoid noise-chasing, and a deadband prevents micro-adjustments that do not meaningfully change behavior. A periodic revert step pulls parameters back toward their anchor values to prevent drift during unusual market conditions.

The Decay Trace Buffer stores a short-term memory of recent signal outcomes as decaying energy records. Each record holds the ATR-normalized return, maximum adverse excursion, regime state, and volatility level at the time of the signal. These traces feed the optimizer with richer context than simple win/loss counts, helping it distinguish between signals that were directionally correct but stopped out by noise versus those that were genuinely wrong.

The Micro-Batch Processor, when enabled, groups recent outcomes into small batches and computes batch-level parameter recommendations. These batch signals are blended with the optimizer's rolling recommendations to smooth out single-trade overreactions.

Risk Guard

The Risk Guard system sits between the signal engine and the buffer writer. Even if all confirmation filters pass and the ML engine endorses a signal, the Risk Guard can block it under the following conditions.

  • Session trade limit. Once the number of signals in the current trading day reaches Max Entries Per Session, no further signals are plotted for the rest of that day.
  • Session loss limit. If the simulated session PnL (computed from the Sim Position USD and ATR-based stop distances) drops below the Session Loss Limit, all further signals are blocked until the next session.
  • Cooldown after loss. After a losing trade the indicator imposes a pause of at least Base Pause After Loss bars. If Dynamic Cooldown is enabled the pause scales with the size of the loss relative to ATR, so larger losses produce longer pauses.
  • Consecutive loss streak. If the number of consecutive losses reaches the Streak Limit, trading is paused for the remainder of the session regardless of the cooldown timer.

All Risk Guard counters reset automatically at the start of each new trading day.

Confidence Score and EA Integration

Every signal bar receives a Confidence Score between 0 and 100, written to the hidden fifth buffer (label: Confidence). The score is built from four components: the grid cell confidence from the Regime Grid, a boost when RSI is strongly confirming the signal direction, a boost when a volume surge is present, and a boost when the current regime aligns with the signal direction. An Expert Advisor can read this buffer using CopyBuffer and use the score to scale position size, filter low-confidence signals, or rank competing signals across multiple symbols.

Dashboard

When Show Info Dashboard is enabled, a multi-column table is drawn directly on the chart as a text label object. The dashboard displays the current trend direction, real win rates for long and short signals separately (computed from actual 5-bar forward price comparison rather than simulation), Sharpe and Sortino ratios from the rolling ATR-return history, total signal counts, the current confidence score, and Risk Guard status (active cooldown bars remaining, trades used in the session, session PnL). The dashboard updates on every new bar and on every real-time tick.

Alerts

The indicator can send a MetaTrader popup alert and/or a mobile push notification whenever a new buy or sell arrow is drawn on the current (live) bar. The Alert Once per Bar option prevents duplicate alerts when the indicator recalculates on the same bar due to new ticks.

Input Parameters

Note: This indicator is provided for educational and analytical purposes. The machine learning subsystems adapt to historical price data and do not guarantee future performance. Always validate on a demo account before using in live trading. Simulated PnL figures shown on the dashboard are based on ATR-scaled assumptions and do not reflect actual broker execution conditions.

Market Clock Pro

Market Clock ProCandle countdown HUD for MetaTrader 5Β 

It shows the time remaining to the next candle close plus contextual data: trading sessions, spread, daily range, and a market-closed state for the current symbol.

FEATURES
  • Candle countdown with color escalation near the close
  • Geographic sessions in UTC (Tokyo, London, New York, Sydney) with countdown to the nearest session end when two or more overlap
  • Market-closed detection with explicit reason: NYSE CLOSED (holiday), LSE CLOSED (weekend), XETRA CLOSED (session)
  • Automatic symbol-to-market mapping for NYSE, LSE, XETRA, TSE, HKEX, ASX, SSE. Manual override available when the broker uses non-standard tickers
  • Holidays calendar as plain text file (164 entries, 2026-2027)
  • Live spread with rolling-average anomaly detection (2x baseline)
  • Daily range vs ADR as percentage, lookback configurable
  • Configurable sound alert before the candle close
  • Four HUD positions, three themes (Dark / Light / Stealth)
  • Timeframe-aware accent color
TECHNICAL
  • EventSetMillisecondTimer as the sole render driver
  • OnCalculate is a no-op, zero indicator buffers
  • Every label deduplicates on text and color before ChartRedraw
  • No DLLs, no WebRequest, no Sleep, no external dependencies
  • Broker-agnostic via TimeTradeServer + SymbolInfoSessionTrade
INSTALLATION
  1. Copy MarketClockPro.mq5 to MQL5\Indicators\
  2. Copy holidays.txt to MQL5\Files\MarketClockPro\holidays.txt
  3. Compile in MetaEditor (F7)
  4. Attach to any chart
The holidays file is optional. When absent or invalid the indicator falls back to broker-session-based detection.

INPUTS

Split in 5 groups: DISPLAY, MODULES, BEHAVIOR, HOLIDAYS, ALERT. Descriptions in English, defaults preloaded.

COMPATIBILITY

MetaTrader 5 on Windows. All timeframes. All asset classes (indices, forex, crypto, metals, commodities, stocks).

RobotFX does not own any of the code provided on this platform. All tools are freely available on the internet; we simply index and re-offer them for download. We are not responsible for any financial losses that may occur. Trading responsibilities rely solely on the traders downloading and using the displayed Expert Advisors, indicators, and scripts. These tools are provided for educational purposes only and may require modification or optimization to align with a trader's specific strategy or needs.
© ROBOTFX - Best MetaTrader Expert Advisors & Indicators