Lavoro terminato
Specifiche
📌 FINAL EA DEVELOPMENT INSTRUCTIONS – Fully Automated, Plug-and-Play EA
🚀 EA Name: "TrendScalper v1.0"
This EA is a fully automated, high-performance, trend-based intraday trading system for XAUUSD (Gold). It requires no manual input and automatically manages risk, trade size, and drawdown control.
📌 1️⃣ EA Trading Logic
✅ Trading Session & Time Management
- Trades only during London & New York sessions
- Start Trading: 1 hour after London open (09:00 AM UTC)
- Stop Trading: 2 hours before New York close (8:00 PM UTC)
- All open trades close automatically 30 minutes before market close (to prevent overnight swaps).
🔹 User Option: Trade_Sessions = True/False (Enable/Disable session-based trading)
✅ Trade Entry Conditions (Auto-Detection of Opportunities)
The EA will only open trades when the following conditions are met:
📌 Buy Entry Conditions
- Trend Confirmation:
- Price is above both EMA 50 and EMA 200.
- EMA 50 must be above EMA 200 (bullish trend).
- Momentum Confirmation:
- Stochastic (8,3,3) %K is below 20 (oversold).
- Volatility Confirmation:
- ATR (14) > 1.0 (ensures market is not slow).
- Entry Trigger:
- Price breaks the previous high of the last 5 candles.
📌 Sell Entry Conditions
- Trend Confirmation:
- Price is below both EMA 50 and EMA 200.
- EMA 50 must be below EMA 200 (bearish trend).
- Momentum Confirmation:
- Stochastic (8,3,3) %K is above 80 (overbought).
- Volatility Confirmation:
- ATR (14) > 1.0 (ensures market is not slow).
- Entry Trigger:
- Price breaks the previous low of the last 5 candles.
📌 2️⃣ Stop-Loss & Take-Profit (Auto-Calculated)
The EA will automatically set Stop-Loss (SL) and Take-Profit (TP) based on ATR.
✅ Stop-Loss (SL)
- SL = 1.5x ATR(14) (Dynamic, adjusts per market condition).
- Example: If ATR(14) = 20 pips, SL = 30 pips.
✅ Take-Profit (TP)
- TP = 2x ATR(14) (Risk-to-Reward Ratio = 1:2).
- Example: If ATR(14) = 20 pips, TP = 40 pips.
📌 3️⃣ Automatic Risk & Lot Sizing (Set & Forget)
✅ Trade Size is Based on Account Balance
- The EA automatically calculates lot size based on the account balance:
- Risk per trade = 2% of account equity
- Example:
- If equity = $10,000, risk per trade = $200.
- If SL = 30 pips, lot size is calculated accordingly.
✅ Dynamic Risk Control
- If equity drops below 75% of starting balance, risk reduces to 1.5% per trade.
- If equity grows by 50%, risk increases to 2.5% per trade.
🔹 User Option: Dynamic_Risk = True/False (Enable/Disable dynamic risk adjustment)
📌 4️⃣ Maximum Drawdown Protection (User Option)
✅ Option to Stop Trading or Continue at 30% Drawdown
- If drawdown reaches 30%, the EA will:
- Option 1 (Default): Stop opening new trades and close all open trades.
- Option 2: Continue trading normally.
🔹 User Option: Stop_At_30%_DD = True/False
📌 5️⃣ On-Screen Display (Real-Time Info)
🔹 Position: Top Left Corner of the chart.
🔹 On-Screen Information (Live Updates):
📌 EA Name & Version: "TrendScalper v1.0"
📌 Account Equity: $XXXXX
📌 Current Risk per Trade: X%
📌 Current ATR Value: X Pips
📌 Stop-Loss & Take-Profit: SL: X Pips | TP: X Pips
📌 Max Drawdown Limit: X% (Stop Trading at 30%)
🔹 User Option: Show_Onscreen_Info = True/False
📌 6️⃣ Advanced Optional Features (User-Configurable)
✅ Auto-Adjustable Risk Mode (Risk-On / Risk-Off Toggle)
- If 3 consecutive wins, risk increases to 3% per trade.
- If 3 consecutive losses, risk decreases to 1% per trade.
🔹 User Option: Auto_Adjust_Risk = True/False
✅ News Filter (Avoid Trading Before High-Impact Events)
- EA pauses trading 30 minutes before & after high-impact news.
- Uses Forex Factory API or MT4/MT5 built-in calendar.
🔹 User Option: Avoid_News = True/False
✅ Profit-Lock Feature (Daily Profit Target Control)
- EA stops trading for the day after hitting a set profit target.
- Example:
- Daily Profit Target: 5%
- Once reached, EA stops trading for the rest of the day.
🔹 User Option: Daily_Profit_Target = X%
✅ Multi-Pair Capability (Optional)
- By default, the EA trades XAUUSD.
- If enabled, it can trade US30, NAS100, GBPJPY.
🔹 User Option: Trade_Multiple_Pairs = True/False
📌 7️⃣ Basic Licensing System (Anti-Piracy)
✅ License System Features
- License Key Validation
- Account Lock (Pre-approved account numbers only)
- Expiration Date (Trial/Subscripton Support)
🔹 User Option: Use_License = True/False
📌 8️⃣ Additional Protections
✅ Spread & Slippage Protection
- Skip trade execution if spread > X pips
- Adjustable max slippage in settings
✅ Stealth Stop-Loss & Take-Profit
- EA hides SL & TP from brokers, managing them internally.
✅ Break-Even & Partial Take-Profit
- Move SL to breakeven at 50% of TP.
- Close 50% of trade at 1:1 risk-reward, let the rest run.