Gold Grid Hedge EA

Specification

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

Responded

1
Developer 1
Rating
(393)
Projects
549
40%
Arbitration
30
57% / 3%
Overdue
57
10%
Working
Published: 11 codes
2
Developer 2
Rating
(9)
Projects
13
8%
Arbitration
3
33% / 67%
Overdue
1
8%
Working
3
Developer 3
Rating
(15)
Projects
19
16%
Arbitration
5
40% / 40%
Overdue
0
Free
4
Developer 4
Rating
(50)
Projects
64
20%
Arbitration
11
27% / 55%
Overdue
5
8%
Free
5
Developer 5
Rating
(162)
Projects
287
34%
Arbitration
18
22% / 61%
Overdue
42
15%
Working
6
Developer 6
Rating
(142)
Projects
151
41%
Arbitration
3
33% / 33%
Overdue
1
1%
Working
7
Developer 7
Rating
(509)
Projects
977
74%
Arbitration
27
19% / 67%
Overdue
101
10%
Free
Published: 1 article, 6 codes
8
Developer 8
Rating
(17)
Projects
23
39%
Arbitration
6
33% / 50%
Overdue
0
Free
9
Developer 9
Rating
(1)
Projects
1
100%
Arbitration
0
Overdue
0
Free
10
Developer 10
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Free
11
Developer 11
Rating
(18)
Projects
26
0%
Arbitration
4
0% / 100%
Overdue
5
19%
Free
12
Developer 12
Rating
(6)
Projects
6
0%
Arbitration
2
50% / 0%
Overdue
1
17%
Free
13
Developer 13
Rating
(2)
Projects
3
0%
Arbitration
0
Overdue
0
Free
14
Developer 14
Rating
(1)
Projects
0
0%
Arbitration
5
0% / 80%
Overdue
0
Free
15
Developer 15
Rating
(16)
Projects
18
28%
Arbitration
0
Overdue
3
17%
Free
16
Developer 16
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Free
17
Developer 17
Rating
(296)
Projects
475
40%
Arbitration
105
40% / 24%
Overdue
80
17%
Busy
Published: 2 codes
18
Developer 18
Rating
(16)
Projects
20
0%
Arbitration
10
0% / 80%
Overdue
6
30%
Free
19
Developer 19
Rating
(77)
Projects
243
74%
Arbitration
7
100% / 0%
Overdue
1
0%
Free
Published: 1 article
20
Developer 20
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Working
21
Developer 21
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Free
22
Developer 22
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Free
23
Developer 23
Rating
(1)
Projects
0
0%
Arbitration
1
0% / 100%
Overdue
0
Free
24
Developer 24
Rating
(271)
Projects
553
50%
Arbitration
57
40% / 37%
Overdue
227
41%
Working
25
Developer 25
Rating
(390)
Projects
416
30%
Arbitration
74
19% / 72%
Overdue
52
13%
Working
26
Developer 26
Rating
(10)
Projects
14
43%
Arbitration
0
Overdue
3
21%
Free
27
Developer 27
Rating
(4)
Projects
4
25%
Arbitration
2
0% / 100%
Overdue
0
Free
28
Developer 28
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Free
Similar orders
Hi, I hope you doing Greate, Let me share details , so the original EA already working but you can check and verify everything fine.First you verify that all original EA features are working correctly then add a user dashboard showing the number of detected zones, buy sell both none status, and an on off button. also ensure mitigated zones disappear properly and that trades follow the zone rules, and integrate the
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
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
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
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
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
The strategy records the highest and lowest prices within a specified duration (default 15 minutes) after the New York market opens, forming the opening range. Post-Formation Breakout: When the price breaks above or below the opening range after its formation, it may indicate the direction of the day’s price movement. Trend Confirmation: The strategy uses two EMAs (default 20-period and 50-period) as trend filters to
Tengo una estrategia basada en divergencia para el oro sobre todo en tf m1 Basado en divergencia con stoch .. confirmando la entrada con ciertos parameteos de entrada Es mejor conversarlo para dar mejor los detalles Cuando entrar, porque o todas las divergencias se debe tomar para entrar en compras o ventas He adjuntado un ejemplo La confrmacion más exacta es el cruce de esos parámetros de stoch edebajo de level de
I already have a fully developed MT5 Expert Advisor with all required prop firm features, including: Risk management Daily loss & max drawdown limits Spread & slippage filters News filter Trade management system The EA structure is complete. 👉 What I need is a professional developer to replace ONLY the entry logic with a high-quality, rule-based trading strategy. 🚨 STRICT REQUIREMENT (READ CAREFULLY): I am NOT

Project information

Budget
30 - 50 USD
Deadline
from 1 to 5 day(s)