Техническое задание



### **No-SL Strategy for XAU/USD (Gold)**

**Objective**: Profit from 1-pip scalps using buy/sell stop orders while hedging risk through opposing trades.  

**Conditions**:  

- Broker allows **hedging** (simultaneous buy/sell orders).  

- Zero spreads/commissions (as per your setup).  


---


### **Rules**

#### **1. Entry Logic**  

- Place **buy stops** 1 pip above the current price and **sell stops** 1 pip below.  

- Deploy a **grid of orders** at every pip (e.g., 1800.00, 1800.01, 1800.02, etc.).  


#### **2. Exit Logic**  

- **Take Profit (TP)**: Close all trades at **1-pip profit** for the entire grid.  

  - Example: If 10 buy orders and 10 sell orders are open, close all when net profit reaches 1 pip.  

- **Time-Based Exit**: Close all trades after 15 minutes to avoid overnight swaps.  


#### **3. Risk Mitigation**  

- **Micro Lots**: Use 0.01 lots per trade to limit exposure.  

- **Max Active Trades**: Cap at 20 orders (prevents margin overload).  

- **Equity Stop**: Halt trading if account equity drops by 5% in a session.  


---


### **MT4 EA Code (No SL)**

```cpp

// Inputs

input double LotSize = 0.01;    // Micro lots

input int GridStep = 1;         // 1 pip between orders

input int MaxOrders = 20;       // Max simultaneous trades

input double EquityStop = 5.0;  // Stop trading if equity drops 5%

input int MagicNumber = 9999;


// Global variables

double InitialEquity = AccountEquity();


void OnTick() {

   // Stop trading if equity drops by 5%

   if (AccountEquity() <= InitialEquity * (1 - EquityStop / 100)) {

      CloseAllTrades();

      return;

   }


   // Place orders if below max active trades

   if (OrdersTotal() < MaxOrders) {

      double currentPrice = Ask;

      double buyStopPrice = NormalizeDouble(currentPrice + GridStep * _Point, Digits);

      double sellStopPrice = NormalizeDouble(currentPrice - GridStep * _Point, Digits);


      // Place Buy Stop with 1-pip TP

      OrderSend(_Symbol, OP_BUYSTOP, LotSize, buyStopPrice, 0, 0, buyStopPrice + _Point, "BuyStop NoSL", MagicNumber);


      // Place Sell Stop with 1-pip TP

      OrderSend(_Symbol, OP_SELLSTOP, LotSize, sellStopPrice, 0, 0, sellStopPrice - _Point, "SellStop NoSL", MagicNumber);

   }


   // Close all trades if total profit >= 1 pip

   double totalProfit = CalculateTotalProfit();

   if (totalProfit >= 1 * _Point) {

      CloseAllTrades();

   }

}


// Calculate total profit of all open trades

double CalculateTotalProfit() {

   double profit = 0;

   for (int i = OrdersTotal() - 1; i >= 0; i--) {

      if (OrderSelect(i, SELECT_BY_POS) && OrderMagicNumber() == MagicNumber) {

         profit += OrderProfit();

      }

   }

   return profit;

}


// Close all open trades

void CloseAllTrades() {

   for (int i = OrdersTotal() - 1; i >= 0; i--) {

      if (OrderSelect(i, SELECT_BY_POS) && OrderMagicNumber() == MagicNumber) {

         OrderClose(OrderTicket(), OrderLots(), OrderClosePrice(), 3);

      }

   }

}

```


---


### **Critical Risks & Mitigations**

1. **Trend Risk**:  

   - If XAU/USD trends strongly in one direction (e.g., +20 pips), all opposing orders will accumulate losses.  

   - **Fix**: Add a trend filter (e.g., disable buy stops if price < 50-period EMA).  


2. **Slippage**:  

   - Rapid price movements (e.g., during Fed announcements) can skip your TP levels.  

   - **Fix**: Use `OrderClose` with `Slippage=3` in the EA.  


3. **Margin Call**:  

   - Without SLs, losing trades can drain margin rapidly.  

   - **Fix**: Use tiny lot sizes (0.01) and strict equity stops.  


4. **Broker Restrictions**:  

   - Some brokers block grid strategies or frequent order placement.  

   - **Fix**: Confirm broker rules and test in a demo account first.  


---


### **Why This Works (In Theory)**  

- **Hedging**: Buy/sell orders cancel each other in sideways markets.  

- **Aggressive Profit-Taking**: Closing all trades at 1-pip net profit locks in gains before a trend develops.  

- **Equity Protection**: The 5% equity stop prevents catastrophic losses.  


---


### **How to Test**  

1. **Backtest**:  

   - Use MT4’s Strategy Tester with **tick data** (select "Every Tick" mode).  

   - Test during high-volatility periods (e.g., NFP days).  


2. **Forward Test**:  

   - Run on a demo account for 1 week.  

   - Monitor slippage and broker order execution quality.  


3. **Metrics to Track**:  

   - Win Rate: Aim for >70% of sessions profitable.  

   - Max Drawdown: Keep <5% per day.  


---


### **Final Warning**  

This strategy is **extremely high-risk** and only viable if:  

- Your broker truly has **no spreads/commissions**.  

- You use a **VPS** for sub-100ms execution.  

- You accept the possibility of a total account wipeout.  


Always prioritize capital preservation over aggressive profit-taking. Consider adding a **hidden SL** (e.g., closing trades if equity drops 2% in a single candle) for added safety.



Откликнулись

1
Разработчик 1
Оценка
(106)
Проекты
173
25%
Арбитраж
23
9% / 78%
Просрочено
16
9%
Работает
2
Разработчик 2
Оценка
(22)
Проекты
21
10%
Арбитраж
4
25% / 75%
Просрочено
0
Свободен
3
Разработчик 3
Оценка
(15)
Проекты
19
16%
Арбитраж
5
40% / 40%
Просрочено
0
Свободен
4
Разработчик 4
Оценка
(33)
Проекты
35
20%
Арбитраж
5
40% / 40%
Просрочено
0
Свободен
Опубликовал: 1 пример
5
Разработчик 5
Оценка
(85)
Проекты
173
44%
Арбитраж
3
100% / 0%
Просрочено
5
3%
Свободен
Опубликовал: 1 пример
6
Разработчик 6
Оценка
Проекты
0
0%
Арбитраж
0
Просрочено
0
Свободен
7
Разработчик 7
Оценка
(310)
Проекты
315
70%
Арбитраж
2
100% / 0%
Просрочено
0
Свободен
Опубликовал: 1 пример
8
Разработчик 8
Оценка
(206)
Проекты
333
35%
Арбитраж
66
12% / 58%
Просрочено
87
26%
Свободен
9
Разработчик 9
Оценка
(362)
Проекты
435
54%
Арбитраж
21
52% / 14%
Просрочено
30
7%
Работает
10
Разработчик 10
Оценка
(2)
Проекты
2
0%
Арбитраж
1
0% / 0%
Просрочено
0
Свободен
11
Разработчик 11
Оценка
(162)
Проекты
289
35%
Арбитраж
18
22% / 61%
Просрочено
43
15%
Свободен
12
Разработчик 12
Оценка
(16)
Проекты
35
23%
Арбитраж
4
0% / 50%
Просрочено
2
6%
Работает
13
Разработчик 13
Оценка
(574)
Проекты
945
47%
Арбитраж
309
58% / 27%
Просрочено
125
13%
Свободен
14
Разработчик 14
Оценка
(5)
Проекты
5
60%
Арбитраж
1
0% / 0%
Просрочено
2
40%
Свободен
Опубликовал: 1 пример
15
Разработчик 15
Оценка
(511)
Проекты
550
53%
Арбитраж
13
69% / 15%
Просрочено
3
1%
Свободен
16
Разработчик 16
Оценка
(6)
Проекты
5
0%
Арбитраж
3
33% / 67%
Просрочено
2
40%
Свободен
17
Разработчик 17
Оценка
Проекты
0
0%
Арбитраж
0
Просрочено
0
Свободен
18
Разработчик 18
Оценка
(6)
Проекты
4
0%
Арбитраж
5
0% / 100%
Просрочено
0
Свободен
Похожие заказы
Early Killer EA 30+ USD
It must have automated stop loss. Something that can end poverty and kill the market early.It must take the trades for me whenever I start it it must work on tradeport ea

Информация о проекте

Бюджет
50 - 300 USD
Сроки выполнения
до 3 дн.