MT5 Multisymbol Expert Advisor Requirement: VWAP-based Trading Strategy on 1-Minute Timeframe

MQL5 专家

指定

Only apply if you have experience in MT5 Multisymbol Expert Advisor


# MT5 Multisymbol Expert Advisor Requirement: VWAP-based Trading Strategy on 1-Minute Timeframe


## Objective
Develop a Multisymbol Expert Advisor for MetaTrader 5 that utilizes the Volume Weighted Average Price (VWAP) indicator to make trading decisions based on 1-minute candle closings, with specified trading hours and clear time zone information. The EA will operate on the 1-minute timeframe and handle multiple financial instruments simultaneously, with only one trade allowed per symbol at any given time. It will support various symbol code formats, include a feature to ignore a specified number of initial VWAP crossings each day before taking real trades, allow users to specify trade direction preferences for each symbol, provide advanced breakeven options for risk management, use unique magic numbers for each symbol, offer flexible position sizing options, implement a multi-target profit-taking strategy, and include a "Close on Opposite" feature for quick exit based on VWAP crossings.

## Key Features

1. Multisymbol Capability
   - Accept input of up to 10 symbols
   - Support various financial instruments:
     a. Currencies (e.g., EURUSD, EURUSDm)
     b. Stocks
     c. Cryptocurrencies (e.g., BTCUSD, BTCUSDm)
     d. Commodities (e.g., XAUUSD, XAUUSDm for Gold)
     e. Indices (e.g., US30, US30m)
   - Handle different symbol code formats:
     a. Standard formats (e.g., EURUSD)
     b. Micro account formats (e.g., EURUSDm)
     c. Other broker-specific formats
   - Allow individual parameter settings for each symbol
   - Implement a robust symbol validation system to ensure compatibility with various brokers

2. VWAP Calculation
   - Calculate VWAP on a user-specified period (e.g., daily, weekly) using 1-minute data for each symbol
   - Use built-in MT5 functions or custom implementation if necessary

   - Handle different volume representations for various instrument types and symbol formats

Show the VWAP line on chart if its Display is selected as Yes.


3. Trading Logic
   - For each symbol:
     a. Implement a user-defined "Ignore first N crossings" parameter
     b. Reset the crossing counter daily at a user-specified time (e.g., at daily VWAP reset time)
     c. Count the number of times price closes above or below VWAP on the 1-minute timeframe
     d. Ignore real trade signals until the count exceeds the user-defined N value
     e. Log ignored trade signals in the log file, specifying the reason as "ignored due to initial crossing count"
     f. Implement a "Trade Direction" parameter with options:
        - "Buy and Sell" (default)
        - "Buy Only"
        - "Sell Only"
     g. After N crossings and based on the Trade Direction setting:
       - For "Buy and Sell":
         * Enter a long position when a 1-minute candle closes above the VWAP if no position is currently open
         * Enter a short position when a 1-minute candle closes below the VWAP if no position is currently open
       - For "Buy Only":
         * Only enter long positions when a 1-minute candle closes above the VWAP if no position is currently open
         * Ignore sell signals
       - For "Sell Only":
         * Only enter short positions when a 1-minute candle closes below the VWAP if no position is currently open
         * Ignore buy signals
     h. Implement a user-defined threshold for entry to avoid false signals (e.g., 0.1% above/below VWAP)
     i. Allow user to specify the number of confirmatory candles
     j. Ensure only one trade is open for each symbol at any given time
     k. Implement logic to close existing trade if a signal for the opposite direction is generated (only applicable in "Buy and Sell" mode)
     l. Use the symbol-specific magic number for all trade operations
     m. Implement a "Close on Opposite" feature:
        - If enabled, monitor for opposite VWAP crossings on active trades
        - For active Buy trades: Exit at market price if a 1-minute candle closes below the VWAP
        - For active Sell trades: Exit at market price if a 1-minute candle closes above the VWAP
        - This exit strategy takes precedence over other exit conditions (e.g., take profit, stop loss) if triggered

4. Magic Number Generation
   - Implement a system to generate a unique magic number for each symbol:
     a. The magic number should be consistent for each symbol across EA restarts
     b. Ensure the magic number is unique within the range allowed by MetaTrader 5 (0-2147483647)
     c. Consider using a combination of symbol characteristics (e.g., symbol name, trade direction mode) and a hash function to generate the magic number
     d. Store the generated magic numbers in a persistent manner (e.g., in a file) to ensure consistency across EA restarts
     e. Implement a collision detection and resolution mechanism in case of duplicate magic numbers
   - Use the generated magic number for all trade operations related to the specific symbol
   - Provide a function to retrieve the magic number for a given symbol

5. Risk Management
   - For each symbol:
     a. Set stop-loss orders at a user-defined distance from entry point
     b. Implement take-profit orders based on a risk-reward ratio or fixed value like pips or percentage
     c. Allow for trailing stop functionality
     d. Implement Breakeven options (user to choose one):
        - Set to Breakeven after X number of Pips in favorable direction
        - Set to Breakeven after X percentage gain from Entry in favorable direction
        - Set to Breakeven after achieving X Risk:Reward Ratio, where:
          * For Buy trades: Initial Risk = Entry Price - Lowest Low of last 3 candles before entry
          * For Sell trades: Initial Risk = Highest High of last 3 candles before entry - Entry Price
     e. Allow user to specify a buffer (in pips or percentage) when moving to breakeven to secure some profit
   - Implement the following global risk management inputs:
     a. Maximum risk per trade (% of account balance)
     b. Maximum daily loss (% of account balance)
     c. Maximum drawdown limit (% of account balance)
     d. Maximum daily trade count (total and per symbol)
   - Implement symbol-specific risk controls (e.g., maximum position size for each instrument)
   - Adjust risk calculations based on symbol-specific factors (e.g., contract size differences between standard and micro accounts)
   - Implement a multi-target profit-taking strategy for each symbol:
     a. Allow users to set three take profit levels (TP1, TP2, TP3)
     b. Provide options to set take profit levels in:
        - Pips
        - Percentage of entry price
        - Risk:Reward Ratio
     c. Implement the following profit-taking logic:
        - At TP1: Close 50% of the position and move stop loss to breakeven for the remaining quantity
        - At TP2: Close 50% of the remaining position (25% of original position)
        - At TP3: Close the remaining position (25% of original position)
   - Ensure proper handling of partial position closures and stop loss modifications
   - Use the symbol-specific magic number for all trade modification operations

6. Position Sizing
   - Implement two position sizing options for each symbol:
     a. Fixed lot size
     b. Percentage of account balance
   - For fixed lot size:
     a. Allow users to input a specific lot size (e.g., 0.01, 0.05, 0.1)
     b. Implement minimum and maximum lot size checks based on broker and symbol specifications
   - For percentage-based sizing:
     a. Allow users to input a percentage of account balance to risk per trade
     b. Calculate the position size based on the account balance, risk percentage, and symbol characteristics (e.g., contract size, current price, stop loss distance)
   - Implement a maximum position size limit for each symbol
   - Ensure position sizing calculations account for different symbol formats (e.g., standard vs. micro accounts)
   - Implement proper rounding of lot sizes to conform with broker-specific requirements
   - Provide warnings if the calculated position size exceeds user-defined or broker-imposed limits
   - Use the symbol-specific magic number for all trade operations related to position sizing
   - Ensure position sizing calculations can handle partial position closures as per the multi-target strategy
   - Implement proper rounding of lot sizes for partial closures to conform with broker-specific requirements

7. User Interface
   - Create input parameters for each symbol:
     - VWAP period (e.g., daily, weekly)
     - Entry threshold (e.g., 0.1% above/below VWAP)
     - Stop-loss distance
     - Number of confirmatory candles
     - "Ignore first N crossings" parameter
     - Daily reset time for the crossing counter
     - "Trade Direction" parameter with options: "Buy and Sell" (default), "Buy Only", "Sell Only"
     - Breakeven option selection and associated parameters
     - "Position Sizing Method" parameter with options: "Fixed Lot Size" and "Percentage of Balance"
     - Input field for Fixed Lot Size (when "Fixed Lot Size" method is selected)
     - Input field for Risk Percentage (when "Percentage of Balance" method is selected)
     - Input field for Maximum Position Size (in lots)
     - "Take Profit Mode" parameter with options: "Pips", "Percentage", "Risk:Reward Ratio"
     - Input fields for TP1, TP2, and TP3 levels
     - "Close on Opposite" parameter with options: True/False (default: False)
   - Add input fields for trading start time and end time for each symbol
   - Display current VWAP value and trading signals on the 1-minute chart for each symbol
   - Add input fields for all risk management parameters (global and symbol-specific)
   - Display GMT Offset on the chart in yellow font color
   - Provide a summary dashboard for all symbols being traded, including current open position (if any) for each symbol
   - Display the generated magic number for each symbol in the EA information panel
   - Provide an option to manually override the generated magic number for each symbol (with collision warning)
   - Display the current position size calculation for each symbol in the EA information panel
   - Provide real-time updates of potential position sizes based on current market conditions and user inputs
   - Display the current take profit levels calculation for each symbol in the EA information panel
   - Provide real-time updates of potential take profit levels based on current market conditions and user inputs

8. Performance Tracking
   - Log all trades for each symbol, including:
     - Entry price, exit prices (for each partial closure), profit/loss for each target
     - Reason for exit (TP1, TP2, TP3, Stop Loss, "Close on Opposite", or other)
     - The associated magic number
     - The position size method used
     - Take profit mode and levels used
   - Log all ignored trade signals due to the initial crossing count or trade direction restrictions
   - Calculate and display key performance metrics for each symbol and overall (e.g., win rate, average profit/loss)
   - Track and display risk management statistics (e.g., daily/weekly/monthly profit/loss, maximum drawdown) per symbol and overall
   - Include time-based analysis of trade performance for each symbol
   - Ensure accurate performance calculation across different symbol formats, position sizing methods, and take profit strategies
   - Provide statistics on ignored trades vs. taken trades, categorized by reason (initial crossing count or trade direction)
   - Analyze and report on the performance of different trade direction settings, breakeven options, position sizing methods, take profit strategies, and the "Close on Opposite" feature
   - Track the frequency and effectiveness of breakeven executions and partial closures for each take profit level
   - Implement a feature to filter and analyze trades based on magic numbers, position sizing methods, and take profit levels reached

9. Compatibility and Optimization
   - Ensure compatibility with various types of financial instruments and symbol formats on the 1-minute timeframe
   - Optimize code for efficient execution in MT5 environment, considering multiple symbols and high-frequency data
   - Implement efficient memory management to handle multiple symbols simultaneously

## Additional Considerations
- Implement proper error handling and logging for each symbol, including handling of unknown symbol formats, logging of ignored trades, trade direction restrictions, breakeven executions, magic number generation/usage, position sizing calculations, and partial position closures
- Add comments and documentation for easy maintenance, explaining all features including the multi-target profit-taking strategy and "Close on Opposite" feature
- Test thoroughly on historical 1-minute data for all supported instrument types and symbol formats in a demo environment before live trading, including various scenarios for all features, magic number consistency, position sizing methods, multi-target profit-taking, and the "Close on Opposite" feature
- Implement a mechanism to gracefully handle and recover from unexpected errors or market conditions for any symbol, ensuring magic numbers remain consistent, position sizing is appropriate, and partial closures are executed correctly
- Include an option to send notifications (email or push) for important events for each symbol (e.g., trade open, partial closures at TP1/TP2, final closure at TP3, moved to breakeven, "Close on Opposite" triggered), including the associated magic number and position sizes
- Ensure the EA can handle high-frequency updates of 1-minute candles for multiple symbols without performance issues, even with the additional logic for magic number management, position sizing calculations, multi-target profit-taking, and the "Close on Opposite" feature
- Implement a smooth transition between trading and non-trading hours for each symbol, ensuring all counters, calculations, magic numbers, position sizes, and take profit levels remain consistent
- Consider time zone handling for trading hours and daily reset time, allowing users to specify their local time or using server time, without affecting magic number consistency, position sizing, or take profit calculations
- Ensure the GMT Offset display is updated correctly during daylight saving time changes
- Provide an option to toggle trading on/off for individual symbols without losing magic number associations, position sizing settings, or take profit configurations
- Optimize memory usage and processing speed for continuous operation on 1-minute data across multiple symbols, including efficient handling of all risk management calculations, magic number operations, position sizing methods, multi-target profit-taking logic, and the "Close on Opposite" feature
- Implement safeguards against potential issues related to high-frequency trading across multiple instruments, ensuring proper use of magic numbers, appropriate position sizing, correct execution of partial closures, and timely execution of the "Close on Opposite" feature
- Ensure proper handling of different pip values and contract sizes across various instrument types and symbol formats, especially for breakeven calculations, position sizing, and take profit level calculations, while maintaining magic number consistency
- Implement a mechanism to handle symbol-specific events (e.g., dividends for stocks, rollovers for futures) without disrupting magic number associations, position sizing, or take profit levels
- Include a feature to manually close part or all of an open trade for any symbol and prevent new trades for a user-specified cool-down period, properly handling the associated magic number and remaining position size
- Develop a system to automatically detect and adapt to different symbol formats provided by various brokers while ensuring consistent magic number generation, appropriate position sizing, and accurate take profit calculations
- Implement a configuration file or setup wizard to help users correctly input symbols, risk management parameters, position sizing preferences, and take profit strategies based on their specific broker and account type
- Provide an option to visualize the ignored crossings, trade direction restrictions, breakeven levels, trades associated with specific magic numbers, position sizes, and take profit levels on the chart for analysis purposes
- Allow for easy switching between trade direction modes, breakeven options, position sizing methods, take profit strategies, and the "Close on Opposite" feature without restarting the EA or losing magic number associations
- Implement a feature to backtest different breakeven strategies, position sizing methods, take profit strategies, and the "Close on Opposite" feature to help users optimize their settings, using consistent magic numbers for accurate trade tracking
- Provide a utility to audit and verify the uniqueness and consistency of magic numbers across all symbols, as well as the appropriateness of position sizes and take profit levels
- Implement a safety mechanism to prevent excessively large positions or unrealistic take profit levels due to calculation errors or unexpected market conditions
- Ensure proper handling of scenarios where the market gaps beyond take profit levels or triggers the "Close on Opposite" condition, implementing a priority system for executing these exits in the correct order

反馈

1
开发者 1
等级
(9)
项目
19
16%
仲裁
3
67% / 0%
逾期
0
空闲
2
开发者 2
等级
(309)
项目
556
35%
仲裁
79
32% / 42%
逾期
202
36%
工作中
3
开发者 3
等级
(7)
项目
12
17%
仲裁
12
17% / 50%
逾期
3
25%
工作中
发布者: 22 文章
4
开发者 4
等级
(270)
项目
552
49%
仲裁
57
40% / 37%
逾期
227
41%
工作中
5
开发者 5
等级
项目
1
0%
仲裁
4
0% / 50%
逾期
0
工作中
相似订单
Creating mt5 bot that detects 1. Break of Structure 2. then Create trend line from starting point to BOS to Last reverse tap 3. Create RSI and MACD Opposite signal from last two higher highs 4. After that point EMA cross 34/18 and then SELL with stop loss on top 5. Profit target on Fib 43.4 level I have more testing strategies if this is working well, and cost is good I will give 5 more orders after first. Need in 3
"Grid Nexus EA" Building mt5 1- EA will manage the grid trading method using the algorithm I have defined. 2- EA will operate in two different modes: with indicators and without indicators. 3- It will include a Modify method and a Recovery method for grid management. 4- The chart template will include information panels and buttons, and I will provide this template along with the source code. 5- It will be
Hello, I am looking for an experienced MT5 (MetaTrader 5) developer to create a simple and reliable Forex trading EA. Broker: Skyriss Platform: MT5 Requirements: • EA should work only on Forex pairs (EURUSD, GBPUSD, USDJPY, USDCHF) • Around 1–2 trades per day is enough • Proper risk management with Stop Loss (SL) and Take Profit (TP) • Prefer low-risk trading with 0.01–0.03 lot depending on balance • No martingale or
Título: Necesito ayuda para usar MetaTrader 4 build 1443 para que funcione mi robot Descripción: Estoy buscando un desarrollador o experto en MetaTrader 4 que pueda ayudarme a utilizar la versión antigua de MT4 build 1443, ya que mi robot de trading solo funciona correctamente en esa versión. Actualmente cuando instalo MetaTrader 4 se actualiza automáticamente a versiones más nuevas (1457 / 1460), y mi robot deja de
I am looking for an experienced quant developer, data engineer, or market data specialist who can help me obtain long historical NASDAQ data for systematic trading research. The goal is to retrieve a clean, continuous dataset covering 2011 to 2026 (minimum) for the NASDAQ index. The dataset will be used for algorithmic backtesting, so data quality and continuity are critical. My trading system is already built and
Descripción del trabajo: Estoy buscando un desarrollador con experiencia en programación de Expert Advisors para MetaTrader 4. Tenía un robot de trading que utilizaba anteriormente, pero actualmente no funciona debido a un problema de licencia. Necesito un desarrollador que pueda crear un robot nuevo lo más parecido posible al que yo tenía, utilizando la misma lógica y parámetros de trading. El trabajo sería: •
Lucky Mpedi 50+ USD
To help with simple requirements and strategy to trade in metotrade 5 and to win or earn much money so that i can live better live. I hope i can get the robot for helping to trade
Job Title: Expert Pine Script → MQL5 Conversion (Exact Strategy Replication Required) Project Overview I am looking for a highly experienced MQL5 developer to convert my TradingView Pine Script strategy into a MetaTrader 5 Expert Advisor (EA) . This must be a 100% exact conversion of the strategy logic. The goal is to have matching trading behaviour and nearly identical backtest results between TradingView and MT5
Hi coders, I am looking for profitable ea which can generate 4-5% a month with stable drawdown ✅ Demo version for testing (few days is fine) ⚠️ Backtest alone is NOT enough 💰 I am ready to pay a strong price for the right professional-grade Thank you, and I look forward to reviewing serious offers
Key Requirements: Source Account: Connect to a Master account using Investor (Read-only) Password. Destination Account: Execute trades on a Live Slave account with full trading access. Currency Focus: The system must handle Currency Pairs accurately, including symbol mapping (e.g., EURUSD to EURUSD.m) between different brokers. Stealth Features: Remove/Disable all trade comments. Assign custom Magic Numbers to the

项目信息

预算
30+ USD