Specification



### **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.



Responded

1
Developer 1
Rating
(102)
Projects
154
20%
Arbitration
22
9% / 77%
Overdue
14
9%
Loaded
2
Developer 2
Rating
(22)
Projects
21
10%
Arbitration
4
25% / 75%
Overdue
0
Free
3
Developer 3
Rating
(14)
Projects
18
17%
Arbitration
5
40% / 40%
Overdue
0
Free
4
Developer 4
Rating
(33)
Projects
35
20%
Arbitration
5
40% / 40%
Overdue
0
Free
Published: 1 code
5
Developer 5
Rating
(84)
Projects
162
43%
Arbitration
3
67% / 0%
Overdue
5
3%
Working
Published: 1 code
6
Developer 6
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Free
7
Developer 7
Rating
(300)
Projects
306
69%
Arbitration
2
100% / 0%
Overdue
0
Free
Published: 1 code
8
Developer 8
Rating
(206)
Projects
333
35%
Arbitration
66
12% / 58%
Overdue
87
26%
Free
9
Developer 9
Rating
(322)
Projects
385
52%
Arbitration
19
53% / 16%
Overdue
26
7%
Busy
10
Developer 10
Rating
(2)
Projects
2
0%
Arbitration
1
0% / 0%
Overdue
0
Free
11
Developer 11
Rating
(159)
Projects
284
35%
Arbitration
17
24% / 59%
Overdue
42
15%
Loaded
12
Developer 12
Rating
(15)
Projects
34
24%
Arbitration
4
0% / 50%
Overdue
2
6%
Working
13
Developer 13
Rating
(574)
Projects
945
47%
Arbitration
309
58% / 27%
Overdue
125
13%
Free
14
Developer 14
Rating
(5)
Projects
5
60%
Arbitration
1
0% / 0%
Overdue
2
40%
Free
Published: 1 code
15
Developer 15
Rating
(509)
Projects
546
53%
Arbitration
13
69% / 15%
Overdue
3
1%
Working
16
Developer 16
Rating
(5)
Projects
4
0%
Arbitration
2
50% / 50%
Overdue
2
50%
Free
17
Developer 17
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Free
18
Developer 18
Rating
(6)
Projects
4
0%
Arbitration
5
0% / 100%
Overdue
0
Free
Similar orders
Greetings, I'm seeking a price quote for the following EA description. 1) Short positions are opened after trades that have closed below the open of the trade. 2) Long positions are opened after trades that have closed above the open of the trade. 3) The base lot size plus the spread is applied for every trade that opens after the take profit has been reached. 4) Double the lot size of the previous trade plus
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
MT5 30 - 50 USD
I'm looking for an experienced MQL5 developer to help with backtesting, optimization, and VPS setup for a prop firm EA on XAUUSD (Gold). Scope of work - Backtest and optimize using high-quality tick data from Dukascopy or Polygon (2020–2025) - Perform Monte Carlo and Walk-Forward testing to optimize parameters like ATR multipliers and risk % - VPS installation and configuration for continuous MT5 operation - Apply
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
I want to create an SMC bot base on ICT and Market structure,the bot must be able to keep adding on more positions while started.The bot must have a perfect risk management
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

Project information

Budget
50 - 300 USD
Deadline
to 3 day(s)