Gold Grid Hedge EA

MQL5 专家 外汇 策略优化

指定

Step-by-Step Explanation of the Complete Trading EA
PHASE 1: INITIALIZATION
Step 1 - EA Startup
text
When EA is attached to chart:
1. Check if it's a new trading day (after 00:00 server time)
2. Reset daily profit counter to $0
3. Record initial account balance for drawdown calculation
4. Initialize Fibonacci sequence: [0.01, 0.02, 0.03, 0.05, 0.08, 0.13, 0.21...]
5. Set current state to "STEP_A_START"
Step 2 - Place Initial Orders
text
Current Price: 2400.00 (example)
1. Calculate BUY_STOP price = Ask + 0.400 = 2400.400
2. Calculate SELL_STOP price = Bid - 0.400 = 2399.600
3. Place BUY_STOP order: 0.01 lot @ 2400.400
4. Place SELL_STOP order: 0.01 lot @ 2399.600
5. Store "initial_price" = 2400.000
PHASE 2: ORDER TRIGGER & STEP PROGRESSION
Step 3 - First Trigger (BUY_STOP hits)
text
Price rises to 2400.400:
1. BUY_STOP triggers → Open BUY position: 0.01 lot @ 2400.400
2. Cancel pending SELL_STOP order at 2399.600
3. Place new SELL_STOP: 0.02 lot @ 2399.600
4. State changes to "STEP_A_ACTIVE"
5. Record: first_buy_entry = 2400.400
Step 4 - Step B Activation
text
Price falls to 2399.600:
1. SELL_STOP (0.02 lot) triggers → Open SELL position: 0.02 lot @ 2399.600
2. Place new SELL_STOP: 0.03 lot @ 2401.200
   Calculation: first_buy_entry (2400.400) + 0.800 = 2401.200
3. Close first BUY (0.01 lot) at market price (2401.200)
4. State changes to "STEP_B_ACTIVE"
5. Fibonacci index advances to next level
Step 5 - Step C Activation
text
Price rises to 2401.200:
1. SELL_STOP (0.03 lot) triggers → Open SELL: 0.03 lot @ 2401.200
2. Place new SELL_STOP: 0.05 lot @ 2402.000
   Calculation: last SELL entry (2401.200) + 0.800 = 2402.000
3. Place opposite BUY_STOP: 0.01 lot @ 2402.000
4. State changes to "STEP_C_ACTIVE"
Step 6 - Step D Activation
text
Price rises to 2402.000:
1. SELL_STOP (0.05 lot) triggers → Open SELL: 0.05 lot @ 2402.000
2. Place new SELL_STOP: 0.08 lot @ 2402.800
   Calculation: last SELL entry (2402.000) + 0.800 = 2402.800
3. Place opposite BUY_STOP: 0.02 lot @ 2402.800
4. Close previous BUY (0.01 lot) at market price
5. State changes to "STEP_D_ACTIVE"
Step 7 - Step E Activation
text
Price rises to 2402.800:
1. SELL_STOP (0.08 lot) triggers → Open SELL: 0.08 lot @ 2402.800
2. Place new SELL_STOP: 0.13 lot @ 2403.600
   Calculation: last SELL entry (2402.800) + 0.800 = 2403.600
3. Place opposite BUY_STOP: 0.03 lot @ 2403.600
4. Close previous BUY (0.02 lot) at market price
5. State changes to "STEP_E_ACTIVE"
Step 8 - Continue Pattern
text
This continues following Fibonacci sequence:
Step F: SELL 0.13 lot, BUY 0.05 lot, close BUY 0.03 lot
Step G: SELL 0.21 lot, BUY 0.08 lot, close BUY 0.05 lot
Step H: SELL 0.34 lot, BUY 0.13 lot, close BUY 0.08 lot
... and so on
PHASE 3: EXIT CONDITIONS
Step 9 - Continuous Monitoring (Every Tick)
A. Calculate Current Metrics:
text
1. Total open lots = Sum of all SELL lots + Sum of all BUY lots
2. Net position = SELL lots - BUY lots (could be negative if BUY > SELL)
3. Current equity profit = Total unrealized P/L in dollars
4. Daily profit = Sum of all closed trade profits today
5. Drawdown % = ((Balance - Equity) / Balance) × 100
B. Check Exit Conditions (in priority order):
Condition 1: Emergency Stop (Highest Priority)

text
If ANY open position reaches MaxLotSize (67.65 lots):
1. Immediately close ALL trades
2. Delete ALL pending orders
3. Send alert: "EMERGENCY STOP - Max lot size reached"
4. Stop EA completely (requires manual restart)
Condition 2: Daily Profit Target

text
If DailyProfit >= $50.00:
1. Close ALL open trades
2. Delete ALL pending orders  
3. Send alert: "Daily target reached: $50.00"
4. Stop trading until next day (00:00 server time)
Condition 3: Maximum Drawdown

text
If DrawdownPercent >= 30%:
1. Close ALL open trades
2. Delete ALL pending orders
3. Send alert: "Max drawdown reached: 30%"
4. Stop EA completely (requires manual restart)
Condition 4: Dynamic Profit Target with Trailing

text
Check based on Total Lots:

Case A: Small Positions (0.01 - 0.10 lots)
1. If equity profit >= $0.20:
   - Start trailing stop
   - Close ALL opposite direction (losing) trades immediately
   - Keep profitable trades open
   - Trail: If profit drops $0.10 from peak → Close ALL remaining trades
   - Restart cycle from Step 1

Case B: Medium Positions (0.10 - 0.30 lots)  
1. If equity profit >= $3.00:
   - Start trailing stop
   - Close ALL opposite direction trades
   - Trail: If profit drops $0.50 from peak → Close ALL
   - Restart cycle

Case C: Large Positions (> 0.30 lots)
1. If equity profit >= $5.00:
   - Start trailing stop  
   - Close ALL opposite direction trades
   - Trail: If profit drops $1.00 from peak → Close ALL
   - Restart cycle
C. Determine "Opposite Direction" for Trailing:
text
Example: If net position is SELL (more sell volume than buy):
- SELL trades are "main direction" (likely profitable if price rose)
- BUY trades are "opposite direction" (likely losing if price rose)
- Close ALL BUY trades first when trailing activates
PHASE 4: CYCLE RESTART
Step 10 - After Any Exit Condition Triggers
text
1. Close ALL open positions (market order)
2. Delete ALL pending orders
3. Reset Fibonacci index to beginning
4. Reset state to "STEP_A_START"
5. Wait for next tick
6. Place new initial orders:
   BUY_STOP = Ask + 0.400
   SELL_STOP = Bid - 0.400
7. Begin new cycle
PHASE 5: SAFETY & MONITORING
Step 11 - Continuous Safety Checks
text
Every tick, check:
1. Margin requirements: Can we place next Fibonacci lot?
2. Server connection: Are we connected?
3. Trade context: Is trading allowed?
4. Price validity: Are prices normal?
5. Order limits: Not exceeding broker's max orders
Step 12 - Logging & Reporting
text
1. Log every trade with: Time, Type, Lot, Price, Profit
2. Log every state change
3. Log every exit condition trigger
4. Daily summary at 23:59
5. Drawdown warnings at 20%, 25%, 29%
VISUAL FLOWCHART:
text
[START]
    ↓
[Place Initial Orders]
    ↓
[Wait for Trigger] → [Monitor Exit Conditions]
    ↓
[Order Triggers] → [Check Daily Profit] → If ≥$50 → Close All & Stop
    ↓
[Advance Fibonacci Step] → [Check Drawdown] → If ≥30% → Close All & Stop  
    ↓
[Place Next Orders] → [Check Equity Profit] → If in bracket → Start Trailing
    ↓
[Close Opposite Trades (TP)] → [Trail Profitable Trades]
    ↓
[Return to Wait] → [If trail broken] → Close All & Restart
KEY POINTS TO REMEMBER:
No Stop Losses - Only profit targets and risk limits

Hedged System - Always has both BUY and SELL positions

Fibonacci Growth - Lots increase rapidly (0.01 → 0.02 → 0.03 → 0.05...)

Grid Spacing - Always 0.800 between same-direction entries

Opposite Trade Close - BUY trades close one step after entry

Multiple Exit Paths - 4 different ways to exit (emergency, daily, drawdown, profit)

Automatic Restart - After most exits, system restarts fresh

反馈

1
开发者 1
等级
(393)
项目
549
40%
仲裁
30
57% / 3%
逾期
57
10%
工作中
发布者: 11 代码
2
开发者 2
等级
(9)
项目
13
8%
仲裁
3
33% / 67%
逾期
1
8%
工作中
3
开发者 3
等级
(15)
项目
19
16%
仲裁
5
40% / 40%
逾期
0
空闲
4
开发者 4
等级
(50)
项目
64
20%
仲裁
11
27% / 55%
逾期
5
8%
空闲
5
开发者 5
等级
(162)
项目
287
34%
仲裁
18
22% / 61%
逾期
42
15%
工作中
6
开发者 6
等级
(142)
项目
151
41%
仲裁
3
33% / 33%
逾期
1
1%
工作中
7
开发者 7
等级
(509)
项目
977
74%
仲裁
27
19% / 67%
逾期
101
10%
空闲
发布者: 1 文章, 6 代码
8
开发者 8
等级
(17)
项目
23
39%
仲裁
6
33% / 50%
逾期
0
空闲
9
开发者 9
等级
(1)
项目
1
100%
仲裁
0
逾期
0
空闲
10
开发者 10
等级
项目
0
0%
仲裁
0
逾期
0
空闲
11
开发者 11
等级
(18)
项目
26
0%
仲裁
4
0% / 100%
逾期
5
19%
空闲
12
开发者 12
等级
(6)
项目
6
0%
仲裁
2
50% / 0%
逾期
1
17%
空闲
13
开发者 13
等级
(2)
项目
3
0%
仲裁
0
逾期
0
空闲
14
开发者 14
等级
(1)
项目
0
0%
仲裁
5
0% / 80%
逾期
0
空闲
15
开发者 15
等级
(16)
项目
18
28%
仲裁
0
逾期
3
17%
空闲
16
开发者 16
等级
项目
0
0%
仲裁
0
逾期
0
空闲
17
开发者 17
等级
(296)
项目
475
40%
仲裁
105
40% / 24%
逾期
80
17%
繁忙
发布者: 2 代码
18
开发者 18
等级
(16)
项目
20
0%
仲裁
10
0% / 80%
逾期
6
30%
空闲
19
开发者 19
等级
(77)
项目
243
74%
仲裁
7
100% / 0%
逾期
1
0%
空闲
发布者: 1 文章
20
开发者 20
等级
项目
0
0%
仲裁
0
逾期
0
工作中
21
开发者 21
等级
项目
0
0%
仲裁
0
逾期
0
空闲
22
开发者 22
等级
项目
0
0%
仲裁
0
逾期
0
空闲
23
开发者 23
等级
(1)
项目
0
0%
仲裁
1
0% / 100%
逾期
0
空闲
24
开发者 24
等级
(271)
项目
553
50%
仲裁
57
40% / 37%
逾期
227
41%
工作中
25
开发者 25
等级
(390)
项目
416
30%
仲裁
74
19% / 72%
逾期
52
13%
工作中
26
开发者 26
等级
(10)
项目
14
43%
仲裁
0
逾期
3
21%
空闲
27
开发者 27
等级
(4)
项目
4
25%
仲裁
2
0% / 100%
逾期
0
空闲
28
开发者 28
等级
项目
0
0%
仲裁
0
逾期
0
空闲
相似订单
Criei um Robô para a venda alta precisão que automatiza a estratégia de correção média de Larry Williams. Possui filtros de tendência seletiva, controle de lote por risco percentual e execução rápida. Compatível com contas Hedge e Netting. Configuração simples e otimizada para mercados de alta volatilidade. *55(16) 993786056
SMC ORDER BLOCK 30 - 60 USD
I want already build FULLY AUTOMATED order block MT5 XAUUSD HTF H4 ENTRY LTF M15 - Show result on live account. m15 ob entry in the direction of h4 ob bias the developper to provide source code in the end
Project Title: Custom XAUUSD Support & Resistance Indicator Platform Required: MT5 preferred. If possible, also provide TradingView Pine Script version later. Main Goal: I want a custom indicator made specifically for XAUUSD (Gold) only. The indicator should automatically detect and draw strong support and resistance zones where price has a high probability of reacting, rejecting, or reversing. It must update
I need a boom-and-crash MT5 robot that is very accurate for opening trades just before the spike happens. It should use M1 timeframe It should have options for changing lot size, number of trades to open, stop loss and take profit in points If the spike happens and it makes some profit, it should automatically close all trades. If the spike happens and the spike is not in profits, the trades can remain open waiting
1. IF price forms: - Higher highs + higher lows → TREND = BUY - Lower highs + lower lows → TREND = SELL ELSE → NO TRADE 2. IF: - Trend = BUY - Price retraces to support zone - Bullish engulfing candle forms - TDI green crosses above red (optional) THEN: - Execute BUY 3. IF: - Trend = SELL - Price retraces to resistance - Bearish engulfing forms - TDI confirms THEN: - Execute SELL 4. Risk per trade = 1% of account Lot
I need a high frequency trading robot for gold in one or 5 minute timeframe the robot should have spread filter where it should only open trades below a set spread should have news filter to allow trading during fundal news or not the robot should have input in number of minutes to close all open trades and remove pending orders before fundamental news as part of news filter. It should also have the number of minutes
Hello, I am looking for a professional trading system including: 1- Trading Bot (Expert Advisor): - Good profit performance - High security and strong risk management - Works efficiently during high market volatility (news and strong movements) - Works on all pairs (Forex + Gold) 2- Signal Indicator: - Provides clear Buy and Sell signals - Includes Take Profit and Stop Loss - No repaint (signals must not change or
This is yakubu Jnr trading bots I create the trading robots to help my self and others traders to be successful please you can join my live trading bots or subscribe to my trading robots
Apply with a screen of your work . Symbol Specific Logic . Live Chart Optimization Check the Core logic . [back tests as well] Change points to pips . Create buffer for the zone

项目信息

预算
30 - 50 USD
截止日期
 1  5 天