Tarea técnica



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



Han respondido

1
Desarrollador 1
Evaluación
(102)
Proyectos
154
20%
Arbitraje
22
9% / 77%
Caducado
14
9%
Trabajando
2
Desarrollador 2
Evaluación
(22)
Proyectos
21
10%
Arbitraje
4
25% / 75%
Caducado
0
Libre
3
Desarrollador 3
Evaluación
(14)
Proyectos
18
17%
Arbitraje
5
40% / 40%
Caducado
0
Libre
4
Desarrollador 4
Evaluación
(33)
Proyectos
35
20%
Arbitraje
5
40% / 40%
Caducado
0
Libre
Ha publicado: 1 ejemplo
5
Desarrollador 5
Evaluación
(84)
Proyectos
162
43%
Arbitraje
3
67% / 0%
Caducado
5
3%
Trabaja
Ha publicado: 1 ejemplo
6
Desarrollador 6
Evaluación
Proyectos
0
0%
Arbitraje
0
Caducado
0
Libre
7
Desarrollador 7
Evaluación
(300)
Proyectos
306
69%
Arbitraje
2
100% / 0%
Caducado
0
Libre
Ha publicado: 1 ejemplo
8
Desarrollador 8
Evaluación
(206)
Proyectos
333
35%
Arbitraje
66
12% / 58%
Caducado
87
26%
Libre
9
Desarrollador 9
Evaluación
(322)
Proyectos
385
52%
Arbitraje
19
53% / 16%
Caducado
26
7%
Ocupado
10
Desarrollador 10
Evaluación
(2)
Proyectos
2
0%
Arbitraje
1
0% / 0%
Caducado
0
Libre
11
Desarrollador 11
Evaluación
(159)
Proyectos
284
35%
Arbitraje
17
24% / 59%
Caducado
42
15%
Trabajando
12
Desarrollador 12
Evaluación
(15)
Proyectos
34
24%
Arbitraje
4
0% / 50%
Caducado
2
6%
Trabaja
13
Desarrollador 13
Evaluación
(574)
Proyectos
945
47%
Arbitraje
309
58% / 27%
Caducado
125
13%
Libre
14
Desarrollador 14
Evaluación
(5)
Proyectos
5
60%
Arbitraje
1
0% / 0%
Caducado
2
40%
Libre
Ha publicado: 1 ejemplo
15
Desarrollador 15
Evaluación
(509)
Proyectos
546
53%
Arbitraje
13
69% / 15%
Caducado
3
1%
Trabaja
16
Desarrollador 16
Evaluación
(5)
Proyectos
4
0%
Arbitraje
2
50% / 50%
Caducado
2
50%
Libre
17
Desarrollador 17
Evaluación
Proyectos
0
0%
Arbitraje
0
Caducado
0
Libre
18
Desarrollador 18
Evaluación
(6)
Proyectos
4
0%
Arbitraje
5
0% / 100%
Caducado
0
Libre
Solicitudes similares
I want developer who know how to create bot which immediately transfer specific crypto coin deposit to one crypto address to another specific address in just a second,, if you know about this then only comment on this post
require the development of a high-speed, fully automated trading Expert Advisor (EA) for MetaTrader 5 , optimized for live trading on both Deriv and Exness . The EA must be designed for fast execution, low latency, and reliability on real-money accounts , with full compatibility across broker-specific contract specifications, tick sizes, tick values, pricing formats, and volume rules. It should automatically detect
I need a custom Pocket Option binary options bot. This is NOT an MT5 EA. The bot must work directly with Pocket Option using API or WebSocket (NO clicker bot). Bot Requirements Generate simple Buy/Sell signals for OTC pairs Execute trades automatically on Pocket Option Allow me to set: Entry Amount (Level 0) Level 1 martingale amount Level 2 martingale amount Level 3 martingale amount If Level 0 loses → trade Level 1
Welcome to my freelance profile. I am a disciplined and detail-oriented trading systems specialist with strong expertise in: Algorithmic Trading (MT4 & MT5) EA/Indicator Setup & Technical Support Signal Creation, Optimization & Risk Structuring Strategy Testing & Performance Evaluation Trade Automation & System Fine-Tuning My work is based on accuracy, transparency, and strict professional standards. I ensure that
We are looking for a skilled developer with proven experience integrating the Deriv API WebSocket, ( https://developers.deriv.com/docs/getting-started ) to connect our trading web application with Deriv SmartTrader accounts. Our platform already generates AI-based trading signals , and the goal is to allow users to: Log in with their Deriv account (OAuth or API tokens) Fetch and display real-time account details
Job Title: Cloud-Based MT4/MT5 Trade Copier Developer (Project-Based) Project Overview: Looking for an experienced developer to build a cloud-hosted trade copier platform similar in concept to leading web-based multi-account trade copiers. The system must copy trades in real time between multiple MT4/MT5 accounts (and later other platforms), with low latency, strong security, and a modern web dashboard for
I want the Robots to execute buy/sell/TP/SL trades without me telling them to, Buy low Sell high Forex Pairs, I want to gain profit not lose profit, using INDICATORS, strategies, Expert Advisors, signals, Symbols, MA RSI, Awesome Accelerators', Algorithmic Trading and Scanners on real time data
Pazuzu 30+ USD
generate or create me a python coded file that has mql5 language requirements for a trading bot under the following instructions. the bot must execute trades if necessary the bot must trade 24/7 the bot must trade gold and currency the bot must make unlimited profit hourly the bot must enter market with caution after market analysis of 98 percent of clear trade

Información sobre el proyecto

Presupuesto
50 - 300 USD
Plazo límite de ejecución
a 3 día(s)