No reviews yet. Be the first to share your experience!
Latest Posts
MQL5 Algo Trading
May 12, 2026, 02:38 PM
๐ท Photo
Hardcoding min_ret in tripleโbarrier labels hides the biggest source of false signal: broker- and session-specific transaction costs. A reproducible pipeline solves this by measuring costs per symbol and converting them into a labeling threshold aligned with the real execution environment.
An MQL5 script samples spread history via CopySpread(), captures swap metadata with SymbolInfoDouble(), and exports a structured CSV including spread percentiles plus hourly spread means. This makes costs session-aware instead of relying on a single average.
A Python TransactionCostModel ingests the CSV, normalizes spread, slippage, commission, and swap into fractional-return units, and exposes min_ret_for_symbol() and diagnostics. Swap handling covers broker swap modes and triple-swap days, preserving carry credits instead of forcing abs().
The same model param...
๐ https://www.mql5.com/en/articles/22372?utm_source=mql5.com.tg&utm_medium=message&utm_campaign=articles.codes.repost | https://www.mql5.com/en/signals?utm_source=mql5.com.tg&utm_medium=message&utm_campaign=articles.codes.repost |
#MQL5 #MT5 #AlgoTrading
11,600
25
0
MQL5 Algo Trading
May 12, 2026, 02:38 PM
๐ท Photo
Manual news trading still suffers from context switching between browser calendars and the MT5 terminal. That gap creates reaction delays, inconsistent execution, and strategies that cannot be validated on historical data or scaled with repeatable rules.
A practical architecture in MT5 is a dedicated news layer built on the terminalโs Economic Calendar and MQL5 API: single data source, cache + filters, exportable history for Strategy Tester, and automatic Live/Tester switching so identical code paths stay deterministic.
Key API usage patterns: CalendarValueHistory for bulk preloading, CalendarValueLast with change_id for incremental updates, and CalendarEventById/CalendarCountryById for metadata joins. Use TimeTradeServer for consistent time windows, and handle 5200/5201 retries while avoiding 5204 by timer-based polling.
๐ https://www.mql5.com/en/articles/22196?utm_source=mql5.com.tg&utm_medium=message&utm_campaign=articles.codes.repost | https://www.mql5.com/en/economic-calendar?utm_source=mql5.com.tg&utm_medium=message&utm_campaign=articles.codes.repost |
#MQL5 #MT5 #AlgoTrading
MQL5 Algo Trading
May 12, 2026, 02:38 PM
๐ท Photo
Minute-level NQ logic around the New York open fails most often through silent numeric faults: NaN/Inf, overflow from near-zero denominators, log of non-positive prices, missing/zero closes near history edges, and unstable variance from tiny samples. These values propagate as plausible numbers and corrupt downstream signals.
A defensive MQL5 foundation layer is specified as a single include file for CopyClose/SymbolInfoDouble workflows. It enforces minimum sample sizes, validates price arrays, bounds math outputs, and provides stable statistical and spectral primitives.
Core components include guarded math (SafeDivide, SafeLog, SafeSqrt, SafeExp, SafeTanh), validated data access (ValidateSymbolV2, SafeCopyClose), two-pass and trimmed estimators, a centralized OLS slope, shared result structs with status codes, and a single radix-2 FFT reused across mod...
๐ https://www.mql5.com/en/articles/22263?utm_source=mql5.com.tg&utm_medium=message&utm_campaign=articles.codes.repost | https://www.mql5.com/en/neurobook?utm_source=mql5.com.tg&utm_medium=message&utm_campaign=articles.codes.repost |
#MQL5 #MT5 #AlgoTrading
MQL5 Algo Trading
May 12, 2026, 02:38 PM
๐ท Photo
This refactor rebuilds an MT5 drawing tools palette that became brittle due to mixed rendering, layout, theme values, and event handling. The solution replaces the flat code with a layered, single-responsibility sidebar architecture where extending features becomes additive rather than a rewrite.
Key building blocks include a category registry (labels, icon glyphs, multi-tool flags), a theme manager that swaps full color sets for dark/light modes, and a canvas layer that owns chart bitmap labels and supports dynamic resizing.
Rendering quality is improved with supersampled CCanvas drawing: alpha blending, downsampling, and anti-aliased rounded rectangles with per-corner control for edge snapping. Practical result: a compact sidebar that snaps to chart edges, toggles theme instantly, and scales cleanly as more tool groups are registered.
๐ https://www.mql5.com/en/articles/22193?utm_source=mql5.com.tg&utm_medium=message&utm_campaign=articles.codes.repost | https://www.mql5.com/en/market?utm_source=mql5.com.tg&utm_medium=message&utm_campaign=articles.codes.repost |
#MQL5 #MT5 #Indicator
MQL5 Algo Trading
May 12, 2026, 02:38 PM
๐ท Photo
Candle Range Theory levels on H1/H4/D1 often disappear on execution charts, causing lower-timeframe moves to be misclassified. A practical fix is an MTF overlay that plots higher-timeframe candle range, body, and wicks directly on the active chart.
An MQL5 indicator addresses this by mapping each lower-timeframe bar to its parent HTF candle with time-accurate anchoring, confirming setups only after the HTF candle closes to avoid repainting, and rendering the full OHLC structure as persistent zones.
Implementation details include HTF data loading via Copy* calls, a binary-search index map, CRT pattern checks evaluated only on HTF-close bars, and automatic drawing of range rectangles plus entry/TP/SL lines. Optional filters handle Sundays and small-gap candles, with alerts and performance safeguards for large histories.
๐ https://www.mql5.com/en/articles/22190?utm_source=mql5.com.tg&utm_medium=message&utm_campaign=articles.codes.repost | https://www.mql5.com/en/job?utm_source=mql5.com.tg&utm_medium=message&utm_campaign=articles.codes.repost |
#MQL5 #MT5 #Indicator
MQL5 Algo Trading
May 12, 2026, 02:38 PM
๐ท Photo
Clock-time bars encode equal information per minute, which fails under variable tick density and injects heteroscedasticity before feature generation.
AFML Chapter 1 bar types are implemented in two runtimes: a unified Python make_bars() module for batch tick histories, and an MQL5 library for event-driven bar building inside an EA. Output parity is validated on identical tick streams.
Production issues addressed include out-of-core tick loading via partitioned Parquet plus Dask, broker-feed cleanup (zero/negative spreads, duplicates, NaT timestamps), removal of zero-tick time bars, and imbalance-bar thresholds driven by O(1) EWM updates. EWM state persistence avoids resets across EA restarts.
๐ https://www.mql5.com/en/articles/22063?utm_source=mql5.com.tg&utm_medium=message&utm_campaign=articles.codes.repost | https://www.mql5.com/en/economic-calendar?utm_source=mql5.com.tg&utm_medium=message&utm_campaign=articles.codes.repost |
#MQL5 #MT5 #AlgoTrading
11,200
MQL5 Algo Trading
May 12, 2026, 02:38 PM
๐ท Photo
Five-year H1 test on US_TECH100 (AvaTrade broker feed, 29,646 bars) evaluated MACD(12,26,9) histogram crossovers with ATR(14) exits: SL 2.5 ATR, TP 3.0 ATR, 48-bar timeout. Trades normalized to R, pessimistic same-bar fills assumed.
Filter impact was measured incrementally: regime (ADX + rolling ATR percentiles), then EMA200 alignment, then a US-session window (14:00โ20:00 broker time). Raw MACD: 2,213 trades, 46.5% win rate, +0.017R expectancy, PF 1.03, max DD -28.8R. Regime and HTF filters changed little and slightly degraded expectancy.
Session filtering was the primary driver: 195 trades, 50.3% win rate, +0.100R expectancy, PF 1.20, max DD -9.7R. Regime breakdown showed RANGE negative, VOLATILE positive, contradicting common filter assumptions.
๐ https://www.mql5.com/en/articles/22290?utm_source=mql5.com.tg&utm_medium=message&utm_campaign=articles.codes.repost | https://www.mql5.com/en/vps?utm_source=mql5.com.tg&utm_medium=message&utm_campaign=articles.codes.repost |
#MQL5 #MT5 #Indicator
11,100
MQL5 Algo Trading
May 12, 2026, 02:38 PM
๐ท Photo
The December 2020 TASC issue covered John Ehlersโ MyRsi with Noise Elimination Technology (NET), an RSI variant that applies a Kendall-style autocorrelation approach to reduce noisy signals.
A practical adaptation is support for configurable input prices rather than a fixed close-only feed, which can be useful when testing on typical price, median price, or custom series.
Operationally, it can be treated like a standard RSI, with an additional NET line available for confirmation. In comparative chart reviews, the NET line often shows earlier turns and cleaner transitions, while RSI provides the familiar baseline for thresholds and divergence analysis.
๐ https://www.mql5.com/en/code/36999?utm_source=mql5.com.tg&utm_medium=message&utm_campaign=articles.codes.repost | https://www.mql5.com/en/forum?utm_source=mql5.com.tg&utm_medium=message&utm_campaign=articles.codes.repost |
#MQL5 #MT5 #Indicator
13,600
MQL5 Algo Trading
May 12, 2026, 02:38 PM
๐ท Photo
An object-oriented FVG scanner in MQL5 starts with strict three-candle geometry: bullish gaps form when candle 3 high is below candle 1 low; bearish gaps invert that relationship. This removes indicator lag by working directly on OHLC microstructure.
The implementation centers on a CFVGScanner class that pulls data via CopyRates into an MqlRates array (series-indexed), validates bar count to avoid out-of-range crashes, and supports multiple timeframe instances without shared global state.
A mitigation pass filters stale zones by scanning forward after detection and discarding gaps already touched by later highs/lows. Performance stays near O(N) with early breaks, and the EA runs scans only on new bars, not every tick.
Rendering uses OBJ_RECTANGLE with a unique name prefix plus targeted cleanup/deletion to prevent chart-object buildup and preserve user draw...
๐ https://www.mql5.com/en/articles/22264?utm_source=mql5.com.tg&utm_medium=message&utm_campaign=articles.codes.repost | https://www.mql5.com/en/neurobook?utm_source=mql5.com.tg&utm_medium=message&utm_campaign=articles.codes.repost |
#MQL5 #MT5 #EA
MQL5 Algo Trading
May 12, 2026, 02:38 PM
๐ท Photo
MetaTrader 5 lacks account-level validation after trade entry. Positions can be modified, partially closed, or opened by multiple EAs and manual actions, creating gaps between intended risk and real exposure.
An enforcement engine treats risk as continuously verifiable conditions: SL present, TP defined, equity-based risk within limits, and a maintained risk-to-reward ratio. Violations trigger reporting or correction depending on mode.
Core modules: trade monitor, risk evaluator, enforcement, dashboard/alerts, and session configuration. MQL5 uses OnInit() with EventSetTimer(), OnTimer() to scan positions, broker stop-level checks, tolerance-based comparisons, lot-size reduction, and TRADE_ACTION_SLTP updates.
Modes: passive, assisted, strict. Logging and on-chart state tracking support testing and auditability.
๐ https://www.mql5.com/en/articles/21995?utm_source=mql5.com.tg&utm_medium=message&utm_campaign=articles.codes.repost | https://www.mql5.com/en/code?utm_source=mql5.com.tg&utm_medium=message&utm_campaign=articles.codes.repost |
#MQL5 #MT5 #EA
MQL5 Algo Trading
Apr 2, 2026, 03:01 PM
๐ท Photo
This part completes the ExcelโPythonโMetaTrader 5 bridge by moving the MT5 side into MQL5 as a Service, avoiding the โscript must stay on a chartโ limitation. Running as a service keeps the connector independent of charts while still able to open/close charts and control terminal state.
The system is deliberately split into three cooperating processes: a Python socket server, VBA in Excel, and an MQL5 client. The recommended workflow is incremental testing: validate Python first, then Excelโserver messaging, then attach MT5.
On the MQL5 side, the core is a persistent TCP client loop with explicit socket cleanup on failed connects, configurable host/port parameters, and a defensive receive buffer strategy to prevent losing data when reads arrive in bursts.
A simple text protocol is parsed character-by-character to extract a symbol and a command, return...
๐ https://www.mql5.com/en/articles/12829?utm_source=mql5.com.tg&utm_medium=message&utm_campaign=articles.codes.repost | https://www.mql5.com/en/quotes/overview?utm_source=mql5.com.tg&utm_medium=message&utm_campaign=articles.codes.repost |
#MQL5 #MT5 #AlgoTrading
MQL5 Algo Trading
Apr 2, 2026, 03:01 PM
๐ท Photo
Liquidity zones and flips can be identified accurately in MQL5, yet many trades fail because risk is applied mechanically instead of modeling how price sweeps liquidity around those levels.
The article proposes an engineered, reproducible risk framework implemented as an MT5 Expert Advisor that manages the full trade lifecycle: pre-trade zone qualification (impulse/base quality, size constraints, higher-timeframe alignment), context-aware stop placement with buffers beyond expected sweep areas, and dynamic position sizing from a fixed account risk percent and actual stop distance.
Key implementation details include a LiquidityZone state model (triggered, flipped, expiry), ATR-based normalization to reject weak zones, pending limits for fresh zones, and confirmation-based market entries for flipped zones with reduced risk. Zones are monitored for expiry, ord...
๐ https://www.mql5.com/en/articles/21759?utm_source=mql5.com.tg&utm_medium=message&utm_campaign=articles.codes.repost | https://www.mql5.com/en/neurobook?utm_source=mql5.com.tg&utm_medium=message&utm_campaign=articles.codes.repost |
#MQL5 #MT5 #EA
MQL5 Algo Trading
Apr 2, 2026, 03:01 PM
12,400
159
0
MQL5 Algo Trading
Apr 2, 2026, 03:01 PM
๐ท Photo
ZigZag-based SNR Detection calculates support and resistance from confirmed pivot highs and lows. Levels are derived from ZigZag extremes and plotted as horizontal references to outline recent market structure.
Configuration covers Lookback bars and the core ZigZag settings: Depth, Deviation, and Backstep. Optional rendering includes broken (closed) levels for historical context, open levels extending to the current bar, the ZigZag line, and per-level labels.
Labels mark level type (S/R) and the active chart timeframe. The tool runs across standard symbols and timeframes from intraday through daily, and is intended to highlight pivot clusters where multiple levels align into practical zones for further analysis.
๐ https://www.mql5.com/en/code/60339?utm_source=mql5.com.tg&utm_medium=message&utm_campaign=articles.codes.repost | https://www.mql5.com/en/quotes/overview?utm_source=mql5.com.tg&utm_medium=message&utm_campaign=articles.codes.repost |
#MQL5 #MT5 #Indicator
13,300
MQL5 Algo Trading
Apr 2, 2026, 03:01 PM
๐ท Photo
Manual Fibonacci retracements stay discretionary, but their monitoring can be automated without losing context. This EA detects manually drawn OBJ_FIBO objects, extracts each retracement level, converts them into fixed price references, and tracks them independently.
An event-driven workflow avoids noisy auto-detection: the trader draws, then explicitly syncs and converts levels for monitoring. Internally, each level is stored with state so interactions are interpreted over time, not as one-off checks.
On every tick, a state machine classifies approach, touch, breakout, and post-touch reversal using configurable tolerances, instrument-aware pip scaling, and level-mapping options. Alerts and a compact panel provide persistent awareness across charts, while lifecycle handling keeps monitored structures aligned with edits and deletions.
๐ https://www.mql5.com/en/articles/21890?utm_source=mql5.com.tg&utm_medium=message&utm_campaign=articles.codes.repost | https://www.mql5.com/en/market?utm_source=mql5.com.tg&utm_medium=message&utm_campaign=articles.codes.repost |
#MQL5 #MT5 #AlgoTrading
MQL5 Algo Trading
Apr 2, 2026, 03:01 PM
๐ท Photo
An Expert Advisor targets swing highs and lows confirmed on the H4 timeframe, then watches the M15 chart for liquidity sweeps. A sweep is detected when price temporarily breaches a swing level and the closing price resolves beyond that level, triggering an automatic buy or sell entry.
Position sizing is derived from a fixed monetary risk, stop-loss distance in points, and tick value. This keeps per-trade risk consistent regardless of volatility or instrument specifics. Executed signals are annotated on-chart with arrows for audit and review.
Swing levels are stored in arrays and updated continuously. New H4 candles can confirm additional swing points, while M15 sweep events can invalidate existing levels. Helper routines handle candle data retrieval, array maintenance, and lot-size calculation. Example settings referenced include EUR/USD with range 21, SL 1...
๐ https://www.mql5.com/en/code/68951?utm_source=mql5.com.tg&utm_medium=message&utm_campaign=articles.codes.repost | https://www.mql5.com/en/quotes/overview?utm_source=mql5.com.tg&utm_medium=message&utm_campaign=articles.codes.repost |
#MQL5 #MT5 #EA
MQL5 Algo Trading
Apr 2, 2026, 03:01 PM
๐ท Photo
An Expert Advisor implements a moving average crossover with close-based confirmation. Long entries trigger when the fast MA crosses above the slow MA and the bar closes above the fast MA. Short entries trigger when the fast MA crosses below the slow MA and the bar closes below the fast MA.
Execution is evaluated on new bars to limit noise-driven churn. An optional multi-timeframe MA filter can be enabled to align entries with a higher-timeframe trend and reduce false positives.
Risk controls include configurable take profit and stop loss (both optional), a maximum lot cap, and an equity threshold gate. Exit logic can optionally close positions when price crosses back over the fast MA for adaptive trade management. Trades are isolated via a MagicNumber.
Backtests referenced EURUSD on D1 with fast/slow periods of 100/200, showing comparatively stable result...
๐ https://www.mql5.com/en/code/70916?utm_source=mql5.com.tg&utm_medium=message&utm_campaign=articles.codes.repost | https://www.mql5.com/en/economic-calendar?utm_source=mql5.com.tg&utm_medium=message&utm_campaign=articles.codes.repost |
#MQL5 #MT5 #EA
MQL5 Algo Trading
Apr 2, 2026, 03:01 PM
๐ท Photo
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.
๐ https://www.mql5.com/en/articles/9236?utm_source=mql5.com.tg&utm_medium=message&utm_campaign=articles.codes.repost | https://www.mql5.com/en/neurobook?utm_source=mql5.com.tg&utm_medium=message&utm_campaign=articles.codes.repost |
#MQL5 #MT5 #Indicator
MQL5 Algo Trading
Apr 2, 2026, 03:01 PM
๐ท Photo
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...
๐ https://www.mql5.com/en/code/70900?utm_source=mql5.com.tg&utm_medium=message&utm_campaign=articles.codes.repost | https://www.mql5.com/en/economic-calendar?utm_source=mql5.com.tg&utm_medium=message&utm_campaign=articles.codes.repost |
#MQL5 #MT5 #EA
MQL5 Algo Trading
Apr 2, 2026, 03:01 PM
๐ท Photo
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.
๐ https://www.mql5.com/en/code/70903?utm_source=mql5.com.tg&utm_medium=message&utm_campaign=articles.codes.repost | https://www.mql5.com/en/signals?utm_source=mql5.com.tg&utm_medium=message&utm_campaign=articles.codes.repost |
#MQL5 #MT5 #Indicator
MQL5 Algo Trading
Mar 29, 2026, 05:21 AM
๐ท Photo
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...
๐ https://www.mql5.com/en/code/70826?utm_source=mql5.com.tg&utm_medium=message&utm_campaign=articles.codes.repost | https://www.mql5.com/en/signals?utm_source=mql5.com.tg&utm_medium=message&utm_campaign=articles.codes.repost |
#MQL5 #MT5 #Indicator
MQL5 Algo Trading
Mar 29, 2026, 05:21 AM
๐ท Photo
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...
๐ https://www.mql5.com/en/code/70796?utm_source=mql5.com.tg&utm_medium=message&utm_campaign=articles.codes.repost | https://www.mql5.com/en/signals?utm_source=mql5.com.tg&utm_medium=message&utm_campaign=articles.codes.repost |
#MQL5 #MT5 #EA
MQL5 Algo Trading
Mar 29, 2026, 05:21 AM
๐ท Photo
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...
๐ https://www.mql5.com/en/code/69583?utm_source=mql5.com.tg&utm_medium=message&utm_campaign=articles.codes.repost | https://www.mql5.com/en/docs?utm_source=mql5.com.tg&utm_medium=message&utm_campaign=articles.codes.repost |
#MQL5 #MT5 #script
MQL5 Algo Trading
Mar 29, 2026, 05:21 AM
๐ท Photo
Part 8 folds the Optuna HPO system into the production training stack, resulting in one ModelDevelopmentPipeline that can run either sklearn search (Grid/RandomizedSearchCV) or Optuna via a single model_params flag.
The Optuna path jointly samples hyperparameters and sample-weight design (scheme, decay, linearity), adds early stopping with Hyperband pruning, and persists studies in SQLite for crash-safe resume. Primary vs secondary (meta-labeling) training is detected by the presence of side in events, which controls meta-feature generation and artifact naming.
Inference reliability is improved by storing the fitted column-dropping preprocessor (constant/duplicate removal) as step 0 of the final sklearn Pipeline, preventing silent feature misalignment.
Post-HPO ensembling supports sequential bootstrapped bagging to reduce correlated bags under overlapping tr...
๐ https://www.mql5.com/en/articles/21823?utm_source=mql5.com.tg&utm_medium=message&utm_campaign=articles.codes.repost | https://www.mql5.com/en/book?utm_source=mql5.com.tg&utm_medium=message&utm_campaign=articles.codes.repost |
#MQL5 #MT5 #Optuna
MQL5 Algo Trading
Mar 29, 2026, 05:21 AM
๐ท Photo
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.
๐ https://www.mql5.com/en/articles/17549?utm_source=mql5.com.tg&utm_medium=message&utm_campaign=articles.codes.repost | https://www.mql5.com/en/code?utm_source=mql5.com.tg&utm_medium=message&utm_campaign=articles.codes.repost |
#MQL5 #MT5 #AI
MQL5 Algo Trading
Mar 29, 2026, 05:21 AM
๐ท Photo
Part 9 builds a footprint order-flow indicator in MQL5 to expose what candlesticks hide: traded volume at each price level inside every bar, split into bid (selling) and ask (buying), plus per-level delta.
The design quantizes tick prices into configurable level bins, accumulates volumes per bar, computes max delta/total/bid/ask for normalization, then renders color-scaled volume text on a CCanvas overlay. Two views are supported: bid-vs-ask and delta+total, with optional diagonal imbalance highlighting to spot stacked aggression.
Rendering stays aligned with MT5 chart zoom/scroll by converting bar indexes and prices to pixels, while trendline-based candles update in real time. Practical use: identify absorption, low-volume nodes, POC-style levels, and delta divergence for trade context and strategy logic.
๐ https://www.mql5.com/en/articles/21825?utm_source=mql5.com.tg&utm_medium=message&utm_campaign=articles.codes.repost | https://www.mql5.com/en/vps?utm_source=mql5.com.tg&utm_medium=message&utm_campaign=articles.codes.repost |
#MQL5 #MT5 #AlgoTrading
MQL5 Algo Trading
Mar 29, 2026, 05:21 AM
๐ท Photo
Battle Royale Optimizer (BRO) is a game-inspired metaheuristic that reframes population search as competition rather than cooperation. Each candidate solution โduelsโ its nearest neighbor; the better one resets damage, the worse one gains damage and shifts toward the current global best.
Exploration is enforced by elimination: once damage crosses a threshold, the solution is discarded and replaced with a new random candidate, preventing stagnation. Exploitation is strengthened by periodically shrinking the feasible bounds around the best solution using per-dimension standard deviation, with a delta schedule that controls how often contraction occurs.
The MQL5 implementation organizes this as a C_AO_BRO class with neighbor search, Euclidean distance, damage tracking, and boundary shrinking. Tests show strong performance on continuous landscapes (Hil...
๐ https://www.mql5.com/en/articles/17688?utm_source=mql5.com.tg&utm_medium=message&utm_campaign=articles.codes.repost | https://www.mql5.com/en/forum?utm_source=mql5.com.tg&utm_medium=message&utm_campaign=articles.codes.repost |
#MQL5 #MT5 #AlgoTrading
MQL5 Algo Trading
Mar 29, 2026, 05:21 AM
๐ท Photo
High-Performance JSON v3.5.0 targets low-latency JSON workloads in MT5 environments running LLM function-calling flows. Community JSON libraries showed two recurring constraints: frequent allocations and high serialisation latency, with recursion and temporary strings causing terminal stalls under load.
The library is rebuilt around a zero-allocation approach: parsing uses a tape backed by a contiguous long[] buffer, with direct serialisation into uchar[] to reduce intermediates. It adds hybrid numeric parsing using long accumulation and static Exp10 lookup tables, an iterative state machine to avoid recursion and stack overflow, plus SWAR scanning to process 8 bytes per cycle when skipping whitespace and long strings.
On x64 hardware with a 50,000-node payload, benchmark results report 137 ms parse vs 1540 ms, 264 ms serialisation vs 568 ms, and 401 ms ...
๐ https://www.mql5.com/en/code/68596?utm_source=mql5.com.tg&utm_medium=message&utm_campaign=articles.codes.repost | https://www.mql5.com/en/docs?utm_source=mql5.com.tg&utm_medium=message&utm_campaign=articles.codes.repost |
#MQL5 #MT5 #AI
MQL5 Algo Trading
Mar 29, 2026, 05:21 AM
๐ท Photo
Part 25 extends an MQL5 3D binomial viewer into a multi-distribution plotting module. Supported models include Poisson, normal, Weibull, gamma, and additional discrete and continuous families, with a header icon used to cycle types at runtime.
The design relies on a distribution enum and a single dispatch function that routes sample generation, histogram building, density computation, and UI labeling. Adding a new model becomes an enum entry plus a loader function.
Implementation details include per-distribution input groups, dedicated loaders that standardize seeding, sampling, binning, scaling to theoretical peaks, and statistics. Continuous histograms have forced-range variants for heavy tails (notably Cauchy). Titles, axes, and parameter panels update based on the active type.
๐ https://www.mql5.com/en/articles/21337?utm_source=mql5.com.tg&utm_medium=message&utm_campaign=articles.codes.repost | https://www.mql5.com/en/market?utm_source=mql5.com.tg&utm_medium=message&utm_campaign=articles.codes.repost |
#MQL5 #MT5 #AlgoTrading
MQL5 Algo Trading
Mar 29, 2026, 05:21 AM
๐ท Photo
Automated S/R tools often treat zones as static objects, creating analysis gaps after breakouts. A common case is resistance breaking on a strong bullish close, followed by a retest where the same level behaves as support. This is role reversal and it is typically handled manually.
A dynamic implementation in MQL5 can detect HTF base-impulse zones, track their upper/lower bounds, and evaluate each close for a confirmed breakout plus an impulse-range threshold scaled by zone height. When conditions match, the rectangle is replaced with the opposite role, color updated, and expiry extended without duplicating historical zones.
The result is an indicator that maintains a live map of supply/demand, supports retest workflows, and reduces subjective reclassification after structural breaks.
๐ https://www.mql5.com/en/articles/21677?utm_source=mql5.com.tg&utm_medium=message&utm_campaign=articles.codes.repost | https://www.mql5.com/en/forum?utm_source=mql5.com.tg&utm_medium=message&utm_campaign=articles.codes.repost |
#MQL5 #MT5 #Indicator