Aggressive MT5 HFT Scalper
Prompt
Create a highly automated, aggressive high-frequency trading bot for the MetaTrader 5 (MT5) platform using MQL5 that rapidly executes trades to maximize short-term profits by utilizing RSI, MACD, and moving averages for precise automatic entry and exit points. The bot must incorporate dynamic, real-time risk management features, including automatic trailing stops, automatic exits designed to minimize losses or lock in profits, and adaptive take profit levels that adjust according to current market volatility. Support customizable input parameters to control trading aggressiveness, risk tolerance, position sizing, and indicator thresholds. Include an optional Martingale strategy toggle and manual daily profit and loss targets, but explicitly exclude any grid system trading or hedging; the bot should focus exclusively on live, real scalping with aggressive profit targeting. The bot should continuously monitor market data to identify every viable trading opportunity and dynamically adjust open positions accordingly. # Steps 1. Define an aggressive high-frequency scalping strategy based on RSI, MACD, and moving averages specifically optimized for MT5. 2. Structure and develop the MQL5 code to implement the strategy, compute all technical indicators, generate trading signals, and execute trades with ultra-fast responsiveness. 3. Integrate robust risk management systems including dynamic auto-exit conditions, trailing stop-loss, and adaptive position sizing based on observed market volatility. 4. Conduct comprehensive testing using the MT5 strategy tester across diverse market conditions to ensure stable, reliable performance. 5. Optimize input parameters to finely tune the balance between aggressiveness and managing drawdowns. # Output Format Deliver the complete MQL5 source code of the trading bot, extensively commented with clear explanations of: - How RSI, MACD, and moving averages drive entry and exit signals. - The exact logic behind each trading and risk management feature including trailing stops, adaptive take profits, and automatic exits. - Configuration details for input parameters governing aggression levels, risk tolerance, position sizing, and indicator thresholds. - The implementation and usage of optional features like Martingale and daily profit/loss targets. Additionally, provide a detailed summary document covering: - An overview of the trading strategy and rationale for its choices. - The role and influence of each technical indicator within the strategy. - The mechanisms and rationale behind the risk management approaches. - Guidance on adjusting parameters to customize aggressiveness and risk tolerance. - Instructions on enabling and safely using optional features such as Martingale and daily profit/loss limits. # Notes Ensure full compliance with MetaTrader 5 standards, including trade execution protections and error handling. Emphasize ultra-fast trade responsiveness to market changes while maintaining firm risk controls aligned with an aggressive scalping philosophy. Exclude any grid system or hedging strategies to maintain a pure high-frequency scalping approach optimized for live trading and short-term profit maximization with automated safeguards to limit excessive losses.
Related Coding Prompts
Write Code
As a seasoned programmer, your task is to write code in [programming language] to [perform action]. The code should be efficient, well-structured, and optimized for performance. Make sure to follow best practices and industry standards while implementing the necessary algorithms and logic to achieve the desired functionality. Test the code thoroughly to ensure it functions as intended and meets all requirements. Additionally, document the code properly for future reference and maintenance.
Debug Code
Act as a seasoned programmer with over 20 years of commercial experience. Analyze the provided [piece of code] that is causing a specific [error]. Your task involves diagnosing the root cause of the error, understanding the context and functionality intended by the code, and proposing a solution to fix the issue. Your analysis should include a step-by-step walkthrough of the code, identification of any bugs or logical mistakes, and a detailed explanation of how to resolve them. Additionally, suggest any improvements or optimizations to enhance the performance, readability, or maintainability of the code based on your extensive experience. Ensure that your solution adheres to best practices in software development and is compatible with the current development environment where the code is being executed.
Do Code Review
As a seasoned programmer with over 20 years of commercial experience, your task is to perform a comprehensive code review on the provided [piece of code]. Your review should meticulously evaluate the code's efficiency, readability, and maintainability. You are expected to identify any potential bugs, security vulnerabilities, or performance issues and suggest specific improvements or optimizations. Additionally, assess the code's adherence to industry standards and best practices. Your feedback should be constructive and detailed, offering clear explanations and recommendations for changes. Where applicable, provide examples or references to support your suggestions. Your goal is to ensure that the code not only functions as intended but also meets high standards of quality and can be easily managed and scaled in the future. This review is an opportunity to mentor and guide less experienced developers, so your insights should be both educational and actionable.