DADA targets time-series anomalies in markets without retraining per instrument by avoiding fixed autoencoder compression and learning robust structure via masked reconstruction.
Its core is an adaptive bottleneck: a router selects among multiple latent sizes so clean signals keep detail while noisy regimes are compressed harder. Two decoders split responsibilities: one reconstructs normal behavior; the other is trained adversarially on synthetic anomalies injected into data, improving separation and reducing false alerts. In production, only the normal decoder runs; large reconstruction error flags anomalies.
An MQL5 implementation focuses on an efficient adaptive module using a multi-window convolution layer, pushed into OpenCL kernels for forward pass, backprop, and Adam updates with shared weights across multivariate series.
π Read | CodeBase | @mql5dev
#MQL5 #MT5 #AI
Its core is an adaptive bottleneck: a router selects among multiple latent sizes so clean signals keep detail while noisy regimes are compressed harder. Two decoders split responsibilities: one reconstructs normal behavior; the other is trained adversarially on synthetic anomalies injected into data, improving separation and reducing false alerts. In production, only the normal decoder runs; large reconstruction error flags anomalies.
An MQL5 implementation focuses on an efficient adaptive module using a multi-window convolution layer, pushed into OpenCL kernels for forward pass, backprop, and Adam updates with shared weights across multivariate series.
π Read | CodeBase | @mql5dev
#MQL5 #MT5 #AI
β€31β‘1π1π€1
A price action Expert Advisor built without lagging indicators, using raw OHLC across multiple timeframes to derive entries from market structure. Logic aligns lower-timeframe momentum with higher-timeframe highs/lows, requiring multi-timeframe confirmation before execution, such as H1 vs H4 structure checks combined with M5 breakout validation.
Core components include MTF structure alignment via previous highs/lows (H1, H4, D1), role-reversal detection for support/resistance flips, and breakout/continuation rules based on candle closes through key levels. Execution favors pending limit/stop orders placed at structural levels rather than market orders.
Designed for liquid, directional markets such as XAUUSD and BTCUSD, typically attached to H1 while sourcing M5, M30, H4, and D1 internally. Parameters are modular: structure scan depth, boolean MTF conditions...
π Read | Signals | @mql5dev
#MQL5 #MT5 #EA
Core components include MTF structure alignment via previous highs/lows (H1, H4, D1), role-reversal detection for support/resistance flips, and breakout/continuation rules based on candle closes through key levels. Execution favors pending limit/stop orders placed at structural levels rather than market orders.
Designed for liquid, directional markets such as XAUUSD and BTCUSD, typically attached to H1 while sourcing M5, M30, H4, and D1 internally. Parameters are modular: structure scan depth, boolean MTF conditions...
π Read | Signals | @mql5dev
#MQL5 #MT5 #EA
β€16π4π4β‘2π2
NeuroPro Verbalisation Converter for MQL5 automates porting trained neural networks from the 1997 NeuroPro package into MetaTrader 4/5 code. It targets typical incompatibilities in verbalised output: missing type declarations, extra brackets, absent semicolons, nonstandard array indexes, and parsing issues where β--β is treated as a decrement operator. It also addresses ANSI CP1251 encoding, preventing Cyrillic identifiers from being corrupted.
Conversion is done by direct byte reading via FILE_BIN, avoiding clipboard-related distortions. Naming is preserved as provided in the source, including case. Substitutions are limited to required elements, such as mapping SigmoidX to SiX while keeping indices, and generating double declarations for intermediate neurons.
A bracket-balance pass trims redundant characters and normalizes line endings with semicolons. Inpu...
π Read | Docs | @mql5dev
#MQL5 #MT5 #script
Conversion is done by direct byte reading via FILE_BIN, avoiding clipboard-related distortions. Naming is preserved as provided in the source, including case. Substitutions are limited to required elements, such as mapping SigmoidX to SiX while keeping indices, and generating double declarations for intermediate neurons.
A bracket-balance pass trims redundant characters and normalizes line endings with semicolons. Inpu...
π Read | Docs | @mql5dev
#MQL5 #MT5 #script
β€23π₯3π1π1
ExMachina Smart Money Concepts v1.0 is a free Smart Money Concepts (ICT) indicator for MetaTrader 5, implemented in native MQL5 with no external dependencies and no iCustom usage. It targets multi-timeframe use across any symbol, providing structure tooling plus on-chart state reporting.
Structure detection covers internal (pivot length 5) and swing (pivot length 50) with BOS/CHoCH options, independent bull/bear filters, confluence filtering, and distinct line styles with midpoint labels. Order blocks are generated on structure breaks (internal and swing), track up to 100 zones, render live rectangles, and remove on mitigation by Close or High/Low. Fair Value Gaps use 3-candle rules with an auto body-percentage threshold and mitigation handling.
Additional modules include ATR-based EQH/EQL, strong/weak highs and lows with forward extension, premium/discou...
π Read | Signals | @mql5dev
#MQL5 #MT5 #Indicator
Structure detection covers internal (pivot length 5) and swing (pivot length 50) with BOS/CHoCH options, independent bull/bear filters, confluence filtering, and distinct line styles with midpoint labels. Order blocks are generated on structure breaks (internal and swing), track up to 100 zones, render live rectangles, and remove on mitigation by Close or High/Low. Fair Value Gaps use 3-candle rules with an auto body-percentage threshold and mitigation handling.
Additional modules include ATR-based EQH/EQL, strong/weak highs and lows with forward extension, premium/discou...
π Read | Signals | @mql5dev
#MQL5 #MT5 #Indicator
β€29β6π4π3π₯1
ExMachina Heikin Ashi Enhanced v3.0 is a free Heikin Ashi indicator for the MQL5 Code Base, focused on completeness and configuration. It supports two render modes: color-coded HA candles with correct High/Low, or a smoothed color line overlay.
Smoothing options include SMA, EMA, double-smoothed EMA (Vervoort-style DEMA), SMMA, and LWMA with adjustable periods. A pip-based step filter suppresses minor HA flips, and Wingdings arrows can be plotted on each color change with configurable codes and offsets. MTF mode maps higher-timeframe HA onto the current chart.
The indicator includes recursive HA OHLC, a consecutive bar counter, a strength metric (body-to-range) with percentage and bar display, HA delta, and a 9-row dashboard. Alerts are available via popup, sound, push, and email. Implementation notes include 14 buffers, modular calculation paths, 82...
π Read | Docs | @mql5dev
#MQL5 #MT5 #Indicator
Smoothing options include SMA, EMA, double-smoothed EMA (Vervoort-style DEMA), SMMA, and LWMA with adjustable periods. A pip-based step filter suppresses minor HA flips, and Wingdings arrows can be plotted on each color change with configurable codes and offsets. MTF mode maps higher-timeframe HA onto the current chart.
The indicator includes recursive HA OHLC, a consecutive bar counter, a strength metric (body-to-range) with percentage and bar display, HA delta, and a 9-row dashboard. Alerts are available via popup, sound, push, and email. Implementation notes include 14 buffers, modular calculation paths, 82...
π Read | Docs | @mql5dev
#MQL5 #MT5 #Indicator
β€23π9π3
A regime-aware, restartable grid-trading EA implements constrained grid cycles based on Bi-Directional Grid Constrained (BGC) stochastic process research (USQ, 2020β2022). Instead of running an open-ended grid, it operates in finite cycles with defined exits (profit target, drawdown limit, max age, weekend flat), then restarts to reset variance and exposure.
Three algorithms switch per cycle: BGT for ranging (both sides per level), TGT for trends (directional stops with basket exit), and MGT for post-trend mean reversion (counter-trend limits back to anchor). Regime selection combines an ATR-to-drift sigma/mu gate with cooldown and a frozen-baseline CUSUM structural break detector, plus deployment blocks near extremes.
Infrastructure includes ATR-dynamic spacing, equity-based dynamic lot sizing, tick-level drawdown kill, and extensive CSV diagnostics wit...
π Read | Calendar | @mql5dev
#MQL5 #MT5 #AlgoTrading
Three algorithms switch per cycle: BGT for ranging (both sides per level), TGT for trends (directional stops with basket exit), and MGT for post-trend mean reversion (counter-trend limits back to anchor). Regime selection combines an ATR-to-drift sigma/mu gate with cooldown and a frozen-baseline CUSUM structural break detector, plus deployment blocks near extremes.
Infrastructure includes ATR-dynamic spacing, equity-based dynamic lot sizing, tick-level drawdown kill, and extensive CSV diagnostics wit...
π Read | Calendar | @mql5dev
#MQL5 #MT5 #AlgoTrading
β€22π10β3
This article reframes grid EAs as an engineerable stochastic process, not a martingale. Loss grows quadratically with adverse grid levels (triangular numbers), buying time for detection and intervention, but indefinite operation still leads to almost sure ruin.
The core production insight is βfinite, restartable cyclesβ: close baskets in profit to reset both variance (time) and exposure (grid depth), and enforce exits via an equity-based kill switch, a max cycle age, and weekend flattening. A loss-exposure formula using session high/low provides O(1) diagnostics, while live risk control uses real equity to handle re-arming, costs, and path effects.
The EA becomes a regime-adaptive cycle manager with three grid modes (range, trend, post-trend mean reversion), ATR-driven spacing, equity-based sizing, structural-break detection (CUSUM/volatility gatin...
π Read | Signals | @mql5dev
#MQL5 #MT5 #AlgoTrading
The core production insight is βfinite, restartable cyclesβ: close baskets in profit to reset both variance (time) and exposure (grid depth), and enforce exits via an equity-based kill switch, a max cycle age, and weekend flattening. A loss-exposure formula using session high/low provides O(1) diagnostics, while live risk control uses real equity to handle re-arming, costs, and path effects.
The EA becomes a regime-adaptive cycle manager with three grid modes (range, trend, post-trend mean reversion), ATR-driven spacing, equity-based sizing, structural-break detection (CUSUM/volatility gatin...
π Read | Signals | @mql5dev
#MQL5 #MT5 #AlgoTrading
β€34
This media is not supported in the widget
VIEW IN TELEGRAM
β€325π₯61π45π18β‘17π¨βπ»16π15
MT5 EAs lose all in-memory state on terminal close, chart refresh, or removal, making multi-terminal coordination hard. A practical fix is persisting a single parameter/state record in a shared binary file so restarts resume cleanly.
The approach packs EA settings into an MQL5 struct and writes/reads it as raw bytes using FileWriteStruct/FileReadStruct with FILE_BIN, stored under FILE_COMMON for cross-terminal access on the same PC.
Key constraint: only simple, fixed-layout structs (int/double/bool, optionally nested) are safe for binary persistence. Strings, dynamic arrays, pointers, and objects require extra handling because their memory layout isnβt stable.
Saving typically happens in OnDeinit(); loading on start restores the exact parameter set without text conversion, reducing code and type/order errors compared to CSV.
π Read | Docs | @mql5dev
#MQL5 #MT5 #EA
The approach packs EA settings into an MQL5 struct and writes/reads it as raw bytes using FileWriteStruct/FileReadStruct with FILE_BIN, stored under FILE_COMMON for cross-terminal access on the same PC.
Key constraint: only simple, fixed-layout structs (int/double/bool, optionally nested) are safe for binary persistence. Strings, dynamic arrays, pointers, and objects require extra handling because their memory layout isnβt stable.
Saving typically happens in OnDeinit(); loading on start restores the exact parameter set without text conversion, reducing code and type/order errors compared to CSV.
π Read | Docs | @mql5dev
#MQL5 #MT5 #EA
β€34π3π₯3π2
A Market Entropy Indicator formalizes market randomness using Shannon entropy on discretized price states (up/down/flat). A normalized rolling score classifies regimes: TREND (<0.35), TRANSITION, and CHAOTIC (>0.65), reducing reliance on price-only heuristics.
Implementation in MQL5 typically uses separate-window plots with fast/slow horizons (e.g., 20/100), momentum, divergence, and compression/decompression detection. Buffers and flags drive a color histogram plus markers for regime shifts and 25%+ βinformation shocks.β
Signal logic is rule-based: buys align with compression to decompression, fast entropy crossing above slow, and improving momentum outside chaotic zones. Sells reverse those conditions, with rising disorder and negative momentum. Visual outputs are spaced to prevent clustering.
π Read | CodeBase | @mql5dev
#MQL5 #MT5 #Indicator
Implementation in MQL5 typically uses separate-window plots with fast/slow horizons (e.g., 20/100), momentum, divergence, and compression/decompression detection. Buffers and flags drive a color histogram plus markers for regime shifts and 25%+ βinformation shocks.β
Signal logic is rule-based: buys align with compression to decompression, fast entropy crossing above slow, and improving momentum outside chaotic zones. Sells reverse those conditions, with rising disorder and negative momentum. Visual outputs are spaced to prevent clustering.
π Read | CodeBase | @mql5dev
#MQL5 #MT5 #Indicator
β€25π4
Footprint charts expose volume at each price level per bar, but lack a compact bar-level summary. This forces manual aggregation and slows both discretionary reads and systematic logic.
An MQL5 footprint indicator extension adds a per-bar sentiment box updated on every tick. It caches delta, total volume, buy/sell percentages, and precomputed colors in the bar structure to keep redraw paths lightweight.
Rendering uses rounded rectangle geometry with arc and quadrilateral rasterization, supersampled draw then downsampled anti-aliased output, and ARGB alpha compositing so price-level text remains readable.
Practical use: net delta as a first filter, delta/price divergence as a reversal signal, volume to qualify significance, and percentage imbalance to quantify participation at key levels.
π Read | AppStore | @mql5dev
#MQL5 #MT5 #Indicator
An MQL5 footprint indicator extension adds a per-bar sentiment box updated on every tick. It caches delta, total volume, buy/sell percentages, and precomputed colors in the bar structure to keep redraw paths lightweight.
Rendering uses rounded rectangle geometry with arc and quadrilateral rasterization, supersampled draw then downsampled anti-aliased output, and ARGB alpha compositing so price-level text remains readable.
Practical use: net delta as a first filter, delta/price divergence as a reversal signal, volume to qualify significance, and percentage imbalance to quantify participation at key levels.
π Read | AppStore | @mql5dev
#MQL5 #MT5 #Indicator
β€27π₯4π2π2
Coral Reef Optimization (CRO, 2014) models a 2D NΓM reef where each occupied cell holds a candidate solution with an objective-based fitness. Initialization uses rho0 to set starting occupancy, then iterates reproduction, settlement, cloning, and depredation until a stop criterion.
Core stages: broadcast spawning selects an Fb fraction for paired crossover (often averaging plus small noise). The remaining corals brood via mutation. Each larva attempts settlement up to k times, taking empty cells or replacing weaker incumbents. Asexual reproduction clones the top Fa fraction. Depredation removes the worst corals with probability Pd.
An updated CROm variant modifies destruction using inverse power law sampling near top solutions, targeting faster convergence on multimodal benchmarks.
π Read | CodeBase | @mql5dev
#MQL5 #MT5 #Strategy
Core stages: broadcast spawning selects an Fb fraction for paired crossover (often averaging plus small noise). The remaining corals brood via mutation. Each larva attempts settlement up to k times, taking empty cells or replacing weaker incumbents. Asexual reproduction clones the top Fa fraction. Depredation removes the worst corals with probability Pd.
An updated CROm variant modifies destruction using inverse power law sampling near top solutions, targeting faster convergence on multimodal benchmarks.
π Read | CodeBase | @mql5dev
#MQL5 #MT5 #Strategy
β€19π2π€1
A custom MACD implementation for MQL5 extends functionality beyond the standard indicator. The code mirrors the calculation logic and feature set found in the Pine Script version, keeping outputs consistent across platforms.
This approach can add configuration options and signal behavior not present in the built-in MQL5 MACD, while retaining expected MACD line, signal line, and histogram behavior. It also supports closer parity for teams maintaining strategies that need matching indicator semantics between TradingView studies and MT5 execution code.
π Read | Freelance | @mql5dev
#MQL5 #MT5 #Indicator
This approach can add configuration options and signal behavior not present in the built-in MQL5 MACD, while retaining expected MACD line, signal line, and histogram behavior. It also supports closer parity for teams maintaining strategies that need matching indicator semantics between TradingView studies and MT5 execution code.
π Read | Freelance | @mql5dev
#MQL5 #MT5 #Indicator
β€22π3
A price-action indicator for Smart Money Concepts workflows automates detection and plotting of Fair Value Gaps (FVGs) in real time. An FVG is defined as a three-candle sequence where the wick range of the first and third candles does not overlap, leaving an imbalance across the second candle.
Bullish (demand) and bearish (supply) zones are marked on the close of the third candle. The calculation is based only on closed bars, so plotted zones do not repaint or shift after confirmation.
Performance is kept predictable by scanning a user-defined history window. Parameters include HistoryBars (default 500), plus separate color settings for bullish and bearish zones. Typical use is M5/M15 for execution-level entries and H1/H4 for broader liquidity targets and mitigation levels.
π Read | Docs | @mql5dev
#MQL5 #MT5 #Indicator
Bullish (demand) and bearish (supply) zones are marked on the close of the third candle. The calculation is based only on closed bars, so plotted zones do not repaint or shift after confirmation.
Performance is kept predictable by scanning a user-defined history window. Parameters include HistoryBars (default 500), plus separate color settings for bullish and bearish zones. Typical use is M5/M15 for execution-level entries and H1/H4 for broader liquidity targets and mitigation levels.
π Read | Docs | @mql5dev
#MQL5 #MT5 #Indicator
β€37β2π2
DoEasyβs chart handling is consolidated into a chart object collection, giving structured access to every open MT5 chart, its subwindows, and attached indicators. The design targets safer iteration and selection across charts by exposing searchable, sortable lists keyed by chart properties.
Change detection avoids relying on CHARTEVENT_CHART_CHANGE (too generic) and instead uses a timer: twice per second it compares the current count of open charts and chart windows to cached values, rebuilding lists only when counts differ. This reduces event noise while keeping state consistent.
The update logic rebuilds window lists when indices shift, fixes loops to use list sizes (not terminal counts), and prevents leaks when list insertion fails. The collection enumerates charts via ChartFirst/ChartNext, supports add/remove sync, and refreshes each chart object to re...
π Read | CodeBase | @mql5dev
#MQL5 #MT5 #EA
Change detection avoids relying on CHARTEVENT_CHART_CHANGE (too generic) and instead uses a timer: twice per second it compares the current count of open charts and chart windows to cached values, rebuilding lists only when counts differ. This reduces event noise while keeping state consistent.
The update logic rebuilds window lists when indices shift, fixes loops to use list sizes (not terminal counts), and prevents leaks when list insertion fails. The collection enumerates charts via ChartFirst/ChartNext, supports add/remove sync, and refreshes each chart object to re...
π Read | CodeBase | @mql5dev
#MQL5 #MT5 #EA
β€64π7π€1
An Expert Advisor runs DOOM (1993) inside a MetaTrader 5 chart by rendering frames into a bitmap label created with ObjectCreate and updated via ResourceCreate. Keyboard input is handled through OnChartEvent and forwarded to a DOOM engine hosted in a custom Windows DLL.
The EA file alone is insufficient. Deployment requires a package containing doomlib.dll and the shareware doom1.wad. Without these files in MQL5\Libraries and MQL5\Experts\Doom, initialization fails. DLL imports must be enabled.
Implementation uses a DLL wrapper around PureDOOM (single-header C port). The game loop runs on a background thread with double-buffered 320x200 ARGB output. The EA triggers updates about every 33ms using EventSetMillisecondTimer, copies the framebuffer to a chart bitmap, and handles key-up by polling GetAsyncKeyState due to missing CHARTEVENT_KEYUP support.
π Read | Quotes | @mql5dev
#MQL5 #MT5 #EA
The EA file alone is insufficient. Deployment requires a package containing doomlib.dll and the shareware doom1.wad. Without these files in MQL5\Libraries and MQL5\Experts\Doom, initialization fails. DLL imports must be enabled.
Implementation uses a DLL wrapper around PureDOOM (single-header C port). The game loop runs on a background thread with double-buffered 320x200 ARGB output. The EA triggers updates about every 33ms using EventSetMillisecondTimer, copies the framebuffer to a chart bitmap, and handles key-up by polling GetAsyncKeyState due to missing CHARTEVENT_KEYUP support.
π Read | Quotes | @mql5dev
#MQL5 #MT5 #EA
β€29π€£12π₯11π4π±2π2
Chart object work in MQL5 is being extended with a window layer and indicator descriptors.
Two new classes are added in ChartWnd.mqh: CWndInd for an indicator attached to a window, and CChartWnd for a chart window that stores size and a list of attached indicators. CWndInd keeps chart ID, window index, short name, and handle, with comparison logic based on handle/window index or short name.
CChartWnd manages per-window properties previously skipped at chart level: Y-distance to main window and window height, plus height changes via ChartSetInteger with forced redraw and event-queue checks.
Indicator enumeration uses ChartIndicatorGet by short name, with immediate handle release to avoid leaking usage counters. The window object can build/sync its indicator list, verify real presence, and remove stale entries.
π Read | NeuroBook | @mql5dev
#MQL5 #MT5 #Indicator
Two new classes are added in ChartWnd.mqh: CWndInd for an indicator attached to a window, and CChartWnd for a chart window that stores size and a list of attached indicators. CWndInd keeps chart ID, window index, short name, and handle, with comparison logic based on handle/window index or short name.
CChartWnd manages per-window properties previously skipped at chart level: Y-distance to main window and window height, plus height changes via ChartSetInteger with forced redraw and event-queue checks.
Indicator enumeration uses ChartIndicatorGet by short name, with immediate handle release to avoid leaking usage counters. The window object can build/sync its indicator list, verify real presence, and remove stale entries.
π Read | NeuroBook | @mql5dev
#MQL5 #MT5 #Indicator
β€66π6π3π₯2π€£2π€1
In live execution, entry logic alone does not control risk. Broker microstructure, order book visibility, and short-lived price spikes can make visible Stop Loss and Take Profit levels predictable and vulnerable.
Stealth Trade Manager is a protection utility that manages existing positions rather than opening trades. It keeps SL/TP virtual: the broker sees positions without attached stops, while the local terminal tracks real thresholds and closes at market only when levels are breached.
Core functions include Virtual SL/TP and a Spread Protector. If a virtual stop is reached during abnormal spread expansion, such as news events or server rollover, the position is held until spreads normalize, reducing exits caused by artificial widening.
Key inputs: Virtual_SL_Points, Virtual_TP_Points, Max_Spread_To_Close, and Magic_Number for managing manual trades or se...
π Read | Calendar | @mql5dev
#MQL5 #MT5 #EA
Stealth Trade Manager is a protection utility that manages existing positions rather than opening trades. It keeps SL/TP virtual: the broker sees positions without attached stops, while the local terminal tracks real thresholds and closes at market only when levels are breached.
Core functions include Virtual SL/TP and a Spread Protector. If a virtual stop is reached during abnormal spread expansion, such as news events or server rollover, the position is held until spreads normalize, reducing exits caused by artificial widening.
Key inputs: Virtual_SL_Points, Virtual_TP_Points, Max_Spread_To_Close, and Magic_Number for managing manual trades or se...
π Read | Calendar | @mql5dev
#MQL5 #MT5 #EA
β€41
CRT Indicator (MTF): Explorer extends a single-timeframe CRT implementation into a multi-timeframe indicator for MQL5, aligning higher timeframe structure with lower timeframe execution on one chart.
The logic monitors a user-selected HTF, validates bullish and bearish CRT conditions with strict price-action rules, then projects the resulting CRH/CRL zones onto the active LTF. Zones are rendered with standard library Fibonacci objects via CChartObjectFibo, providing labeled, color-coded levels for quick context around macro-defined areas.
Updates are event-driven: CRT evaluation and redraw occur only on formation of a new HTF bar. This reduces redundant recalculation while keeping the overlay responsive. The design stays compact (under 130 lines) and focuses on deterministic synchronization between HTF data and LTF visualization.
π Read | Signals | @mql5dev
#MQL5 #MT5 #Indicator
The logic monitors a user-selected HTF, validates bullish and bearish CRT conditions with strict price-action rules, then projects the resulting CRH/CRL zones onto the active LTF. Zones are rendered with standard library Fibonacci objects via CChartObjectFibo, providing labeled, color-coded levels for quick context around macro-defined areas.
Updates are event-driven: CRT evaluation and redraw occur only on formation of a new HTF bar. This reduces redundant recalculation while keeping the overlay responsive. The design stays compact (under 130 lines) and focuses on deterministic synchronization between HTF data and LTF visualization.
π Read | Signals | @mql5dev
#MQL5 #MT5 #Indicator
β€36π4