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

Spécifications


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.

Répondu

1
Développeur 1
Évaluation
(19)
Projets
24
38%
Arbitrage
3
67% / 33%
En retard
1
4%
Travail
2
Développeur 2
Évaluation
(2)
Projets
2
0%
Arbitrage
0
En retard
1
50%
Gratuit
3
Développeur 3
Évaluation
(5)
Projets
7
14%
Arbitrage
3
33% / 0%
En retard
0
Travail
Publié : 3 articles, 30 codes
4
Développeur 4
Évaluation
(168)
Projets
201
48%
Arbitrage
5
20% / 60%
En retard
2
1%
Travail
5
Développeur 5
Évaluation
Projets
0
0%
Arbitrage
0
En retard
0
Gratuit
6
Développeur 6
Évaluation
(574)
Projets
945
47%
Arbitrage
309
58% / 27%
En retard
125
13%
Gratuit
7
Développeur 7
Évaluation
(40)
Projets
43
58%
Arbitrage
1
100% / 0%
En retard
1
2%
Gratuit
Publié : 5 codes
8
Développeur 8
Évaluation
(74)
Projets
84
64%
Arbitrage
5
100% / 0%
En retard
9
11%
Gratuit
9
Développeur 9
Évaluation
(6)
Projets
5
0%
Arbitrage
3
33% / 67%
En retard
2
40%
Travail
10
Développeur 10
Évaluation
(1)
Projets
1
0%
Arbitrage
0
En retard
0
Gratuit
11
Développeur 11
Évaluation
Projets
0
0%
Arbitrage
0
En retard
0
Gratuit
12
Développeur 12
Évaluation
(362)
Projets
435
54%
Arbitrage
21
52% / 14%
En retard
30
7%
Chargé
13
Développeur 13
Évaluation
Projets
0
0%
Arbitrage
0
En retard
0
Gratuit
14
Développeur 14
Évaluation
(298)
Projets
477
40%
Arbitrage
105
40% / 24%
En retard
81
17%
Chargé
Publié : 2 codes
15
Développeur 15
Évaluation
Projets
1
0%
Arbitrage
2
0% / 100%
En retard
0
Gratuit
16
Développeur 16
Évaluation
(5)
Projets
6
50%
Arbitrage
0
En retard
1
17%
Gratuit
17
Développeur 17
Évaluation
(5)
Projets
9
11%
Arbitrage
2
0% / 50%
En retard
2
22%
Travail
18
Développeur 18
Évaluation
(2)
Projets
2
0%
Arbitrage
0
En retard
0
Gratuit
Publié : 1 code
19
Développeur 19
Évaluation
Projets
0
0%
Arbitrage
0
En retard
0
Gratuit
20
Développeur 20
Évaluation
(572)
Projets
664
32%
Arbitrage
42
45% / 45%
En retard
12
2%
Chargé
21
Développeur 21
Évaluation
(1)
Projets
3
33%
Arbitrage
0
En retard
0
Travail
22
Développeur 22
Évaluation
(198)
Projets
254
20%
Arbitrage
22
50% / 18%
En retard
0
Chargé
23
Développeur 23
Évaluation
(3)
Projets
3
0%
Arbitrage
0
En retard
0
Gratuit
24
Développeur 24
Évaluation
(271)
Projets
553
50%
Arbitrage
57
40% / 37%
En retard
227
41%
Travail
25
Développeur 25
Évaluation
Projets
0
0%
Arbitrage
0
En retard
0
Gratuit
Commandes similaires
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
I need an experienced MQL5 developer to build a semi automated trading signal system for Gold (XAUUSD) on MT5. The system is NOT a martingale or grid EA. The goal is to build a clean rule based signal engine that detects high probability setups based on predefined strategy rules and sends trading alerts with optional pending order logic. Main Requirements: 1. Signal Generation - Buy and Sell signals - Buy Limit - Buy

Informations sur le projet

Budget
80 - 120 USD
Délais
à 5 jour(s)