Specifiche
I need a fully automated Expert Advisor (EA) for MetaTrader 4 or MetaTrader 5.
Strategy Overview:
-
Trading Instrument: User adjustable (input parameter). Default can be EUR/USD.
-
Trade Time: Every day at exactly 11:00 AM (broker server time).
-
Position Size: Fixed lot size (NOT percentage-based). Default = 0.01 lot. This must be an adjustable input parameter.
Trading Rules (Step by Step):
Day 1 (Initial Trade):
-
Open either a BUY or SELL position (manually decided or random start – I will provide initial direction).
-
Use the fixed lot size (e.g., 0.01 lot) for this and every trade.
-
No stop-loss, no take-profit in the entire strategy.
From Day 2 onwards (Loop Logic):
-
Every day at 11:00 AM (broker time) → Check the current open position(s).
-
CASE A – The position(s) are in PROFIT (floating profit > 0):
-
Close ALL open positions immediately.
-
Then, on the same day at 11:00 AM (right after closing), open a NEW trade in the OPPOSITE direction (if long was closed, open short and vice versa).
-
Position size: The same fixed lot size (e.g., 0.01 lot).
-
-
CASE B – The position(s) are in LOSS (floating loss < 0):
-
DO NOT close the losing position(s).
-
ADD a new position in the EXACT SAME direction as the existing losing position(s).
-
Position size for the new addition: The same fixed lot size (e.g., another 0.01 lot).
-
DO NOT close anything on that day.
-
Repeat this loop every day.
-
Profit day → Close all → Reverse direction → Open new fixed lot trade.
-
Loss day → Keep existing → Add another fixed lot trade in same direction.
Important Clarifications:
-
No stop-loss, no take-profit anywhere. Trades are only closed when a profit day occurs (Case A).
-
No maximum number of consecutive loss days initially – but please add a safety parameter where I can set a maximum number of consecutive same-direction additions (e.g., stop after 5 losses and close all).
-
Lot size: Fixed lot (e.g., 0.01). Must be adjustable by me via EA inputs.
-
Symbol (Parite): Must be adjustable by me via EA inputs. Default EUR/USD, but I can change to GBP/USD, AUD/USD, etc.
-
Swap/commission/spread: Ignore for strategy logic – EA should only act on floating P&L.
Broker Time Zone: I will set the correct GMT offset in EA inputs. Please add an input parameter for "Trade Hour" (default = 11:00) so I can adjust if needed.
Input Parameters (must be user adjustable):
-
Trade hour (default: 11:00)
-
Fixed lot size (default: 0.01)
-
Trading symbol (default: "EUR/USD")
-
Maximum consecutive same-direction additions (default: 0 = unlimited, but I want a number input like 5)
-
Magic number (for identifying EA's orders)
Testing Requirement:
-
Provide backtest report (2024–2025) on EUR/USD, H1 timeframe, using 0.01 fixed lot, showing all trades according to the logic above.
Delivery Format:
-
Source code (.mq4 or .mq5) + compiled .ex4/.ex5 file.
-
Clear comments in code.
Budget: Open to offers. Please quote your price and delivery time.
I will provide the initial direction (BUY or SELL) before first run.
Thank you.