Project Brief: Optimized & Modular RSI Divergence Detection Module (MQL5)

指定


I am looking to develop a highly optimized and fully modular script in MQL5 specifically for detecting RSI Divergences. This script will serve as a foundational building block to be integrated into a larger, comprehensive Expert Advisor (EA) later. Therefore, execution speed, strict logic, and a clean codebase are my absolute top priorities.


Here are the core technical requirements for this project:

1. MQL5 Performance & Memory Management (Crucial):

Efficient Handle Creation: The RSI indicator handle must be strictly declared and initialized only once within the OnInit() function.

Optimized Data Retrieval: Use CopyBuffer() efficiently to fetch only the newly required data points per tick or per new bar.

Zero Memory Leaks: Under no circumstances should the indicator be re-called or recalculated from scratch on every OnTick(). The module must be extremely lightweight.

2. Customizable Divergence Selection (Important):

The algorithm must be capable of mathematically detecting BOTH Regular and Hidden divergences.

However, I require external input parameters (e.g., boolean variables like Enable_Regular_Div and Enable_Hidden_Div, or a dropdown Enum) that allow me to strictly control which signals are active and displayed. I must be able to select:

Only Regular Divergences

Only Hidden Divergences

Both simultaneously
This flexibility is critical for my backtesting and strategy optimization.

3. High-Efficiency Detection & Strict Confirmation:

Minimal Lag: The algorithm scanning for peaks and troughs must be mathematically optimized.

No Repainting: The divergence signals must be robust and definitively confirmed (e.g., strictly evaluated after the candle closes). Once a signal is printed or registered, it must not repaint or disappear.

4. Clean & Modular Architecture (Integration-Ready):

Encapsulation: The logic must be cleanly separated into modular functions or classes.

No Global Variable Conflicts: Avoid using loosely defined global variables that could clash when I include this .mqh file or logic into my master EA.

Clear Inputs: All customizable parameters (RSI Period, applied price, peak/trough lookback periods, and the divergence type toggles mentioned above) must be clearly defined as input variables.

5. Documentation:

Please include professional, brief comments explaining the core logic, especially around the loops used for identifying the historical pivots/fractals for the divergence.

Please review these requirements and let me know your approach to ensuring the code remains as fast and modular as requested.

反馈

1
开发者 1
等级
(19)
项目
24
38%
仲裁
3
67% / 33%
逾期
1
4%
工作中
2
开发者 2
等级
(2)
项目
2
0%
仲裁
0
逾期
1
50%
空闲
3
开发者 3
等级
(5)
项目
7
14%
仲裁
3
33% / 0%
逾期
0
工作中
发布者: 3 文章, 30 代码
4
开发者 4
等级
(168)
项目
201
48%
仲裁
5
20% / 60%
逾期
2
1%
工作中
5
开发者 5
等级
项目
0
0%
仲裁
0
逾期
0
空闲
6
开发者 6
等级
(574)
项目
945
47%
仲裁
309
58% / 27%
逾期
125
13%
空闲
7
开发者 7
等级
(40)
项目
43
58%
仲裁
1
100% / 0%
逾期
1
2%
空闲
发布者: 5 代码
8
开发者 8
等级
(74)
项目
84
64%
仲裁
5
100% / 0%
逾期
9
11%
空闲
9
开发者 9
等级
(6)
项目
5
0%
仲裁
3
33% / 67%
逾期
2
40%
工作中
10
开发者 10
等级
(1)
项目
1
0%
仲裁
0
逾期
0
空闲
11
开发者 11
等级
项目
0
0%
仲裁
0
逾期
0
空闲
12
开发者 12
等级
(362)
项目
435
54%
仲裁
21
52% / 14%
逾期
30
7%
已载入
13
开发者 13
等级
项目
0
0%
仲裁
0
逾期
0
空闲
14
开发者 14
等级
(298)
项目
477
40%
仲裁
105
40% / 24%
逾期
81
17%
已载入
发布者: 2 代码
15
开发者 15
等级
项目
1
0%
仲裁
2
0% / 100%
逾期
0
空闲
16
开发者 16
等级
(5)
项目
6
50%
仲裁
0
逾期
1
17%
空闲
17
开发者 17
等级
(5)
项目
9
11%
仲裁
2
0% / 50%
逾期
2
22%
工作中
18
开发者 18
等级
(2)
项目
2
0%
仲裁
0
逾期
0
空闲
发布者: 1 代码
19
开发者 19
等级
项目
0
0%
仲裁
0
逾期
0
空闲
20
开发者 20
等级
(572)
项目
664
32%
仲裁
42
45% / 45%
逾期
12
2%
已载入
21
开发者 21
等级
(1)
项目
3
33%
仲裁
0
逾期
0
工作中
22
开发者 22
等级
(198)
项目
254
20%
仲裁
22
50% / 18%
逾期
0
已载入
23
开发者 23
等级
(3)
项目
3
0%
仲裁
0
逾期
0
空闲
24
开发者 24
等级
(271)
项目
553
50%
仲裁
57
40% / 37%
逾期
227
41%
工作中
25
开发者 25
等级
项目
0
0%
仲裁
0
逾期
0
空闲
相似订单
am looking for an experienced MQL5 developer to create a professional Expert Advisor (EA) for the MT5 platform based on Elliott Wave Theory. Project Requirements Develop an automated trading EA for MetaTrader 5 (MT5) Strategy must detect and trade Elliott Wave patterns automatically EA should identify impulsive and corrective wave structures Include configurable entry and exit conditions Support Buy and Sell trades
Project Overview We have a highly optimized, production-ready custom cTrader cBot built for a fast-paced Renko breakout strategy (specifically trading XAUUSD/Gold). The core system architecture, structural mapping, and breakout logic are flawless. We are seeking an expert C# algorithmic developer for a targeted engagement to refine the execution mechanics and add an advanced trade management module. This is not a
SNIPER X AI 30 - 200 USD
I really need a developer Who can help me to create my SNIPER X AI - Elite AI Trading System Overview SNIPER X AI BOT is an AI-assisted trading system for Forex, Crypto, Stocks, Indices, and Gold. Currency: USD,RAND,KWD, POUND,EURO Core Features AI Scalping, Sniper Entries, Auto Buy/Sell, Smart Risk Management, Telegram Alerts, Mobile Monitoring, VPS Deployment. Supported Platforms MetaTrader 4, MetaTrader 5, Exness
Emmanuel bot 30 USD
No thank you just choose for me I need to be automatically buy and sell and take a profit only that is enough for me thank you so much my name is Emmanuel kabale
Limzy 30+ USD
//+------------------------------------------------------------------+ //| HighPerformanceEA.mq5 | //| Copyright 2026, AI Developer | //| https://www.mql5.com | //+------------------------------------------------------------------+ #property copyright "Copyright 2026" #property link " https://www.mql5.com " #property version "1.00" #property strict //
I need an experienced MQL5 developer to build a professional XAUUSD scalping Expert Advisor. The trading logic is already fully defined and will be shared privately with selected developers. Requirements Fast execution suitable for scalping Dynamic lot sizing Strict risk management Clean and optimized MQL5 code Compatible with MetaTrader 5 Additional Rules No repainting logic No delayed execution Avoid duplicate
Prepare expert for xauusd live chart [ expert is not executing xauusd trades , just printing the logic on the chart ] . Deletion and cleaning code ( subject to if required ) . Integration of candles with present logic, Since expert is coming out from an arbitration subject : Before project start , review the code if it is clean and ready for the developer to continue with previous developer's technical debt -thereby
Hello, I am looking for an experienced developer who can build a professional EA suitable for long-term prop firm account passing and account management. I am NOT interested in risky strategies such as martingale, grid, or aggressive recovery systems. My main priorities are: very low and stable drawdown, strong and consistent risk management, strict news filter, long-term sustainability, realistic and stable monthly
Need a Profitable with a good trading system or strategy. would test the product first Looking for a professional MT5 Expert Advisor based on smart strategies. The EA should include session filters, risk management, trailing stop, multi-pair support, and low drawdown protection. I need a consistent, high-probability automated trading system optimized for long-term profitability and funded account compliance
Junior EA 30+ USD
1. EA for MT5, hedging allowed. 2. Entry: 50 EMA crosses 200 EMA on H1. Buy on bullish cross, sell on bearish. 3. SL: 100 pips, TP: 200 pips. No trailing stop. 4. Lot size: 0.01 fixed. Max 3 trades at once. 5. Trade only 08:00-18:00 GMT. No trades if spread > 20 points. 6. Inputs: EMA periods, SL, TP, lot size, start/end time

项目信息

预算
80 - 120 USD
截止日期
 5 天