Re: 👨‍🔬 Cagliostro's MT5 Laboratory

101
jackboton wrote: Tue May 06, 2025 11:55 pm I noticed some differences: the 5min oracle on the 1min chart does not match the 5min oracle on the 5min chart, and they remain inconsistent even after refreshing.
1) what version are you using?
2) what broker are you using?

The way that HTF data is pulled on current chart makes the comparison hard to make, they align when the HTF candle closes, this is how any MTF indicator works.
These users thanked the author Cagliostro for the post (total 2):
davidpont, asgariHoo
"I conjure from shadows and shape fortunes from the unseen. The treasure lies hidden in plain sight, beneath the sunlight." - Cagliostro


Re: 👨‍🔬 Cagliostro's MT5 Laboratory

102
UPDATED

NOTE: If you downloaded before 5.00 AM CET, please re-download it.
Cagliostro wrote: Sat Mar 22, 2025 2:19 am Hello fellow traders.

I thought that could be interesting to share with you some of the MT5 stuff I am testing, researching and coding. As some of you know, I switched fully to MT5 last month, so am working to improve my MT5 arsenal.

List of Indicators
-The Oracle
-AVWAP with Bands
-Radius Trend
-X-Stoch
-KoncordePlus
-Spearman-Pearson with Entries


Rules are simple.
-This is a testing lab, you don't pay to get and test stuff, it's all free.
-As per above, feedback and suggestions will be much appreciated.
-But no complaints or lamentations will be appreciated or considered.

Today's the Spring Equinox, the real start of the new year! So there is no better day to start sharing something!

The Oracle
In the shadowed depths of Delphi ancient ruins, where logic and mystery intertwine, lies The Oracle—an artifact of unfathomable power. Forged in an era when the stars whispered secrets to the bold, it transcends mere computation, unveiling glimpses of fate’s hidden currents. Its cryptic code, a relic of a lost civilization, pulses with esoteric wisdom, inviting the daring to pierce the veil of time—though its full mysteries remain tantalizingly out of reach.

It includes 7 indicators chosen, tested and optimized among hundreds in the last 4 months, including the Ehlers's Universal Strength indicator and my Rolling VWAP. Keep it at level 6 for M1/M3/M5 trading and let me know how it goes. Happy Equinox!

April 1 Update [Version 1.0], download it again.
-Incremental processing for all trend updates
-Buffer optimization
-VWAP pre-computation
-Added a Trend Strength Index

April 2 Update, download it again.
-Added customization for histograms and TSI label

April 8 Update, download it again.
-Added MTF validation
-Improved memory management
-Implemented incremental resizing for all buffers
-Fixed trend array stale impacting specific brokers
-Added Data Fetch Logging
-Added Error Handling for all indicators

April 9 Update, download it again.
-Removed redundant trend array shrink
-Improved FetchIndicatorData
-Aligned Local Timers to Server Timers
-Fixed MQL5’s native data sync in retry loop

April 13 Update, download it again.
-Added TF spec to Alerts
-Improved fault tolerance logic

April 19 Update [Version 2.0], download it again.
-Added multiple instances logic for calculations and alerts
-Replaced global variables with instance-specific storage
-Added MTF data sync checks with fallback
-Implemented instance-specific sync failure and anti-freeze mechanism
-Enhanced MTF data fetching with hybrid fetch resizing and index validation

April 25 Update, download it again.
-Instance complete isolation + timer-based handle sync to improve multi instance and multi chart setups.
-MTF sync watchdog with automatic fallback – prevents freezes when higher-timeframe series aren’t ready.
-Per bar indicator fetch cache – to cut CopyBuffer calls by ~50 %.
-Cumulative sum arrays – to reduce CPU load by ~ 40/50%
-Safe math guards – averts divide-by-zero exceptions and silent freezes.
-Histogram color/index refactor – ensures crisp visuals with zero repaint artefacts.
-Alert state isolation – blocks duplicate pop-ups and aligns messages with the correct chart.

April 28 Update, download it again.
-Implemented a new ring-buffer architecture, reducing memory usage by ~95–96%.
-Added resize-on-demand mechanism, cutting CPU overhead by ~90% for array operations.
-Implemented a MTF dynamic caching system to ensure zero recalculation on HTF closed candles
-Moved periodic object cleanup to OnTimer, eliminating per-tick overhead.
-Added pre-sized caches, preventing per-bar resizes.
-Implemented data tail clearing, ensuring accuracy during partial data fetches and broker data blackouts.
-Added series orientation for MTF buffers, improving data ordering.
-Added a separate performance logging logic, enhancing debugging clarity.

April 30 Update, download it again.
-Added Data Stream Watchdog.
-Revamped the MTF and multi-instance sync.
-Removed MTF caching to limit data leak.

May 7 Update, download it again.
-Added Trend Label TF
-Improved Array compaction logic
-Improved Timer Management for multi-instances
-Added buffering for MTF Sync

The Oracle.ex5

Note: if you face issues, please use version 2.0

Oracle 2.0.ex5
These users thanked the author Cagliostro for the post (total 11):
LakoFX, RollerAndTrading, waledol, neversell, mazibee, thomdel, davidpont, TriThep, Ababai, didichung, jackboton
"I conjure from shadows and shape fortunes from the unseen. The treasure lies hidden in plain sight, beneath the sunlight." - Cagliostro

Re: 👨‍🔬 Cagliostro's MT5 Laboratory

103
didichung wrote: Sun May 04, 2025 3:12 pm Hi ChuChu, I haven't been to Japan although I live very close to it, maybe one day. There are many things about Italy to like (food, wine, coffee) :razz: and then there are the personal things I didn't like. For instance, you would know that Milan is situated just south of the Alps. This means that the winters are freezing cold and snow piled high, that is ok to see on a postcard but I am a warm weather kinda guy. You may know also that in Europe, there are restrictions to when you can use heating within your home. If winter arrives early and the heating date is not met, the only warm place is in bed. :D

Best regards
DC
Haha that's the same in Japan during winter it's very cold and snow is everywhere.

I didn't know Milan was just near the Alps so I learned something new today. Are you happy in Taiwan now? Is it the best place you have lived so far?

DownloadRe: 👨‍🔬 Cagliostro's MT5 Laboratory

104
The Oracle works very well for me. Thank you Cagliostro for this indicator.
I have a problem with a duplicate label as you can see in the picture below.
When I remove The Oracle the label is not removed.
New chart window, new version of The Oracle, new template.
I am using version 2.5 (new).

I also have a suggestion to add something like this:
LabelPrefix=true/false
When "false" I see only the number, no TF and no BUY/SELL.
Thank you.

Re: 👨‍🔬 Cagliostro's MT5 Laboratory

105
LakoFX wrote: Thu May 08, 2025 1:36 am The Oracle works very well for me. Thank you Cagliostro for this indicator.
I have a problem with a duplicate label as you can see in the picture below.
When I remove The Oracle the label is not removed.
New chart window, new version of The Oracle, new template.
I am using version 2.5 (new).

I also have a suggestion to add something like this:
LabelPrefix=true/false
When "false" I see only the number, no TF and no BUY/SELL.
Thank you.
Run this script (XU clean screen), it will remove all labels. And just change time frames back and forth.
These users thanked the author Abzak for the post (total 3):
LakoFX, Cagliostro, mazibee


Re: 👨‍🔬 Cagliostro's MT5 Laboratory

106
LakoFX wrote: Thu May 08, 2025 1:36 am The Oracle works very well for me. Thank you Cagliostro for this indicator.
I have a problem with a duplicate label as you can see in the picture below.
When I remove The Oracle the label is not removed.
New chart window, new version of The Oracle, new template.
I am using version 2.5 (new).

I also have a suggestion to add something like this:
LabelPrefix=true/false
When "false" I see only the number, no TF and no BUY/SELL.
Thank you.
the issue that some people are consistently facing is related to the availability of MTF data from the broker, it's the same issue that happens when loading the indicator first time or switching TF and seeing the indicator bars empty. I added a lot of controls and error checking, and you also see in the latest version the indicator showing "no signal". As Abzak said, use the clean screen script and switch back and forth the TF. The more feature we add, the more the broker quality will impact visuals. You have version 2.0 that is considered "stable", the current version is always more experimental.
These users thanked the author Cagliostro for the post:
LakoFX
"I conjure from shadows and shape fortunes from the unseen. The treasure lies hidden in plain sight, beneath the sunlight." - Cagliostro