📌 MT5 Expert Advisor (EA) Requirements – Forex + Crypto 24/7 Trading Bot
🔧 Strategy Components
✅ Indicators Used
EMA Band System – 6 EMAs Total
EMA Set 1 (EMA1):
EMA1.1 = Period 75, Price: HIGH
EMA1.2 = Period 75, Price: CLOSE
EMA1.3 = Period 75, Price: LOW
EMA Set 2 (EMA2):
EMA2.1 = Period 155, Price: HIGH
EMA2.2 = Period 155, Price: CLOSE
EMA2.3 = Period 155, Price: LOW
Logic:
BUY: EMA1 > EMA2 (all 3)
SELL: EMA1 < EMA2 (all 3)
All individual EMA combinations should be toggleable in inputs.
RSI Settings (Relative Strength Index)
Period: 31
Source: CLOSE
Mode Options:
Overbought/Oversold (Default: 70/30)
Cross above level (e.g., 55) for BUY
Cross below level (e.g., 45) for SELL
Mode selection should be customizable.
ATR – Average True Range
Default settings (input adjustable)
Used for volatility filtering or SL/TP calculation.
Range Comparison
For detecting sideways market — compare current range with last 'N' candle ranges.
If sideways, avoid entry (toggleable).
VWAP
Session VWAP / Weekly VWAP — user can choose mode.
Can be used as an entry confirmation filter.
Pivot High/Low
User input: Example 10, 10
Used for SL and Trailing Stop Logic.
🎯 Trade Entry Logic
🟢 BUY Setup
Condition 1: Price closes above EMA1 HIGH
Condition 2: Next candle crosses above previous candle's HIGH
Additional Filters (if enabled): RSI confirms buy (based on selected mode)
VWAP confirmation (above VWAP or below, depending on logic)ATR/range/vwap/pivot confirmation
If all active filters pass → Execute Buy Order
Plot SL/TP lines as per inputs
🔴 SELL Setup
Condition 1: Price closes below EMA1 LOW
Condition 2: Next candle crosses below previous candle's LOW
Additional Filters (if enabled):
RSI confirms sell (based on selected mode)
VWAP confirmation ATR/range/pivot confirmation
If all active filters pass → Execute Sell Order
Plot SL/TP lines as per inputs
⚙️ Risk Management & Order Settings
Lot Size – Fixed (manual input)
Stop Loss (SL) – In Pips or $ Or based on Pivot High (for sell) / Pivot Low (for buy) (toggleable)
Take Profit (TP) – TP1, TP2, TP3 levels (toggleable) In Pips or $
Should allow different lot splits per TP
Break-Even Option – Activate once price reaches defined pips/$
Move SL to entry + buffer
Trailing Stop Option – Based on either: Pivot High/Low OR EMA1 HIGH (for sell) /EMA1 LOW (for buy)+Buffer in points
Time Filter –
Option 1: Start Time1 – End Time1
Option 2: Start Time2 – End Time2
Option 3: Full Day
Range Filter – If enabled, avoid trading during tight/sideways markets
VWAP Filter – If enabled, trade only when price is aligned with VWAP
Account Number Lock - Input allowed account number — EA runs only on this. Else, display "Account not authorized"
Expiration Date (Hardcoded)
EA should have expiration date check written in code (not input setting)
Will manually change date and recompile