Specifiche
File Name: ReverseOrderEA_Description.txt
Purpose: Describes the functionality of the MQL5 Expert Advisor ReverseOrderEA.mq5
---
EA Name:
ReverseOrderEA.mq5
Automated MQL5 Expert Advisor that places reverse pending orders based on existing open trades.
---
Functionality Overview:
This EA monitors all open positions on the current chart symbol and automatically places a reverse pending order (Buy Stop or Sell Stop) based on the trade’s stop loss (SL). The logic ensures:
- Only one reverse pending order per open position.
- Reverse orders are deleted and re-placed if the SL, lot size, or entry changes.
- Reverse orders are canceled if the original position is closed (manually or otherwise).
- Reverse lot size is calculated using a multiplier (default 1.0).
---
Reverse Order Logic:
- BUY position:
- Reverse = Sell Stop at the SL.
- SL = original entry.
- TP = SL − (2 × risk).
- SELL position:
- Reverse = Buy Stop at the SL.
- SL = original entry.
- TP = SL + (2 × risk).
---
Key Components:
✅ CheckAndPlaceReversePendingOrder()
- Loops through open positions.
- Calculates reverse price, SL, TP.
- Ensures only one reverse order exists per position.
- Calls DeleteReverseIfChanged() if parameters differ.
- Places new pending orders with appropriate comment format.
🗑️ DeleteReverseIfChanged()
- Deletes existing reverse pending orders if:
- SL, lot size, or entry price has changed.
🚫 CancelUnusedReverseOrders()
- Deletes reverse orders if the original position is closed or no longer exists.
---
Comment Format:
All reverse orders include a comment:
Reverse_<ticketNumber>_<SL>
This enables matching each pending order to its original trade and verifying its parameters.
---
Inputs:
- lotMultiplier — Multiplier for reverse lot size (e.g., 2 = double lot size).
- magicNumber — Unique magic number to track reverse orders only.
- reversePrefix — Text prefix in order comment (default "Reverse").
---
OnTick Logic:
1. CheckAndPlaceReversePendingOrder()
2. CancelUnusedReverseOrders()
Both are called every tick to keep reverse order logic accurate and synchronized.
---
Notes:
- Works only with positions on the current chart symbol.
- Requires SL on original position to function.
- Does not initiate trades itself — only creates reversals for existing ones.
want to add lot size and tp as step
// Recovery logic
double lotSteps[] = {0.01, 0.02, 0.02, 0.04, 0.04, 0.08, 0.08, 0.04, 0.04, 0.08, 0.08};
double tpMultipliers[] = {2.0, 2.0, 2.5, 2.5, 3.0, 3.0, 4.0, 4.0, 4.0, 4.0, 4.0};
Con risposta
1
Valutazioni
Progetti
209
19%
Arbitraggio
18
44%
/
17%
In ritardo
0
Gratuito
2
Valutazioni
Progetti
90
26%
Arbitraggio
24
21%
/
50%
In ritardo
24
27%
Gratuito
3
Valutazioni
Progetti
24
38%
Arbitraggio
2
50%
/
50%
In ritardo
2
8%
Gratuito
4
Valutazioni
Progetti
30
30%
Arbitraggio
8
50%
/
25%
In ritardo
3
10%
In elaborazione
5
Valutazioni
Progetti
11
18%
Arbitraggio
0
In ritardo
1
9%
In elaborazione
6
Valutazioni
Progetti
1
100%
Arbitraggio
2
0%
/
0%
In ritardo
0
In elaborazione
7
Valutazioni
Progetti
8
13%
Arbitraggio
0
In ritardo
0
In elaborazione
8
Valutazioni
Progetti
550
49%
Arbitraggio
55
40%
/
36%
In ritardo
227
41%
In elaborazione
9
Valutazioni
Progetti
2
0%
Arbitraggio
0
In ritardo
0
Gratuito
10
Valutazioni
Progetti
2
50%
Arbitraggio
0
In ritardo
0
Gratuito
11
Valutazioni
Progetti
0
0%
Arbitraggio
0
In ritardo
0
Gratuito
12
Valutazioni
Progetti
942
47%
Arbitraggio
303
59%
/
25%
In ritardo
125
13%
Gratuito
Ordini simili
Simple RSI Strategy Bot for MT5
80 - 200 USD
im looking for a developer to build a fully automated trading robot Expert Advisor for Metatrader 5. The EA must do the following open buy sell orders based on a custom strategy details below place take profit and stop loss automatically Lot size should be adjustable Should avoid overtrading e.g. max 3 trades per day Close trades automatically based on criteria Work on multiple pairs if possible News filler optional
I need an Expert advisor (EA) for metatrader 5 (MT5), coded in MQL5. The EA should open and close trades based on the RSI indicator. A buy trade is triggered when RSI crosses below 30 and then moves back above it. A sell trade when RSI crosses above 70 and then drops below. The EA must include customizable input settings such as RSI period, lot size, stop loss, take profit, maximum number of trades, and trading time
I'm looking for a professional MQL developer to convert an Indicator codes (Pine Script) from TradingView to MQL5 and modifying it , It's based on FVG and OB indicator in tradingview
hello coders , i want you to create a trading bot in mt5. i have the pinescript code for the strategy. the trading bot is a type of scalping bot hence the entry and exit would be very fast typically in the same candle and within 20 seconds. so if anyone can help me in creating i would be very muh happy
Grid Trader EA Modification
50 - 100 USD
Hi Experts! Please advise if it possible to modify an EA attached to my requirements? 1. Would like to add a volatility parameter of the instrument 2. Would like to add a trigger for intitalization / termination of this EA
Commodities scalper - MT4
30+ USD
Hello.. I need a professional developer to correct the expert's errors and add some necessary options to it... The expert makes profits in the demo account of most companies while losing in the real account.. The expert works on the strength of liquidity with fast trades and very tight stop loss... I need a developer to detect the expert's errors
Convert Metatrader4 Indicators into an EA
30 - 200 USD
Hi traders, I'm looking for a developer who can turn an indicator strategy i've developed into an EA. I have 3 Indicators i use and I do not have the source code for them. They all deliver PUSH alerts in MT4 though. I am looking for a developer who can create an EA (either MT4 or MT5) that can code an EA based off of 3 indicators, again which I have, but I do NOT have source code for the indicators. I have a strategy
This Expert Advisor (EA) is based on the 'Liquidity Sweep + Momentum Shift' scalping strategy, built for EURUSD, XAUUSD (Gold), and NAS100 (NASDAQ). It is designed to trade on the 5-minute (M5) timeframe, identifying high-probability reversals following liquidity grabs. The EA must scan for trades continuously and may execute up to 10 trades per symbol per day, depending on conditions met. 2. Symbols and Timeframes -
We are seeking an experienced MQL5 developer to create a custom Expert Advisor (EA) tailored to our specific trading strategy. The ideal candidate should have proven experience in building high-performance trading robots with a focus on strategy optimization, debugging, and efficient order execution. Key Responsibilities: Develop and code an Expert Advisor based on our pre-defined strategy. Conduct in-depth testing
Two EAs previously developed by developers one from HongKong and another from Nigeria. Need to first cross verify whether they did right coding or not? If no, report those errors, fix them. If yes, carry on for creating combined EA to achieve main purpose of making this new EA profitable along with fresh coding of entry logics
Informazioni sul progetto
Budget
30+ USD
Cliente
Ordini effettuati1
Numero di arbitraggi0