# xauusd mt5 algo bot

> Deploy and configure an XAUUSD MetaTrader 5 bot using HMA filters, UT Bot signals, and ORB logic.

xauusd mt5 algo bot is a paid AI agent skill on Agensi by Mohd Zaid, in Trading & Investing. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: $3 (one-time purchase)
- Creator: [Mohd Zaid](https://www.agensi.io/creators/gold-trader)
- Category: [Trading & Investing](https://www.agensi.io/skills/trading-investing)
- Version: 1.1
- Last updated: 2026-11-26
- Security: scan passed (2026-11-22); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/xauusd-mt5-algo-bot
- Tags: trading, python, metatrader5, mql5, algo-trading

## About this skill

Deploy an automated trading strategy for XAUUSD on MetaTrader 5 using a multi-factor signal approach. This skill manages the configuration, explanation, and setup of a bot that combines UT Bot trend signals, Hull Moving Average (HMA) filtering, and Opening Range Breakout (ORB) logic. It provides both a Python-based implementation for external execution and a native MQL5 Expert Advisor for internal terminal use.

### What it does
- **Multi-factor signals**: Combines UT Bot ATR trailing stops with HMA direction and ORB time windows.
- **Automated execution**: Handles order entry, position flipping, and exit logic for XAUUSD.
- **Risk management**: Implements ATR-based stop-loss and take-profit levels with configurable multipliers.
- **Dual implementation**: Provides the strategy in both Python (via official MT5 library) and native MQL5 code.
- **Backtest configuration**: Restricts signals to specific date ranges for historical performance testing.

### How it works
1. **Environment setup**: Install the `MetaTrader5` package and configure broker server time for ORB windows.
2. **Configuration**: Define `LOT_SIZE`, `MAGIC_NUMBER`, and ATR multipliers in the script or EA inputs.
3. **Execution**: Run the Python bot to interface with the terminal or compile the MQL5 Expert Advisor.
4. **Monitoring**: The bot polls for new candles, calculates indicators, and manages open positions.

### Frameworks & tools
Python 3.9+, MetaTrader 5 Terminal, official `MetaTrader5` library, `pandas`, and MQL5.

### Why this beats prompting it yourself
Writing reliable execution logic for MetaTrader requires specific boilerplate for position tracking and signal reversals. This skill provides a tested structure for handling magic numbers and ATR-based volatility stops that won't fail during live market polling.

### Use cases
- Deploying a trend-following gold strategy on MT5 demo accounts.
- Converting Python-based trading logic into native MQL5 Expert Advisors.
- Testing the impact of Opening Range Breakout windows on HMA-filtered trends.
- Automating XAUUSD trades based on ATR-trailing stop signals.

### Known limitations
Requires a Windows environment to run the MetaTrader 5 terminal. Does not support other brokers or platforms like MT4 or TradingView.

## Requires

- Python
- Git

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the xauusd mt5 algo bot skill from Agensi" and describe your task.
3. Buy it on the listing or let your agent ask you first; your agent then loads it from Agensi when it needs it. Every paid skill has a money-back guarantee: https://www.agensi.io/docs/money-back-guarantee

## Frequently asked questions

### What specific files or code formats are included with this skill?

The skill includes a pre-configured Python trading script using the official MT5 library and a native MQL5 Expert Advisor (EA), allowing you to choose between external control or internal terminal execution.

### Can I use this bot for assets other than XAUUSD?

While the logic is optimized for XAUUSD (Gold), the parameters like ATR multipliers and HMA periods are fully configurable, allowing you to adapt the strategy to other volatile pairs.

### What are the technical requirements to run the Python version of the bot?

You will need a Windows environment to host the MetaTrader 5 terminal, along with Python 3.9+ and the official 'MetaTrader5' and 'pandas' libraries installed.

### How does the Opening Range Breakout (ORB) logic help with my trading?

The bot uses ORB logic to restrict trading to specific time windows, ensuring you only enter positions during periods of high liquidity while avoiding choppy, low-volume sessions.

### Is this skill compatible with MetaTrader 4 or TradingView?

No, this skill is purpose-built for the MetaTrader 5 (MT5) ecosystem and is not backwards compatible with MT4 or cross-compatible with TradingView.

### Does the skill handle trade exits and risk management automatically?

The bot includes built-in risk management that automatically calculates stop-loss and take-profit levels based on ATR volatility, alongside 'Magic Number' tracking to prevent interference with other strategies.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
