指定



### **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
等级
(103)
项目
165
24%
仲裁
23
9% / 78%
逾期
16
10%
工作中
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)
项目
166
43%
仲裁
3
67% / 0%
逾期
5
3%
工作中
发布者: 1 代码
6
开发者 6
等级
项目
0
0%
仲裁
0
逾期
0
空闲
7
开发者 7
等级
(302)
项目
308
69%
仲裁
2
100% / 0%
逾期
0
空闲
发布者: 1 代码
8
开发者 8
等级
(206)
项目
333
35%
仲裁
66
12% / 58%
逾期
87
26%
空闲
9
开发者 9
等级
(340)
项目
410
53%
仲裁
20
55% / 15%
逾期
29
7%
繁忙
10
开发者 10
等级
(2)
项目
2
0%
仲裁
1
0% / 0%
逾期
0
空闲
11
开发者 11
等级
(159)
项目
284
35%
仲裁
18
22% / 61%
逾期
42
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)
项目
549
53%
仲裁
13
69% / 15%
逾期
3
1%
空闲
16
开发者 16
等级
(6)
项目
5
0%
仲裁
2
50% / 50%
逾期
2
40%
空闲
17
开发者 17
等级
项目
0
0%
仲裁
0
逾期
0
空闲
18
开发者 18
等级
(6)
项目
4
0%
仲裁
5
0% / 100%
逾期
0
空闲
相似订单
I am looking for a professional developer to build a custom trading analysis software for me. This tool is NOT an automated trading bot (EA); it is an analysis dashboard to help me identify high-probability setups based on my strategy. Key Requirements: Multi-Timeframe Analysis: The software should scan 4 different timeframes (M15, M30, H1, H4, D1, WK1, MTH1) and alert me when my conditions are met. Indicator
Am looking for am experience Programmer who can Edit and compile 2 Ea"s that i built with the help of CHATGPT. I need the job to be done within one day and I will prove the source code
I need a AI signal generating bot for forex trading that use the latest ai technology to track real time forex market, analyse and give signals. The bot should operate such that when i put it in a chart it will analyse the market, after several minutes it will display whether the trade is buying or selling. It should display the one minute, five minute,15minute, 30 minute, one hour, 4 hours and daily time frame
step by step and structure this into a full IEEE 830 / ISO/IEC/IEEE 29148 style Requirements Specification. This format will include: Introduction System Overview Functional and Performance Requirements Traceability Matrix (linking requirements to test cases) Verification and Validation Compliance Standards 1. Introduction 1.1 Purpose The purpose of this document is to define the technical requirements for the
i need an expert to help join 3 model i have in ninjatrader into one, kindly message me and i will be expecting from you and i need this work done in maximum of 4 days, so i need expert that can get it done
I am looking for an experienced MQL5 developer to convert a complex TradingView Pine Script (will provide the script from tradingview) into a fully automated MT5 Expert Advisor -bot. The TradingView script includes: Market Structure (BOS, CHoCH, Swing BOS) Strong / Weak High & Low Equilibrium (Premium / Discount zones) Volumetric Order Blocks Fair Value Gaps (FVG / VI / OG) Accumulation & Distribution zones Equal

项目信息

预算
50 - 300 USD
截止日期
 3 天