İş Gereklilikleri
Overview:
The objective is to develop an Expert Advisor (EA) that facilitates automated hedging and scalping strategies between two separate account terminals on the Meta Trader 5 platform. This EA will maximize performance through high-speed execution (less than 20 milliseconds), ensuring profitability by working within predefined settings and customizable parameters. It must be able to analyse, execute, and manage trades across diverse instruments such as cryptocurrencies, commodities, and indices.
EA Strategy Requirements
1. Hedging Functionality
The EA will:
-
Execute hedging positions across two separate account terminals by opening complementary BUY and SELL orders:
-
Account A may hold 2 BUY and 1 SELL position.
-
Account B may hold 2 SELL and 1 BUY position.
-
-
Support trading across a single instrument at a time, ensuring optimal system performance and reduced lag.
-
Automatically terminate if either:
-
The accounts used are swapped/changed.
-
The instrument being traded is altered mid-operation.
-
-
Lay the foundation for the Scalping Process, ensuring the Hedging Process is fully executed before moving forward.
2. Scalping Execution
The EA will:
-
Trigger scalping operations immediately after hedging positions turn profitable (accounting for spreads, commissions, and fees):
-
Detect profitable positions via EA indicator and execute trades in under 20 milliseconds to secure profits.
-
Avoid closing any order unless it is confirmed to be in profit.
-
-
Operate across both accounts simultaneously:
-
For Account A:
-
If 2 BUY orders are confirmed profitable, these positions are closed while waiting for the SELL order to turn profitable.
-
-
For Account B:
-
The same mechanism applies, with the EA scalping based on current profit confirmations for BUY or SELL positions.
-
-
-
Ensure high-speed processing for both opening and closing trades.
3. Generation Logic (Trade Cycles)
-
Each EA attachment creates a Generation (Gen) of trading activities:
-
Displayed on the chart as Gen 1, Gen 2, etc.
-
Automatically cycles every customizable duration (default: 600 seconds).
-
-
Ensures proper separation and organization of trading cycles.
4. Direct Server Communication
-
Implements direct socket connections between the two Meta Trader terminals to:
-
Synchronize data and ensure seamless communication between Account A and Account B.
-
-
Server ports will be customizable within the settings panel. (e.g., Server Port = 30303,30302)
5. Strategy & Indicator Integration
-
Offers sandbox mode for trading without predefined strategies (Generations run continuously).
-
Provides customizable settings to load up to three strategies, such as:
-
Bollinger Bands, MACD, or RSI.
-
Users can upload and configure their preferred strategies within the EA.
-
-
Ensures indicator-based scalping, adhering strictly to profit confirmation before order execution.
6. Lot Size, Leverage, and Compounding
-
Permits customization of BUY/SELL lot sizes, ensuring synchronized settings across both accounts.
-
Supports all leverage levels.
-
Includes an optional compounding feature:
-
When enabled, profits are reinvested into subsequent trades.
-
Technical Specifications
Execution Speed
-
All trade actions (open/close) must be processed within 20 milliseconds or less.
Customizable Parameters
-
Generation Duration: Default 600 seconds, fully adjustable.
-
Indicator Preferences: Select, adjust, or upload custom strategies.
-
Lot Size and Leverage Settings: User-defined configurations.
Error Handling & Termination
-
Immediate EA shutdown under the following conditions:
-
Account terminals or trading instruments are modified.
-
Connection errors disrupt server communication.
-
Platform Compatibility
-
Fully compatible with Meta Trader 5.
-
Functional across multiple asset classes, including:
-
Cryptocurrencies, commodities, and indices.
-
Summary of Key Features
✔ Hedging Between Two Accounts – Simultaneously opens complementary positions across two terminals.
✔ High-Speed Scalping – Executes trades within 20 milliseconds upon profit confirmation.
✔ Generational Logic – Tracks and organizes trading cycles for better management.
✔ Customizable Strategy Integration – Load custom indicators or run in Sandbox Mode.
✔ Direct Terminal Communication – Utilizes server ports for seamless two-account synchronization.
✔ Dynamic Lot Sizing & Compounding – Adjustable to fit user preferences and reinvest profits.
Notes for Developers: The EA should be built with high performance and minimal latency in mind, ensuring smooth execution even during volatile market conditions. Please assess the complexity and cost of development based on the provided specifications and communicate any potential limitations or additional requirements.