- Home
- Skills
- Trading & Investing
- xauusd mt5 algo bot
xauusd mt5 algo bot
by Mohd Zaid
Deploy and configure an XAUUSD MetaTrader 5 bot using HMA filters, UT Bot signals, and ORB logic.
$3
xauusd mt5 algo bot
Example session with this skill installed
Configure the Python XAUUSD bot with a 0.05 lot size, a 20.0 ATR stop-loss multiplier, and an HMA period of 50. Provide the updated configuration code.
- Read your context and instructions
- Compiled the xauusd mt5 algo
I have updated the configuration parameters for the Python implementation of the XAUUSD bot. These changes increase the HMA period for a smoother trend filter and widen the stop-loss to 20x ATR to allow for more market noise.
Updated Python Configuration
# scripts/mt5_bot.py - Configuration Section
# Instrument settings
SYMBOL = "XAUUSD"
TIMEFRAME = mt5.TIMEFRAME_M1
# Trade execution settings
LOT_SIZE = 0.05
MAGIC_NUMBER = 123456
SL_ATR_MULTIPLIER = 20.0 # Increased from 10.0
TP_ATR_MULTIPLIER = 200.0
# Indicator settings
UT_KEY_VALUE = 2.0
UT_ATR_PERIOD = 1
HMA_PERIOD = 50 # Increased from 31 for slower trend detection
# Opening Range Breakout (Broker Server Time)
ORB_START = "10:10"
ORB_END = "10:15"
# Operational settings
POLL_SECONDS = 30
USE_CUSTOM_PERIOD = False
Next steps
- Verify Server Time: Check your MT5 Terminal Market Watch time to ensure the
ORB_STARTmatches your broker's session opening. - Demo Test: Run the script using
python scripts/mt5_bot.pyon a demo account to observe the wider stop-loss behavior. - MQL5 Sync: If you are using the Expert Advisor version, remember to update the
InpLotSize,InpSLAtrMultiplier, andInpHMAPeriodinputs in the MT5 UI to match these settings.
Connects securely to your tools. The creator never sees your data.
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
- Environment setup: Install the
MetaTrader5package and configure broker server time for ORB windows. - Configuration: Define
LOT_SIZE,MAGIC_NUMBER, and ATR multipliers in the script or EA inputs. - Execution: Run the Python bot to interface with the terminal or compile the MQL5 Expert Advisor.
- 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.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 13 days ago
- Software
Python
Git
Permissions
What's inside
Frequently Asked Questions
New in Trading & Investing
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Trading & Investing.