Martingle

명시


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};


응답함

1
개발자 1
등급
(161)
프로젝트
209
19%
중재
18
44% / 17%
기한 초과
0
무료
2
개발자 2
등급
(70)
프로젝트
90
26%
중재
24
21% / 50%
기한 초과
24
27%
무료
3
개발자 3
등급
(19)
프로젝트
24
38%
중재
2
50% / 50%
기한 초과
2
8%
무료
4
개발자 4
등급
(18)
프로젝트
30
30%
중재
8
50% / 25%
기한 초과
3
10%
작업중
5
개발자 5
등급
(10)
프로젝트
11
18%
중재
0
기한 초과
1
9%
작업중
6
개발자 6
등급
프로젝트
1
100%
중재
2
0% / 0%
기한 초과
0
작업중
7
개발자 7
등급
(5)
프로젝트
8
13%
중재
0
기한 초과
0
작업중
8
개발자 8
등급
(270)
프로젝트
550
49%
중재
55
40% / 36%
기한 초과
227
41%
작업중
9
개발자 9
등급
(2)
프로젝트
2
0%
중재
0
기한 초과
0
무료
10
개발자 10
등급
프로젝트
2
50%
중재
0
기한 초과
0
무료
11
개발자 11
등급
프로젝트
0
0%
중재
0
기한 초과
0
무료
12
개발자 12
등급
(571)
프로젝트
942
47%
중재
303
59% / 25%
기한 초과
125
13%
무료
비슷한 주문
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
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
Expert Advisors 30+ USD
Hello traders, I am looking for a developer who can convert an indicator strategy I developed into an Expert Advisor. I use two indicators, and I don't have their source code. I am looking for a developer who can create an Expert Advisor (either MT4 or MT5) that can program an Expert Advisor based on two indicators. I also have this, but I don't have the source code for either indicator. I have a strategy that works
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
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
Project Title: Supertrend EA with M30 Entry and M15 Exit Developer Requirements: Must have experience with Supertrend indicator customization Proven track record of developing multi-timeframe EAs Ability to provide backtest reports Strategy Specifications Entry Conditions (M30 Timeframe): BUY when price crosses ABOVE Supertrend line SELL when price crosses BELOW Supertrend line Input parameters for ATR period
Most of what I’ve been sent are just optimized bots — I want a true expert with a strong win rate, low drawdown, and a good risk-reward ratio. Open to discussions if you have one Send I'll try 7 days in live

프로젝트 정보

예산
30+ USD

고객

넣은 주문1
중재 수0