Skip to content

Repository files navigation

🎯 RANGO EA β€” Quantitative Regime-Adaptive DCA Trading System for MT5

Platform Language Strategy Backtest Telegram Support

Rango EA is an advanced, institutional-grade quantitative trading system for MetaTrader 5 (MT5). It replaces traditional "blind" Dollar-Cost Averaging (DCA) and dangerous Martingale grids with an intelligent Regime-Dependent Permission Engine, Trend Danger Scoring (TDS), and Statistical Exhaustion Scoring (ES).


πŸ“Œ Table of Contents


🎬 Video Tutorials

Watch the video tutorial playlist

▢️ Watch the full playlist on YouTube

πŸ’‘ Overview

Traditional grid and Martingale systems inevitably fail during prolonged, one-directional trend explosions. They blindly stack orders into strong adverse momentum until the account suffers a margin call.

Rango EA was built from the ground up to solve this exact problem.

Instead of blindly opening orders at fixed pip intervals, Rango incorporates a Multi-Factor Quantitative Permission Gate:

  1. It continuously monitors market regime persistence using Hurst Exponent, ADX, and ATR Expansion Ratios.
  2. If the market is trending strongly against you, DCA order expansion is strictly blocked.
  3. Signals and entries are only permitted when quantitative metrics confirm that adverse trend momentum has decayed and mean-reversion probability is mathematically elevated.
                        β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                        β”‚   Market Price & Volatility     β”‚
                        β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                         β”‚
                 β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                 β–Ό                                               β–Ό
   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
   β”‚ Trend Danger Score (TDS)  β”‚                   β”‚   Exhaustion Score (ES)   β”‚
   β”‚  - ADX Trend Strength     β”‚                   β”‚  - Distance from 200 EMA  β”‚
   β”‚  - Hurst Memory (H > 0.55)β”‚                   β”‚  - RSI Extremes / Bands   β”‚
   β”‚  - Volatility Accelerationβ”‚                   β”‚  - Momentum Decay Wicks   β”‚
   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                 β”‚                                               β”‚
                 β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                         β–Ό
                        β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                        β”‚   DCA Readiness Score (DRS)     β”‚
                        β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                         β”‚
        β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
        β–Ό                                β–Ό                                β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  DCA BLOCKED  β”‚                β”‚   DCA WATCH   β”‚                β”‚   DCA READY   β”‚
β”‚ Hold Expansionβ”‚                β”‚ Await Trigger β”‚                β”‚ Execute Signalβ”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

⚑ Why Rango is Different (The Anti-Blowup DCA)

Feature Conventional DCA / Martingale Rango EA
Averaging Trigger Fixed pip distances or timer Quantitative DCA Readiness Score (DRS)
Trending Protection None (keeps averaging into crash) Anti-Expansion Gate & Trend Danger Block
Timing Precision Blind / Fixed Pips Quantitative Exhaustion & Reversal Confirmation
Directional Gate Opens dual Buy/Sell blindly Directional Isolation (No counter-trend clutter)
Risk Boundary Unbounded risk Strict Risk Management & ATR Stop Protection
Visual Telemetry Basic or none Real-Time HUD Dashboard & Smart Signal Arrows
Strategy Tester Often hidden or limited 100% Free, Unrestricted Backtesting

πŸš€ Key Features

1. πŸ›‘οΈ DCA Readiness & Regime Permission Engine

  • Trend Danger Score (TDS: 0–100): Evaluates trend strength, Hurst persistence, and volatility acceleration. If $TDS > 65$, new DCA entries are frozen.
  • Exhaustion Score (ES: 0–100): Quantifies statistical stretch from the 200 EMA, RSI overbought/oversold extremes, candle body deceleration, and rejection pinbars.
  • Anti-Expansion Gate: Instantly blocks averaging if short-term ATR surges violently over long-term ATR ($ATR_5 / ATR_{30} > 1.35$) during news spikes or breakout cascades.
  • Emergency DCA Kill Switch: Automatically halts averaging if adverse market conditions exceed critical safety limits ($TDS > 85$).

2. 🎯 Directional DCA Isolation

  • When market is in a confirmed Uptrend, Buy DCA is blocked and only Sell DCA mean-reversion is evaluated at exhaustion.
  • When market is in a confirmed Downtrend, Sell DCA is blocked and only Buy DCA is evaluated at bottom exhaustion.
  • Opposing dual signals are only allowed in Sideways / Range-bound conditions.

3. πŸ›‘οΈ Professional Risk Management & Flexible Sizing

  • Multi-Mode Risk Sizing: Supports calculation by Volume (Lot Size), Fixed Currency Amount ($), or Account Risk Percentage (%).
  • Automated SL/TP Projection: Dynamic distance calculations based on higher-timeframe ATR and customizable Risk:Reward ratios.
  • Execution Safeguards: Spread filters, minimum broker stops distance validation, and margin requirement verification prior to execution.

4. πŸ“Š Professional On-Chart Dashboard & Telemetry

  • Clean, high-contrast visual display showing:
    • Current Market Regime & Volatility state.
    • Live TDS (Trend Danger Score) and DRS (DCA Readiness Score).
    • Win/Loss statistics, trend pullback state, and live profit metrics.

5. 🏹 Smart Signal Arrows & Push Notifications

  • Clean arrow markers rendered only on state transitions with customizable cooldowns and auto-expiration cleanup (no chart clutter).
  • Direct MT5 Mobile Push Notifications: Delivers real-time trade signals and DCA readiness alerts directly to your phone via MetaQuotes ID.

6. πŸ§ͺ Unrestricted MT5 Strategy Tester

  • Backtest, stress test, and optimize Rango on historical data across any broker, instrument, and timeframe with zero restrictions.

πŸ› οΈ Quick Start & Installation Guide

Prerequisites

  • Platform: MetaTrader 5 (Build 6140 or newer recommended)
  • OS: Windows 10 / 11 or Windows Server (VPS)
  • Account Type: Hedging account recommended (standard or ECN with low spread)

Step-by-Step Installation

  1. Download Rango.ex5:

    • Download the latest compiled Rango.ex5 from the Releases tab or the repository root.
  2. Copy to MT5 Directory:

    • Open your MetaTrader 5 terminal.
    • Click File βž” Open Data Folder.
    • Navigate to MQL5 βž” Experts\.
    • Paste Rango.ex5 into this folder.
  3. Enable Algorithmic Trading & DLL Imports:

    • In MT5, go to Tools βž” Options (or press Ctrl + O).
    • Select the Expert Advisors tab.
    • Check βœ… Allow algorithmic trading.
    • Check βœ… Allow DLL imports (Required for hardware licensing validation & volume identification).
    • Check βœ… Allow WebRequest for listed URL and add https://api.telegram.org (If using Telegram notifications).
  4. Attach Rango to Chart:

    • In the Navigator window (Ctrl + N), expand Expert Advisors.
    • Drag and drop Rango onto your desired chart (e.g., XAUUSD, EURUSD, GBPUSD, BTCUSD).
    • Recommended Timeframe: M5 or M15.
    • In the EA settings popup, ensure Allow live trading is checked, configure your risk parameters, and click OK.

πŸ”‘ How to Activate (Free Backtesting & Live Setup)

Rango offers two operating tiers:

1. πŸ§ͺ Strategy Tester (Simulations & Backtesting)

  • Open the MT5 Strategy Tester (Ctrl + R), select Rango.ex5, choose your symbol and date range, and click Start.
  • Backtest any historical period with complete feature access!

2. πŸ’» Live / Demo Chart Activation

When you first attach Rango to a live or demo chart:

  1. Rango runs in View-Only Demo Mode (live dashboard, calculations, and signals are active).
  2. It automatically generates your unique machine serial and exports it to your terminal's file folder:
    MQL5\Files\Rango_Request_Serial.txt
    
  3. Copy your Serial (format: RANGO-REQ-XXXX-XXXX-XXXX-XXXX).
  4. Send your serial to Telegram Support: @trading_world_support to receive your Activation Key (RANGO-ACT-...).
  5. Paste the key into the input parameter InpLicenseKey (or leave it in cache once validated).

πŸ“² Mobile Push Notifications Setup (MT5 App & MetaQuotes ID)

Rango EA supports instant push notifications delivered directly to the MetaTrader 5 Mobile App (iOS & Android) using the native MQL5 SendNotification engine. This ensures ultra-fast, direct alerts on your phone without requiring WebRequest configurations or Telegram bots.

Step 1: Find Your MetaQuotes ID on Mobile

  • Android: Open the MetaTrader 5 app βž” Tap the Menu (☰) βž” Select Messages (or Settings βž” Messages) βž” Note down your MetaQuotes ID (an 8-character alphanumeric string, e.g., 1A2B3C4D).
  • iOS (iPhone/iPad): Open the MetaTrader 5 app βž” Go to Settings βž” Select Chat and Messages βž” Find your My MetaQuotes ID at the bottom of the screen.

Step 2: Configure Push Notifications in Desktop MT5

  1. On your desktop MT5 terminal, open Tools βž” Options (or press Ctrl + O).
  2. Navigate to the Notifications tab.
  3. Check βœ… Enable Push Notifications.
  4. ⚠️ IMPORTANT (Anti-Spam Configuration):
    • UNCHECK ❌ Notifications from the local terminal
    • UNCHECK ❌ Notifications from the trade server

    πŸ’‘ Why uncheck these? If checked, the MT5 broker trade server will send a push notification for every single micro-action (every pending order placed, modified, or closed on your account). Unchecking these two options ensures you only receive Rango's clean, high-priority analytical signals (Trend & DCA alerts) without broker spam!

  5. Enter your MetaQuotes ID in the MetaQuotes ID field (multiple IDs can be separated by commas).
  6. Click the Test button. You should immediately receive a test notification on your mobile phone!
  7. Click OK to save the settings.

Step 3: Configure Notification Settings in Rango EA

In the EA's Input Settings:

  • EnableNotifications = true β€” Enable push notification alerts.
  • InpNotifyDCASignal = true β€” Receive real-time push alerts when quantitative metrics trigger a DCA READY state.
  • InpNotifyTrendSignal = true β€” Receive push alerts when a confirmed Trend Pullback Signal occurs.
  • InpMetaQuotesID = "..." β€” Enter your MetaQuotes ID (Optional reference / terminal linkage).

βš™οΈ Input Parameters Reference

General Settings

Parameter Default Description
InpLicenseKey "" Activation Key provided by support (Leave blank once cached).
InputMagicNumber 0 Unique EA identifier (0 = Auto-allocated based on symbol hash).
Language LANG_ENGLISH Dashboard & alert language (LANG_ENGLISH or LANG_VIETNAMESE).
InpShowDashboard true Display the real-time HUD dashboard on chart.
SinglePositionMode true Restrict EA to one active strategy cycle at a time.
ATR_Multiplier 1.0 Global ATR multiplier for dynamic distance calculations.
MaxSpreadPoints 0 Max allowed spread in points (0 = Disabled).

Risk Management

Parameter Default Description
RiskMode RISK_BY_VOLUME Risk sizing mode (RISK_BY_PERCENT, RISK_BY_AMOUNT, RISK_BY_VOLUME).
RiskDefaulMinimum 0.01 Base lot size or risk percentage.
RiskRewardRatio 1.0 Default Risk:Reward ratio for single-entry targets.
MaxVolumeFixed 0 Hard volume cap per single order (0 = Unlimited).

DCA Permission Engine Settings

Parameter Default Description
InpEnableDCAPermission true Master toggle for the DCA Permission Gate.
InpMinDRS_Ready 65.0 Minimum DCA Readiness Score required to authorize averaging ($0–100$).
InpMaxTDS_Allowed 65.0 Maximum Trend Danger Score allowed before DCA is blocked ($0–100$).
InpEnableAntiExpansion true Freeze DCA on sudden ATR expansion spikes ($ATR_5/ATR_{30} > 1.35$).
InpEnableDCAKillSwitch true Emergency stop freezing new orders if $TDS > 85$.
InpShowDCAArrows true Plot visual DCA authorization arrows on chart.
InpDCAArrowCooldownBars 3 Minimum bar spacing between consecutive DCA arrows.

Push Notifications & Alerts

Parameter Default Description
EnableNotifications true Master toggle for notifications.
InpNotifyDCASignal true Send mobile push alert when DCA state transitions to READY.
InpNotifyTrendSignal false Send mobile push alert on confirmed trend pullback signals.
InpMetaQuotesID "" MetaQuotes ID for direct push delivery to MT5 Mobile app.

πŸ“ˆ Recommended Trading Setup

Asset Class Recommended Symbols Optimal Timeframe Minimum Balance (0.01 lot) Recommended Leverage
Precious Metals XAUUSD (Gold) M1 / M5 $10,000+ 1:2000
Major Forex EURUSD, GBPUSD, USDJPY M5 / M15 $10,000+ 1:2000
Crypto BTCUSD, ETHUSD M5 / M15 $10,000+ 1:2000

πŸ’‘ Pro-Tip: For maximum stability during high-impact news events (CPI, NFP, FOMC), ensure InpEnableAntiExpansion = true and EnableNewsAlert = true.


❓ Frequently Asked Questions (FAQ)

Q1: Can I backtest Rango in the MT5 Strategy Tester for free?
Yes, 100%! Rango has a built-in Strategy Tester bypass that allows unrestricted backtesting, parameter optimization, and visual mode simulations without requiring an activation key.
Q2: Why does MT5 show "DLL imports must be enabled"?
Rango uses Windows standard system API (`kernel32.dll`) to read the local volume serial for hardware-locked activation. Please check "Allow DLL imports" in Tools βž” Options βž” Expert Advisors.
Q3: Where can I find my Machine Serial for live activation?
When you place Rango on any live/demo chart, check the file: MetaTrader 5 βž” MQL5 βž” Files βž” Rango_Request_Serial.txt. Alternatively, the serial is printed directly in the MT5 Experts Log tab.
Q4: Does Rango work on a VPS?
Yes! Rango is optimized for low CPU usage and works seamlessly on any Windows VPS (24/7 continuous operation recommended).
Q5: How do I receive push alerts on my phone without being spammed?
Find your MetaQuotes ID inside the MT5 Mobile app (Android or iOS), enter it in desktop MT5 under Tools βž” Options βž” Notifications, and check "Enable Push Notifications".

⚠️ Anti-Spam Tip: Make sure to UNCHECK "Notifications from the local terminal" and "Notifications from the trade server" so you only receive Rango's high-value strategy signals instead of an alert for every single trade transaction!

πŸ’¬ Support & Community

  • ✈️ Telegram Support & License Activation: @trading_world_support
  • πŸ“Ί YouTube Channel: Subscribe for tutorial videos, parameter optimization guides, and live trading sessions.
  • πŸ› Issue Tracker: If you find a bug or have a feature request, feel free to open an issue on this GitHub repository.

⚠️ Risk Disclaimer

Trading foreign exchange (Forex), contracts for difference (CFDs), metals, and cryptocurrencies carries a high level of risk and may not be suitable for all investors. The high degree of leverage can work against you as well as for you. Before deciding to trade or use automated trading systems, you should carefully consider your investment objectives, level of experience, and risk appetite.

Past performance is not indicative of future results. The software and materials provided in this repository are for educational and informational purposes. You are solely responsible for all trading decisions and financial outcomes on your live accounts.


Built with ❀️ by World Trading Lab. All Rights Reserved.

About

Rango is an EA MT5 for trading

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors