Overview
This prompt aims to create a high-frequency trading bot for gold on the MT5 platform, benefiting traders seeking automated, aggressive scalping strategies. Programmers and developers will gain insights into implementing advanced trading algorithms and risk management techniques.
Prompt Overview
Purpose: This trading bot aims to maximize short-term profits through aggressive high-frequency scalping of gold (XAUUSD).
Audience: Designed for traders seeking automated solutions in the high-frequency trading space, particularly in the gold market.
Distinctive Feature: It utilizes RSI, MACD, and moving averages for precise entry and exit points, ensuring rapid trade execution.
Outcome: The bot enhances trading efficiency while implementing robust risk management, making it suitable for live trading environments.
Quick Specs
- Media: Text
- Use case: Generation
- Industry: Consulting (Management, Strategy), Fintech & Digital Banking, Robotics & Automation
- Techniques: Role/Persona Prompting, Self-Critique / Reflection, Structured Output
- Models: Claude 3.5 Sonnet, Gemini 2.0 Flash, GPT-4o, Llama 3.1 70B
- Estimated time: 5-10 minutes
- Skill level: Beginner
Variables to Fill
No inputs required — just copy and use the prompt.
Example Variables Block
No example values needed for this prompt.
The Prompt
Create a highly automated, aggressive high-frequency trading bot for the MetaTrader 5 (MT5) platform using MQL5, focused on trading gold (XAUUSD). The bot must rapidly execute trades to maximize short-term profits by employing technical indicators—specifically RSI, MACD, and moving averages—to identify precise automatic entry and exit points.
**Key Requirements:**
– Implement an aggressive scalping strategy optimized for gold’s unique market conditions, combining:
– RSI
– MACD
– Moving averages
– Include dynamic, real-time risk management features:
– Automatic trailing stops that adjust as the trade moves favorably
– Automatic exit rules that minimize losses or lock in profits
– Adaptive take profit levels that respond to current market volatility
– Support customizable input parameters for:
– Trading aggressiveness
– Risk tolerance
– Position sizing
– Indicator threshold levels
– Provide an optional Martingale strategy toggle
– Include daily profit and loss target inputs for manual risk management cuts
– Exclude any grid system trading or hedging; strictly support live, real scalping with aggressive profit targeting
– Continuously monitor gold market data to identify every possible trading opportunity and dynamically manage open positions
**# Steps**
1. Define a high-frequency scalping strategy tailored to gold using:
– RSI
– MACD
– Moving averages
2. Develop the full MQL5 code implementing this strategy with:
– Efficient indicator calculations
– Trade execution flows
3. Implement advanced risk management features:
– Dynamic trailing stops
– Adaptive take profits
– Volatility-sensitive position sizing
4. Include inputs allowing users to customize all crucial trading and risk parameters, as well as toggles for:
– Martingale
– Profit/loss targets
5. Rigorously test and optimize the bot for robustness and responsiveness under various gold market scenarios in MT5’s strategy tester
**# Output Format**
Provide:
6. The complete MQL5 source code for the trading bot focused on gold (XAUUSD). The code must be extensively commented, explaining:
– How RSI, MACD, and moving averages are calculated and interpreted for entries and exits
– Entry and exit logic in detail
– Risk management techniques including trailing stops and adaptive take profits
– Usage and effects of all customizable parameters and toggles
7. A detailed supplementary summary document covering:
– Overall trading strategy rationale tailored to gold
– Role of each technical indicator in trade decisions
– Detailed explanation of risk management processes and safeguards
– Instructions on tuning parameters for aggressiveness and risk tolerance
– How the optional Martingale method and daily profit/loss targets function, and how to enable or disable them
**# Notes**
– Ensure compliance with MetaTrader 5 standards and trade execution best practices
– Prioritize ultra-fast responsiveness while preserving risk controls aligned with aggressive scalping
– Explicitly avoid grid systems and hedging techniques
– The final bot must be production-ready, suitable for live aggressive scalping on gold, maximizing short-term profits while limiting downside through strict automation safeguards.
Screenshot Examples
How to Use This Prompt
- Copy the prompt provided above.
- Paste it into your coding environment or editor.
- Follow the outlined steps to develop the trading bot.
- Implement the MQL5 code with required features and indicators.
- Test the bot in MetaTrader 5’s strategy tester.
- Review and optimize based on test results and performance.
Tips for Best Results
- Define Strategy: Create a scalping strategy using RSI, MACD, and moving averages tailored for gold’s volatility.
- Implement Risk Management: Use dynamic trailing stops and adaptive take profits to secure gains and minimize losses.
- Customizable Parameters: Allow users to adjust trading aggressiveness, risk tolerance, and indicator thresholds for personalized trading.
- Test and Optimize: Rigorously test the bot in MT5’s strategy tester to ensure robustness under various market conditions.
FAQ
- What is the purpose of the trading bot for MT5?
To automate aggressive high-frequency trading on gold (XAUUSD) for maximizing short-term profits. - Which technical indicators are used in the bot?
The bot employs RSI, MACD, and moving averages to determine entry and exit points. - How does the bot manage risk dynamically?
It uses automatic trailing stops, adaptive take profits, and minimizes losses through exit rules. - Can users customize trading parameters?
Yes, users can adjust trading aggressiveness, risk tolerance, position sizing, and indicator thresholds.
Compliance and Best Practices
- Best Practice: Review AI output for accuracy and relevance before use.
- Privacy: Avoid sharing personal, financial, or confidential data in prompts.
- Platform Policy: Your use of AI tools must comply with their terms and your local laws.
Revision History
- Version 1.0 (February 2026): Initial release.


