명시
EA Specification (Updated with Risk Control Options)
1. General Concept
The Expert Advisor (EA) should open trades at the close of a candlestick, based on:
-
The market bias (user-defined: Buy or Sell only).
-
The timeframe selected by the trader.
The EA should include a dashboard panel on the chart that allows the trader to interact with and control the EA’s behavior.
2. Dashboard / User Interface
The on-chart dashboard should include:
-
Market Bias Selection – Buy Only / Sell Only.
-
Global TP and SL – in pips or price levels.
-
Number of Positions per Signal – how many trades to open per valid signal.
-
Floating PnL Display – real-time sum of EA trades.
-
Close All Trades Button – closes all EA trades instantly.
3. Trading Logic
-
Check conditions at candle close.
-
If bias = Buy → open defined number of Buy trades.
-
If bias = Sell → open defined number of Sell trades.
-
Each trade uses Global TP/SL (unless overridden by risk-control options).
-
No opposite trades allowed.
4. Inputs / Parameters
-
Lot size (fixed).
-
Global Take Profit (pips/price).
-
Global Stop Loss (pips/price).
-
Number of positions per signal (integer).
-
Magic Number (to identify EA trades).
-
Maximum number of trades allowed (optional risk limit).
5. Trade Management
-
Each trade uses the configured TP/SL.
-
“Close All” button closes all EA trades (Magic Number filter).
-
Floating PnL displayed on dashboard in real-time.
6. Additional Risk-Control Options (Optional Enhancements)
The EA can include the following advanced trade management options for handling multiple positions:
-
Staggered Take Profit (Partial Exit)
-
Allow the trader to set different TP levels for multiple trades opened in the same signal.
-
Example: If 3 Buy trades are opened, TP1 = 20 pips, TP2 = 40 pips, TP3 = 60 pips.
-
Helps secure profits gradually while leaving positions to run.
-
-
Break-Even Function
-
After X pips in profit (user-defined), automatically move SL to entry price (or entry + buffer).
-
Applies to all open positions or individually.
-
-
Trailing Stop
-
Option to enable a trailing stop (user can define step and distance).
-
This replaces fixed SL once activated.
-
-
Equity-Based Exit
-
A global condition to close all trades if account profit/loss reaches a certain threshold.
-
Example: Close all when floating profit ≥ $100, or when floating loss ≥ $50.
-
-
Max Drawdown Protection
-
Prevent new trades from being opened if floating loss exceeds a user-defined percentage of account balance/equity.
-
7. Additional Notes
-
Dashboard updates dynamically.
-
No automatic bias detection — trader sets Buy/Sell manually.
-
EA must work on both MQL4 and MQL5 (or be specified for one platform).