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 13):
LakoFX, RollerAndTrading, waledol, neversell, mazibee, thomdel, davidpont, TriThep, Ababai, didichung, jackboton, jmussol, eduarescobar
"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 (total 2):
LakoFX, Abzak
"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

107
UPDATED

New small fix for Trend Labels released at 14.40 CET. Version 2.6 is now stable and will be moved to reference next week.
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!

****Update Log for the current Month****

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

May 9 Update, download it again.
-Improved initialization data checks to minimize freezes on indicator loading and TF changes.
-Added unique instance IDs to enhance multi-instance support.
-Improved buffer management to prevent data corruption and reduce memory usage.
-Optimized VWAP calculations for large TF
-Updated HTF cache
-Improved memory clean-up mechanism to match the new multi-instance architecture

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 7):
Abzak, waal69, Lucas, LakoFX, RollerAndTrading, kudrpenk, jmussol
"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

108
BLACK ZONES


Black Zones is a converted and optimized support and demand indicator inspired by the popular MT4 Shved Supply and Demand. It is designed to identify key liquidity zones on any forex, indices, metals or crypto chart. By leveraging fractal analysis and ATR, it pinpoints high-probability reversal zones, helping traders make informed decisions. Version 1.0 enhances the original logic with a robust ATR filter, a new level scanner, an improved MTF support, and a toggle button.

Features:
-Accurate Zone Detection: Identifies support/resistance zones using fast and slow fractals.
-Multi-Timeframe (MTF) Support: Displays higher timeframe zones on lower timeframe charts.
-Retest Counter: Tracks zone retests for strength assessment (Proven, Verified, etc.).
-Customizable Settings: Adjust zone appearance, ATR fuzz factor, and merge/extend options.
-Toggle Button: Show/hide zones with a single click for chart clarity.
-Alerts & Notifications: Pop-ups, sounds, and mobile alerts for zone entries.

These users thanked the author Cagliostro for the post (total 15):
mazibee, jackboton, Abzak, thomdel, Mundu19, Ricstar_8, gamerredd, LakoFX, jmussol, Lucas, Investportex, eduarescobar, kudrpenk, spla, SdW25
"I conjure from shadows and shape fortunes from the unseen. The treasure lies hidden in plain sight, beneath the sunlight." - Cagliostro

DownloadRe: 👨‍🔬 Cagliostro's MT5 Laboratory

109
Cagliostro wrote: Sun May 11, 2025 6:59 am BLACK ZONES


image_2025-05-10_225653003.png


Black Zones is a converted and optimized support and demand indicator inspired by the popular MT4 Shved Supply and Demand. It is designed to identify key liquidity zones on any forex, indices, metals or crypto chart. By leveraging fractal analysis and ATR, it pinpoints high-probability reversal zones, helping traders make informed decisions. Version 1.0 enhances the original logic with a robust ATR filter, a new level scanner, an improved MTF support, and a toggle button.

Features:
-Accurate Zone Detection: Identifies support/resistance zones using fast and slow fractals.
-Multi-Timeframe (MTF) Support: Displays higher timeframe zones on lower timeframe charts.
-Retest Counter: Tracks zone retests for strength assessment (Proven, Verified, etc.).
-Customizable Settings: Adjust zone appearance, ATR fuzz factor, and merge/extend options.
-Toggle Button: Show/hide zones with a single click for chart clarity.
-Alerts & Notifications: Pop-ups, sounds, and mobile alerts for zone entries.


Black Zones.ex5
What a site this is. Legends all over. Thank you Sensei Cagliostro <3
These users thanked the author Abzak for the post (total 3):
Cagliostro, jackboton, WN25

Re: 👨‍🔬 Cagliostro's MT5 Laboratory

110
TDI CROSS MTF


The TDI CROSS is designed to provide a histogram-based representation of trend crossovers using principles derived from the Traders Dynamic Index (TDI). This indicator incorporates Multi-Timeframe (MTF) functionality and filtering options to assist in analyzing market trends.

Main Functionalities
-Triple-MA Crossover Logic: Identifies bullish and bearish signals through the crossover of a fast MA, medium MA, and slow MA applied to RSI.
-Histogram Display: Presents signals as a histogram, with colors indicating the trend state and strength, adjusted by a Level 50 filter.
-Level 50 Filter Modes: Offers three modes (No Filter, Level 50 Filter, Level 50 soft) to filter signals based on the Yellow Line’s position relative to the 50 level, including a hysteresis option to reduce noise.
-MTF Capability: Supports signal calculation on any timeframe (current or higher), facilitating cross-timeframe trend analysis.
-TDI Trend Label: Displays a label aligned with TDI’s trend bias, where the direction label’s color reflects the histogram’s color scheme.

Reading the Histogram Colors
The histogram’s colors indicate the trend state and signal strength:
-Light Green (Bullish): Represents a basic bullish crossover when No Filter is selected.
-Dark Green (Strong Bullish): Indicates a trend-aligned bullish signal (Yellow Line ≥ 50) when Filters are active.
-Light Red (Bearish): Represents a basic bearish crossover when No Filter is selected.
-Dark Red (Strong Bearish): Indicates a trend-aligned bearish signal (Yellow Line < 50) when Filters are active.
-Grey (Neutral): Shown when no crossover signal is present or when the trend conditions are not met.

V1.0 Alpha
These users thanked the author Cagliostro for the post (total 6):
Jimmy, WN25, neversell, Shelwin51, jackboton, mrtools
"I conjure from shadows and shape fortunes from the unseen. The treasure lies hidden in plain sight, beneath the sunlight." - Cagliostro