— Create XAUUSD Grid EA for MT5 (Full Source Code + Running Setup)

指定

🔹 COMPLETE GRID + HEDGE EA SPECIFICATION (XAUUSD)


1️⃣ GENERAL OVERVIEW


This EA is a non-directional grid strategy designed mainly for sideways and slow-trending markets.

The goal is consistent small profits and survival, not fast aggressive gains.

Symbol: XAUUSD

Timeframe: Any (logic is price-based)

Directional bias: NONE

Focus: Grid logic + controlled hedging

First priority: Execution accuracy and grid integrity



2️⃣ GRID PARAMETERS

Grid Distance: User-defined (example: 100 points / $1 / $10)

All grid actions happen strictly at exact grid prices

EA must handle:

Fast moves

Grid skips

Pending order fills

Partial positions correctly



3️⃣ START OF EVERY CYCLE (FIRST GRID)


At the start of every new cycle:


Actions (Market Orders ONLY):

BUY 0.03 (market)

SELL 0.01 (market)


⚠️ Important:

First grid must ALWAYS use market orders

No pending orders on first grid

This SELL is special (see SELL rules below)



4️⃣ DOWN MOVE LOGIC (PRICE MOVES DOWN ONE GRID)


Example:

Price moves from 2000 → 1900


Step 1: SELL Handling

Close SELL 0.01 in PROFIT


Step 2: Rebuild Grid at SAME LEVEL


At the exact price where SELL profit was closed:

BUY 0.03

SELL 0.01


Execution Rules:

BUY should preferably be BUY LIMIT at grid price

SELL can be market or valid pending

Grid must be rebuilt immediately

No missing orders allowed



5️⃣ UP MOVE LOGIC (PRICE MOVES UP ONE GRID)


Example:

Price moves from 1900 → 2000


Step 1: Normalize BUY

Close BUY 0.02

Keep BUY 0.01 as runner


Step 2: SELL Handling

Close SELL 0.01

SELL loss must be covered by BUY 0.02 profit

BUY + SELL must close together


Step 3: Open New SELL

Open SELL 0.01 at this upper grid

BUY runner remains active


Resulting Position:

BUY = 0.01

SELL = 0.01



6️⃣ DOWN MOVE AFTER UP (RUNNER GRID RESTORATION – VERY IMPORTANT)


Situation:


There is only BUY 0.01 runner active at a grid (after UP move).


Rule:


If price moves DOWN one grid to that same level:


At the EXACT GRID PRICE where BUY 0.01 exists:

Add BUY 0.02 (BUY LIMIT)

Add SELL 0.01


Final Position at that Grid:

BUY = 0.03

SELL = 0.01


➡️ This restores a normal grid structure.


⚠️ This step must never be skipped, even in fast markets.



7️⃣ SIDEWAYS MARKET BEHAVIOR


When price moves up and down inside the grid:

DOWN → SELL closes in profit → rebuild grid

UP → BUY 0.02 + SELL 0.01 close together → runner logic

EA may close entire cycle early if profit target is hit



8️⃣ PROFIT EXIT RULE (GLOBAL)


At ANY time:

If overall floating profit ≥ user-defined value (example $5):

Close ALL open positions

Delete ALL pending orders

Immediately start a new cycle

BUY 0.03 (market)

SELL 0.01 (market)


⚠️ Grid completion is NOT required.



9️⃣ SELL RULES (VERY IMPORTANT)


FIRST GRID SELL (Special Rule)

SELL must NOT close in loss

SELL can close ONLY IF:

SELL itself is in profit

OR overall profit condition is met


SUBSEQUENT GRID SELLS

SELL may close:

In profit

OR in loss if BUY profit covers it



🔟 PENDING ORDER RULES

First grid: NO pending orders

All BUY adds (except first grid):

Must use BUY LIMIT

SELL pending orders allowed only where broker rules permit

EA must:

Detect unfilled pending orders

Avoid false “BUY exists” checks due to 0.01 runner

Recover missing orders if price jumps



1️⃣1️⃣ CRITICAL EXECUTION REQUIREMENTS

No duplicate BUYs at same price

No missing BUY 0.02 after runner

No SELL left open unintentionally

Pending orders must be tracked separately from positions

EA must work correctly in:

Fast moves

Slippage

Partial fills

Requotes



1️⃣2️⃣ WHAT DEVELOPER MUST DELIVER

✔ Fully working source code (MQ5)

✔ Compiled EX5 EA

✔ Clean logs for:

Grid creation

BUY/SELL close

Runner restore

✔ Backtest-ready

✔ No repaint / no indicator dependency



🔹 FINAL NOTE FOR DEVELOPERS


This EA is logic-sensitive, not indicator-based.

Execution accuracy at grid levels is more important than optimization.


If BUY / SELL pairing is missed even once, the strategy breaks.

反馈

1
开发者 1
等级
(237)
项目
298
28%
仲裁
33
24% / 61%
逾期
9
3%
工作中
2
开发者 2
等级
(98)
项目
106
28%
仲裁
3
33% / 33%
逾期
2
2%
工作中
3
开发者 3
等级
(55)
项目
80
23%
仲裁
24
13% / 58%
逾期
7
9%
工作中
4
开发者 4
等级
(433)
项目
686
34%
仲裁
32
72% / 9%
逾期
22
3%
空闲
5
开发者 5
等级
(27)
项目
29
7%
仲裁
11
9% / 64%
逾期
0
繁忙
6
开发者 6
等级
(48)
项目
61
21%
仲裁
11
27% / 55%
逾期
5
8%
空闲
7
开发者 7
等级
项目
0
0%
仲裁
0
逾期
0
工作中
8
开发者 8
等级
(452)
项目
786
48%
仲裁
70
16% / 53%
逾期
139
18%
工作中
9
开发者 9
等级
(10)
项目
11
55%
仲裁
0
逾期
1
9%
工作中
发布者: 1 代码
10
开发者 10
等级
(159)
项目
284
35%
仲裁
17
24% / 59%
逾期
42
15%
已载入
11
开发者 11
等级
(1)
项目
1
0%
仲裁
0
逾期
0
空闲
12
开发者 12
等级
(304)
项目
544
35%
仲裁
77
31% / 42%
逾期
196
36%
已载入
相似订单
I have an issue with my ninja script and i would like you to help me straighten things I wanted to create an indicator and i have the source code already but i am getting compiling errors on my NinjaTrader And i tried fixing the error it still same I sent 3 images here for you to understand the errors and i would like to ask if you can help me fix it so i can go ahead and compile my source code. Thanks
Good day, I would like to build an automated trading system for Ninjatrader using 2 MACD, a Supertrend, and a moving average indicator. I want the option to adjust the indicator settings, the ability to trade at three different times, and the option to receive alerts. I want to get an idea of what that will cost me. It will enter trades on all blue take one contract out at a fixed point, move the stop to break even
I need an MQL5 indicator that identifies reversals without repainting or placing signals with an offset. The goal is to minimize lag and reduce whipsaw trades. Desired results are similar to the attached image. Requirements: - No repainting - No signal offset - Emphasis on reducing lag - MQL5 compatible - Clear, concise code If you have the expertise to create a reliable, high-performance indicator, let's discuss
I'm looking for a skilled trader/developer to share a proven scalping strategy on M1-M5 timeframes without using Martingale, Grid trading, or Hedge. Requirements: - Minimum trade duration: 2 minutes - Lot size: <20 - Proof of skill: Provide MT4/MT5 trade history report (PDF/HTML) - No High Frequency Trades - GMT+1 timezone, flexible hours - Price negotiable, performance-based compensation possible If you're a
Good day, I would like to build an automated trading system for Ninjatrader using 2 MACD, a Supertrend, and a moving average indicator. I want the option to adjust the indicator settings, the ability to trade at three different times, and the option to receive alerts. I want to get an idea of what that will cost me. It will enter trades on all blue take one contract out at a fixed point, move the stop to break even
I have an indicator i need automated i use it manually and it plots arrows. Can you automate it for my Ninjatrader8? Do you need to see file? Expert Ninjatrader Developer can Bid for this project
Hi! I need a trading bot/robot to automate my trades. I don't need much complicated bot. I want it to enter, exit trade and can do this in matter of second or multiple times in a second. Should be able to adjust, put SL/TP in the same menu. Would appreciate your ideas! Please write to me before anything else
Hi, im not looking into developing a new EA. I am looking into purchasing an existing EA that can deliver such results like: mq5 source, 4‑year backtest (2022‑2025) report, equity curve, trade list, strategy description, and 1‑month demo access. Please without concrete prove of experience functioning existing EA working perfectly and as contained on my description, then we can't strike a deal. Thank you
Title: Ultimate Quantum EA V1.01 | Dynamic Hedge Recovery System Description: Professional automated trading system designed for high-precision execution and advanced risk management. Key Features: Dynamic Hedge Recovery: Automatically manages losing trades by opening calculated hedge positions (2x-3x) to exit in total profit. Basket Profit Management: Closes all open positions once the total dollar profit target is
I am looking for an experienced MT5 (MQL5) Expert Advisor developer to fix a chart distortion / corruption issue in my existing EA ( EA ALPHA ). Issue Description When the EA is attached to the chart on a specific broker (ATFX), the chart becomes visually distorted The distortion appears on the left-hand side / historical area of the chart The same EA works correctly on other brokers (e.g. CFI) A previous developer

项目信息

预算
130+ USD
截止日期
 1  5 天

客户

所下订单1
仲裁计数0