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

Şartname


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.

Yanıtlandı

1
Geliştirici 1
Derecelendirme
(28)
Projeler
36
44%
Arabuluculuk
4
50% / 50%
Süresi dolmuş
5
14%
Serbest
2
Geliştirici 2
Derecelendirme
(2)
Projeler
2
0%
Arabuluculuk
0
Süresi dolmuş
1
50%
Serbest
3
Geliştirici 3
Derecelendirme
(13)
Projeler
20
45%
Arabuluculuk
6
33% / 17%
Süresi dolmuş
2
10%
Yüklendi
Yayınlandı: 7 makale, 35 kod
4
Geliştirici 4
Derecelendirme
(170)
Projeler
203
47%
Arabuluculuk
5
20% / 60%
Süresi dolmuş
3
1%
Serbest
5
Geliştirici 5
Derecelendirme
Projeler
0
0%
Arabuluculuk
0
Süresi dolmuş
0
Serbest
6
Geliştirici 6
Derecelendirme
(574)
Projeler
945
47%
Arabuluculuk
309
58% / 27%
Süresi dolmuş
125
13%
Serbest
7
Geliştirici 7
Derecelendirme
(45)
Projeler
53
57%
Arabuluculuk
2
100% / 0%
Süresi dolmuş
1
2%
Serbest
Yayınlandı: 5 kod
8
Geliştirici 8
Derecelendirme
(74)
Projeler
84
64%
Arabuluculuk
5
100% / 0%
Süresi dolmuş
9
11%
Serbest
9
Geliştirici 9
Derecelendirme
(7)
Projeler
6
0%
Arabuluculuk
4
25% / 75%
Süresi dolmuş
2
33%
Serbest
10
Geliştirici 10
Derecelendirme
(1)
Projeler
1
0%
Arabuluculuk
0
Süresi dolmuş
0
Serbest
11
Geliştirici 11
Derecelendirme
Projeler
0
0%
Arabuluculuk
0
Süresi dolmuş
0
Serbest
12
Geliştirici 12
Derecelendirme
(366)
Projeler
449
55%
Arabuluculuk
23
57% / 17%
Süresi dolmuş
30
7%
Çalışıyor
13
Geliştirici 13
Derecelendirme
Projeler
0
0%
Arabuluculuk
0
Süresi dolmuş
0
Serbest
14
Geliştirici 14
Derecelendirme
(298)
Projeler
478
40%
Arabuluculuk
105
40% / 24%
Süresi dolmuş
82
17%
Yüklendi
Yayınlandı: 2 kod
15
Geliştirici 15
Derecelendirme
Projeler
1
0%
Arabuluculuk
2
0% / 100%
Süresi dolmuş
0
Serbest
16
Geliştirici 16
Derecelendirme
(5)
Projeler
6
50%
Arabuluculuk
0
Süresi dolmuş
1
17%
Serbest
17
Geliştirici 17
Derecelendirme
(9)
Projeler
16
19%
Arabuluculuk
2
0% / 50%
Süresi dolmuş
3
19%
Çalışıyor
18
Geliştirici 18
Derecelendirme
(2)
Projeler
2
0%
Arabuluculuk
0
Süresi dolmuş
0
Serbest
Yayınlandı: 1 kod
19
Geliştirici 19
Derecelendirme
Projeler
0
0%
Arabuluculuk
0
Süresi dolmuş
0
Serbest
20
Geliştirici 20
Derecelendirme
(614)
Projeler
718
33%
Arabuluculuk
46
48% / 41%
Süresi dolmuş
15
2%
Yüklendi
21
Geliştirici 21
Derecelendirme
(4)
Projeler
7
57%
Arabuluculuk
1
100% / 0%
Süresi dolmuş
0
Serbest
22
Geliştirici 22
Derecelendirme
(209)
Projeler
271
21%
Arabuluculuk
24
50% / 17%
Süresi dolmuş
0
Çalışıyor
23
Geliştirici 23
Derecelendirme
(3)
Projeler
3
0%
Arabuluculuk
0
Süresi dolmuş
0
Serbest
24
Geliştirici 24
Derecelendirme
(271)
Projeler
553
50%
Arabuluculuk
57
40% / 37%
Süresi dolmuş
227
41%
Çalışıyor
25
Geliştirici 25
Derecelendirme
Projeler
0
0%
Arabuluculuk
0
Süresi dolmuş
0
Serbest
Benzer siparişler
Look at this chart. The ellipses that I have identified show reversals and liquidity was I am trying to find a good way to identify these areas an indicator that automatically detects the sweep and reversal Look at this chart. The ellipses that I have identified show reversals and liquidity was
Anyone with experience in trading bots? I'm using TraderBlox ( https://traderblox.com/ ) and the AI assistant generated a bot with RSI that's showing a 68% win rate in backtesting. However, the generated code has some parts " Important: I will only reply to those who send me a photo of their project and have read this; this way I rule out bots. "I don't fully understand (especially order management and dynamic
Ich möchte einen professionellen Expert Advisor (EA) für MetaTrader 5 entwickeln lassen, der sich funktional am ThunderGold Scalper orientiert. Instrument: XAUUSD / GOLD Zeitrahmen: M15 Plattform: MetaTrader 5 / MQL5 Der EA soll eine eigene, nachprogrammierte Strategie verwenden und keine geschützten Quellcodes oder proprietären Dateien des Originalprodukts kopieren. Gewünschte Funktionen: automatischer Handel auf
I need a fully automated Expert Advisor (EA) written in MQL5 for MetaTrader 5. The EA must work directly inside MT5 and must NOT require TradingView, PineConnector, webhooks, or another external connector to place trades. Trading Instrument Primary symbol: XAGUSD (Silver) My broker may display the symbol as XAGUSD-ECN, so the EA should work with the broker’s available XAGUSD symbol. Main entry timeframe: 5-minute
Hi, I am looking for a profitable manual strategy for trading in forex, no bot no EA , only EA. I want to make good profit.If any one has please let me know, i will test it and if satisfied only i will make the payment. Regards
SmartMove_EA 30+ USD
I need a EA programer to program my EA for MLQ5 to sell at the last candle before impulses to the downside(-) and buy on the last candle before the upside(+) movement. For the take profit we target the nearest high for buy and target nearest low for sell.Stop loss on the last weak of the order block
GoldTrade EA 89+ USD
//+------------------------------------------------------------------+ //| XAUUSD Wolfe + SMC Quick Profit EA | //| MT5 / MQL5 | //+------------------------------------------------------------------+ #property strict #include <Trade/Trade.mqh> CTrade trade; //================================================================== // INPUTS //================================================================== //--- General
can you help me with I have an indicator that I built and I work with PickMyTrade. The entries come through the alerts I get from Trading View . Trading View needs to send an alert and PickMyTrade executes a trade at that exact same second. Now, I have a problem in Trading View with the synchronization between the alert and the signal. I have a box that I built for a trade. It needs to output the box and get an
Looking for a developer in NinjaTrader For coding Inst - ES,NQ Chart type - Tick, range, volume & time Brief- Fib levels mapped on chart which act as entries, tgts and stops all based on candle close. (Maybe) use MACD for filtering direction. Daily manual input of the TWO fib Anchor levels is part of the strategy. I need a well experienced developer to bid and before biding check the attached file well. the PDF and
I need an MT4 Expert Advisor (MQL4). 1. Open one Buy and one Sell trade simultaneously. 2. Adjustable lot size (default 0.01). 3. Stop Loss on both trades. 4. If one trade hits Stop Loss: - Do not open a replacement trade. - Leave the remaining trade open. 5. Optional trailing stop: - On/Off switch. - Adjustable distance. 6. When the remaining trade closes: - Open a new Buy and Sell pair. - Repeat continuously

Proje bilgisi

Bütçe
80 - 120 USD
Son teslim tarihi
to 5 gün