Part 33 of the MQL5 series delves into integrating the Google Generative AI API with MetaTrader 5. This tutorial covers sending text-based queries, receiving intelligent responses, and managing API limits like queries per minute, requests per day, and tokens per minute.
Understanding rate limits in API usage is crucial. Requests per Minute (RPM) limit the number of API calls in a minute. Requests per Day (RPD) constrain daily interactions, while Tokens per Minute (TPM) track the computational cost per request. Strategies to optimize usage and maintain smooth performance include request bundling and response caching.
Generating an API key is essential before using the API. The key identifies your application and controls access, ensuring secure interaction with Google's servers.
Enable WebRequest in MetaTrader 5 by adding the API URL to the settings, allowing y...
π Read | CodeBase | @mql5dev
#MQL5 #MT5 #AI
Understanding rate limits in API usage is crucial. Requests per Minute (RPM) limit the number of API calls in a minute. Requests per Day (RPD) constrain daily interactions, while Tokens per Minute (TPM) track the computational cost per request. Strategies to optimize usage and maintain smooth performance include request bundling and response caching.
Generating an API key is essential before using the API. The key identifies your application and controls access, ensuring secure interaction with Google's servers.
Enable WebRequest in MetaTrader 5 by adding the API URL to the settings, allowing y...
π Read | CodeBase | @mql5dev
#MQL5 #MT5 #AI
β€58β10π€―2π1
A lightweight script estimates an exponent (power) factor that measures how closely historical price increments match random-walk scaling. Under the theoretical random walk, displacement grows with the square root of steps, corresponding to an exponent of 0.5. Real market data typically deviates due to non-normal increments and regime effects.
The estimated factor can be used to rescale increments toward a more uniform distribution, improving stability of volatility-sensitive processing in automated trading systems. It also supports instrument classification by βrandom-walknessβ with a single computed value.
Interpretation is straightforward: values near 0.5 or below often align with lower volatility and range behavior, while values above 0.5 indicate higher volatility and heavier tails. In practice this tends to separate mean-reversion candidates fr...
π Read | AlgoBook | @mql5dev
#MQL5 #MT5 #Indicator
The estimated factor can be used to rescale increments toward a more uniform distribution, improving stability of volatility-sensitive processing in automated trading systems. It also supports instrument classification by βrandom-walknessβ with a single computed value.
Interpretation is straightforward: values near 0.5 or below often align with lower volatility and range behavior, while values above 0.5 indicate higher volatility and heavier tails. In practice this tends to separate mean-reversion candidates fr...
π Read | AlgoBook | @mql5dev
#MQL5 #MT5 #Indicator
β€20β5π4π€―1π1π1
An MQL5 library brings ARCH/GARCH-style volatility modeling into MetaTrader 5 with a clean, composable design: conditional mean, volatility process, and residual distribution are separate components but estimated jointly through the mean-model interface.
Model setup is driven by a single ArchParameters struct that captures the time series, optional exogenous inputs, AR/HAR lag configuration (including non-overlapping HAR windows), volatility family selection, distribution choice (Normal, t, skew-t, GED), scaling checks, and GARCH p/o/q plus power.
Fitting minimizes log-likelihood using ALGLIBβs constrained optimizer, returning an ArchModelResult with parameters, covariance, residuals, in-sample conditional volatility, and diagnostics (t-stats, p-values, adjusted RΒ², standard errors).
Forecasting supports analytic, Monte Carlo simulation, and bootstra...
π Read | Quotes | @mql5dev
#MQL5 #MT5 #AlgoTrading
Model setup is driven by a single ArchParameters struct that captures the time series, optional exogenous inputs, AR/HAR lag configuration (including non-overlapping HAR windows), volatility family selection, distribution choice (Normal, t, skew-t, GED), scaling checks, and GARCH p/o/q plus power.
Fitting minimizes log-likelihood using ALGLIBβs constrained optimizer, returning an ArchModelResult with parameters, covariance, residuals, in-sample conditional volatility, and diagnostics (t-stats, p-values, adjusted RΒ², standard errors).
Forecasting supports analytic, Monte Carlo simulation, and bootstra...
π Read | Quotes | @mql5dev
#MQL5 #MT5 #AlgoTrading
β€34π4
Larry Williamsβ short-term swing points are turned from a chart concept into a testable MT5 system by encoding a strict three-bar pivot rule and structural filters. A swing low/high is confirmed only after bar close, using bars 1β3, with the middle bar as the candidate extreme.
Signal quality is improved by excluding pivots formed by outside bars (engulfing volatility) and setups involving inside bars (contraction/indecision). This keeps the EA focused on clearer exhaustion points.
The MQL5 Expert Advisor is designed for research: configurable trade direction, fixed or percent-risk sizing, exits by next-bar close or risk-reward take profit, and stop loss anchored to the swing bar extreme. Logic runs once per new bar, with modular functions for detection, validation, risk, and execution.
π Read | CodeBase | @mql5dev
#MQL5 #MT5 #EA
Signal quality is improved by excluding pivots formed by outside bars (engulfing volatility) and setups involving inside bars (contraction/indecision). This keeps the EA focused on clearer exhaustion points.
The MQL5 Expert Advisor is designed for research: configurable trade direction, fixed or percent-risk sizing, exits by next-bar close or risk-reward take profit, and stop loss anchored to the swing bar extreme. Logic runs once per new bar, with modular functions for detection, validation, risk, and execution.
π Read | CodeBase | @mql5dev
#MQL5 #MT5 #EA
β€34β4π2
Neuroboids Optimization Algorithm (NOA) reframes population-based optimization as many tiny neural agents. Each βneuroboidβ is a minimal two-layer network trained with Adam, using the current best candidate as a moving target rather than hard-coded swarm rules.
The loop is straightforward: random initialization, per-agent forward pass to propose a step, error vs. the best solution, backprop updates, then position updates with scaling to [-1, 1] and bounded resampling. A small elite-copy probability adds controlled exploitation while preserving diversity.
In benchmark tests (Hilly, Forest, Megacity), NOA reached about 45% of the maximum aggregated score for small to moderate dimensions, but becomes too slow at very high dimensionality (e.g., 1000 variables). Visual runs show fan-like movement patterns that reflect learned search directions across age...
π Read | CodeBase | @mql5dev
#MQL5 #MT5 #algorithm
The loop is straightforward: random initialization, per-agent forward pass to propose a step, error vs. the best solution, backprop updates, then position updates with scaling to [-1, 1] and bounded resampling. A small elite-copy probability adds controlled exploitation while preserving diversity.
In benchmark tests (Hilly, Forest, Megacity), NOA reached about 45% of the maximum aggregated score for small to moderate dimensions, but becomes too slow at very high dimensionality (e.g., 1000 variables). Visual runs show fan-like movement patterns that reflect learned search directions across age...
π Read | CodeBase | @mql5dev
#MQL5 #MT5 #algorithm
β€25π6π2π₯1
Sigma Score is an MT5 indicator that standardizes the latest barβs log return into a z-score, showing how many standard deviations it deviates from the recent mean. Values near zero reflect typical noise; readings beyond configurable bands (commonly Β±2) flag statistically unusual moves, with the caveat that real returns have heavier tails than a normal model.
The implementation focuses on practical MT5 engineering: one plot buffer, level lines at 0 and thresholds, and a rolling calculation in OnCalculate using prev_calculated for efficiency. It computes mean and variance inline (no extra arrays), skips invalid prices, uses EMPTY_VALUE for non-computable regions, and adds a small stdev guard to prevent divide-by-zero artifacts.
Traders can use extremes as context for mean reversion or momentum decisions, and as a risk meter when volatility regimes shift.
π Read | NeuroBook | @mql5dev
#MQL5 #MT5 #Indicator
The implementation focuses on practical MT5 engineering: one plot buffer, level lines at 0 and thresholds, and a rolling calculation in OnCalculate using prev_calculated for efficiency. It computes mean and variance inline (no extra arrays), skips invalid prices, uses EMPTY_VALUE for non-computable regions, and adds a small stdev guard to prevent divide-by-zero artifacts.
Traders can use extremes as context for mean reversion or momentum decisions, and as a risk meter when volatility regimes shift.
π Read | NeuroBook | @mql5dev
#MQL5 #MT5 #Indicator
β€62π5π5π3β2π€2π1
TelegramTradeNotify is a lightweight MT5 utility EA that pushes trade execution notifications to Telegram via the Bot API sendMessage endpoint.
Alerts are triggered on executed deals (TRADE_TRANSACTION_DEAL_ADD), with an optional BUY/SELL-only filter. Message formatting includes UTF-8 URL encoding for non-ASCII text, plus an option to disable link previews. Configuration is limited to bot token, chat ID, timeout, and a prefix.
Setup requires creating a Telegram bot and obtaining its token, then selecting a target chat ID, group ID, or @channelusername. In MT5, enable WebRequest for https://api.telegram.org under Tools β Options β Expert Advisors, then attach the EA to any chart and set InpBotToken and InpChatId.
If WebRequest fails, verify firewall/DNS rules and MT5 allowed URLs. Some VPS networks block Telegram traffic; a different route or relay may be r...
π Read | NeuroBook | @mql5dev
#MQL5 #MT5 #EA
Alerts are triggered on executed deals (TRADE_TRANSACTION_DEAL_ADD), with an optional BUY/SELL-only filter. Message formatting includes UTF-8 URL encoding for non-ASCII text, plus an option to disable link previews. Configuration is limited to bot token, chat ID, timeout, and a prefix.
Setup requires creating a Telegram bot and obtaining its token, then selecting a target chat ID, group ID, or @channelusername. In MT5, enable WebRequest for https://api.telegram.org under Tools β Options β Expert Advisors, then attach the EA to any chart and set InpBotToken and InpChatId.
If WebRequest fails, verify firewall/DNS rules and MT5 allowed URLs. Some VPS networks block Telegram traffic; a different route or relay may be r...
π Read | NeuroBook | @mql5dev
#MQL5 #MT5 #EA
β€29π₯6π2
Multivariate time series modeling remains constrained by multi-scale dependencies, nonlinear cross-variable interactions, preprocessing overhead, and long-sequence compute cost. Transformer attention scales poorly, while classical statistical models require heavy feature engineering and struggle with nonlinear structure.
Chimera proposes a 2D state space model applying linear transforms across both time and feature axes, with cross-dimensional transitions. Compact parameterization and adaptive discretization target seasonality, trends, and dynamic interactions, supporting forecasting, classification, and anomaly detection with lower compute.
An implementation path in MQL5 replaces diagonal A-matrices with fully trainable tensors, generates B/C/Ξ from input context, and offloads 2D-SSM forward/backward passes to OpenCL kernels for GPU-parallel execution.
π Read | Freelance | @mql5dev
#MQL5 #MT5 #AlgoTrading
Chimera proposes a 2D state space model applying linear transforms across both time and feature axes, with cross-dimensional transitions. Compact parameterization and adaptive discretization target seasonality, trends, and dynamic interactions, supporting forecasting, classification, and anomaly detection with lower compute.
An implementation path in MQL5 replaces diagonal A-matrices with fully trainable tensors, generates B/C/Ξ from input context, and offloads 2D-SSM forward/backward passes to OpenCL kernels for GPU-parallel execution.
π Read | Freelance | @mql5dev
#MQL5 #MT5 #AlgoTrading
β€27π3β2
Large-scale Forex testing (100k+ moves) revisits Fibonacci beyond classic retracements by measuring both price ratios and time ratios between pivot points, with statistical validation instead of visual chart fitting.
A Python + MetaTrader 5 pipeline generates Fibonacci ratios, extracts βsignificantβ swings via noise filtering and reversal/threshold logic, then matches adjacent-move relationships using tolerance bands rather than exact values.
Results show frequent clustering near 0.618/0.382/0.236 in price, plus non-random Fibonacci-like durations (e.g., 2β3β5 hours). The strongest signal is βtime resonanceβ: price and time ratios aligning at the same pivot, lifting forecast confidence to ~85β90% and delivering ~72% hit rate on high-probability setups across pairs and timeframes.
π Read | Quotes | @mql5dev
#MQL5 #MT5 #AlgoTrading
A Python + MetaTrader 5 pipeline generates Fibonacci ratios, extracts βsignificantβ swings via noise filtering and reversal/threshold logic, then matches adjacent-move relationships using tolerance bands rather than exact values.
Results show frequent clustering near 0.618/0.382/0.236 in price, plus non-random Fibonacci-like durations (e.g., 2β3β5 hours). The strongest signal is βtime resonanceβ: price and time ratios aligning at the same pivot, lifting forecast confidence to ~85β90% and delivering ~72% hit rate on high-probability setups across pairs and timeframes.
π Read | Quotes | @mql5dev
#MQL5 #MT5 #AlgoTrading
β€34π€―4π4
Part 4 extends an MQL5 indicator series with a Smart WaveTrend Crossover: two WaveTrend oscillators are used, one tuned for signal crossovers and one tuned for higher-level trend filtering.
The signal logic is based on crossovers between a fast and a smoothed WaveTrend line. Optional confirmation requires the crossover direction to match the trend oscillator state, reducing counter-trend alerts.
Implementation details include 23 buffers and 3 plots: DRAW_COLOR_CANDLES for trend-colored bars, plus DRAW_ARROW plots for buy/sell markers. Inputs cover channel/average/MA lengths for both oscillators, trend filter enablement, candle coloring, arrow colors, and point-based offset placement.
OnCalculate initializes buffers on first run, computes both oscillators per bar via a manual EMA helper, flags crossovers, applies trend state, and renders arrows accor...
π Read | VPS | @mql5dev
#MQL5 #MT5 #Indicator
The signal logic is based on crossovers between a fast and a smoothed WaveTrend line. Optional confirmation requires the crossover direction to match the trend oscillator state, reducing counter-trend alerts.
Implementation details include 23 buffers and 3 plots: DRAW_COLOR_CANDLES for trend-colored bars, plus DRAW_ARROW plots for buy/sell markers. Inputs cover channel/average/MA lengths for both oscillators, trend filter enablement, candle coloring, arrow colors, and point-based offset placement.
OnCalculate initializes buffers on first run, computes both oscillators per bar via a manual EMA helper, flags crossovers, applies trend state, and renders arrows accor...
π Read | VPS | @mql5dev
#MQL5 #MT5 #Indicator
β€21π₯4π4β2
Part 34 extends the WebRequest-to-Generative-AI work by adding an on-chart control panel, so prompts can be typed, sent, and responses viewed without leaving MetaTrader 5.
The article uses the Dialog control framework: include the Dialog library, create a global CAppDialog container, then build the panel with a chart ID, unique name, window index, pixel offsets, and size. Calling Run() is required for the panel to process user interactions.
It also covers lifecycle safety. On recompiles or timeframe changes, the EA reloads and the panel must be explicitly cleaned up via Destroy() in OnDeinit to prevent instability.
User input is captured with an editable text control: include the edit control header, create the input field, set dimensions, and attach it to the dialog so backend API code can consume the typed prompt.
π Read | Docs | @mql5dev
#MQL5 #MT5 #AI
The article uses the Dialog control framework: include the Dialog library, create a global CAppDialog container, then build the panel with a chart ID, unique name, window index, pixel offsets, and size. Calling Run() is required for the panel to process user interactions.
It also covers lifecycle safety. On recompiles or timeframe changes, the EA reloads and the panel must be explicitly cleaned up via Destroy() in OnDeinit to prevent instability.
User input is captured with an editable text control: include the edit control header, create the input field, set dimensions, and attach it to the dialog so backend API code can consume the typed prompt.
π Read | Docs | @mql5dev
#MQL5 #MT5 #AI
β€35π7π₯3β2π2
TrisWeb_Optimized is an MQL5 EA built around three-currency relationships (EURUSD, GBPUSD, EURJPY) and the pricing inconsistencies implied by synthetic cross rates. The design avoids indicator-driven prediction and focuses on quantifying imbalance, then managing exposure through a prebuilt grid.
Core components include modular OnTick processing, per-symbol grid spacing, adaptive lot sizing with pip-value normalization (including JPY specifics), session/time filters with daily resets, and basket-level exit based on net PnL including swaps and commissions. Order placement uses low-level execution controls, including configurable deviation.
The codebase is positioned as a practical reference for retail adaptation of institutional concepts such as correlation, statistical relationships, and execution-aware risk management, with optional extensions for Python a...
π Read | VPS | @mql5dev
#MQL5 #MT5 #EA
Core components include modular OnTick processing, per-symbol grid spacing, adaptive lot sizing with pip-value normalization (including JPY specifics), session/time filters with daily resets, and basket-level exit based on net PnL including swaps and commissions. Order placement uses low-level execution controls, including configurable deviation.
The codebase is positioned as a practical reference for retail adaptation of institutional concepts such as correlation, statistical relationships, and execution-aware risk management, with optional extensions for Python a...
π Read | VPS | @mql5dev
#MQL5 #MT5 #EA
β€35π7π3π3β‘1
MT5 development is event-driven: indicators/EAs react to terminal callbacks (init, tick, chart changes) rather than running linear code. Scripts canβt capture user events; choose the model based on needed interactivity and trading access.
π Read | CodeBase | @mql5dev
#MQL5 #MT5 #Indicator
π Read | CodeBase | @mql5dev
#MQL5 #MT5 #Indicator
β€41β6π4π3π2
A deviation indicator based on price momentum rather than raw price can be used as a computationally light alternative to classic standard deviation. The calculation targets minimal CPU load while keeping the output range broadly comparable to standard deviation values.
As with standard deviation, the method can be applied to inputs beyond price, since it measures dispersion of the chosen series. Interpretation remains similar: higher readings indicate greater variability in momentum, lower readings indicate tighter movement.
Usage is generally aligned with standard deviation-style workflows, including volatility filtering, regime detection, and threshold-based signal gating.
π Read | Signals | @mql5dev
#MQL4 #MT4 #Indicator
As with standard deviation, the method can be applied to inputs beyond price, since it measures dispersion of the chosen series. Interpretation remains similar: higher readings indicate greater variability in momentum, lower readings indicate tighter movement.
Usage is generally aligned with standard deviation-style workflows, including volatility filtering, regime detection, and threshold-based signal gating.
π Read | Signals | @mql5dev
#MQL4 #MT4 #Indicator
β€22β2π2
This article extends a Python MetaTrader 5 simulator toward full tester-style isolation by persisting historical ticks and bars locally instead of querying the terminal at runtime.
It tackles the core scaling problem: tick history is huge (millions of records for months), so data is collected in monthly chunks and stored as partitioned Parquet using Polars for efficient IO and lower RAM pressure. It also notes a practical constraint: available tick depth is limited by the brokerβs terminal cache.
On top of the storage layer, the simulator mirrors the MetaTrader5 Python API: tick/bar retrieval functions switch between live MT5 and local Parquet based on an IS_TESTER flag, with UTC-aware indexing for time-dependent calls.
Trading state APIs are overloaded to match MT5 semantics (namedtuple returns, symbol/ticket/group filters) for orders, positions...
π Read | VPS | @mql5dev
#MQL5 #MT5 #AlgoTrading
It tackles the core scaling problem: tick history is huge (millions of records for months), so data is collected in monthly chunks and stored as partitioned Parquet using Polars for efficient IO and lower RAM pressure. It also notes a practical constraint: available tick depth is limited by the brokerβs terminal cache.
On top of the storage layer, the simulator mirrors the MetaTrader5 Python API: tick/bar retrieval functions switch between live MT5 and local Parquet based on an IS_TESTER flag, with UTC-aware indexing for time-dependent calls.
Trading state APIs are overloaded to match MT5 semantics (namedtuple returns, symbol/ticket/group filters) for orders, positions...
π Read | VPS | @mql5dev
#MQL5 #MT5 #AlgoTrading
β€36π2π2π2
Larry Williamsβ volatility breakout is framed as a momentum trigger: when price expands beyond the prior dayβs normal range, it often continues in that direction. The article turns that idea into an objective, testable MT5 process by anchoring entries, stops, and targets to yesterdayβs range rather than guesswork.
Rules are minimal and strict: at the dayβs open, compute buy/sell βgatesβ as a user-defined fraction of the previous dayβs high-low range. Trade only if price reaches a gate; otherwise stand aside. Stops scale with the same range, and take-profit is set via a fixed riskβreward multiple. Only one position is allowed.
Implementation in MQL5 focuses on clean EA structure: CTrade for execution, enums for safe inputs, new-bar detection via iTime, and a struct to cache seven daily levels (range, entries, SL/TP) recalculated once per day for consistent b...
π Read | AlgoBook | @mql5dev
#MQL5 #MT5 #EA
Rules are minimal and strict: at the dayβs open, compute buy/sell βgatesβ as a user-defined fraction of the previous dayβs high-low range. Trade only if price reaches a gate; otherwise stand aside. Stops scale with the same range, and take-profit is set via a fixed riskβreward multiple. Only one position is allowed.
Implementation in MQL5 focuses on clean EA structure: CTrade for execution, enums for safe inputs, new-bar detection via iTime, and a struct to cache seven daily levels (range, entries, SL/TP) recalculated once per day for consistent b...
π Read | AlgoBook | @mql5dev
#MQL5 #MT5 #EA
β€33π3
Heikin-Ashi smoothing remains a practical way to reduce candle noise, but standalone HA signals can fail when isolated strong bars appear inside a broader countertrend move.
A stricter filter is added with EMA50 slope on close as the directional gate, plus EMA20 on high/low as short-term boundaries. Signals are accepted only when HA direction, EMA50 slope, and HA close breaking the EMA20 envelope all agree, with a prior-bar cross check around EMA50 to reduce repeats.
Implementation in MQL5 uses EMA indicator handles, tester-safe HA calculation fallback, strict object naming, and timestamp de-duplication. Cleanup releases handles and removes prefixed objects to avoid chart clutter and resource leaks.
π Read | AppStore | @mql5dev
#MQL5 #MT5 #Strategy
A stricter filter is added with EMA50 slope on close as the directional gate, plus EMA20 on high/low as short-term boundaries. Signals are accepted only when HA direction, EMA50 slope, and HA close breaking the EMA20 envelope all agree, with a prior-bar cross check around EMA50 to reduce repeats.
Implementation in MQL5 uses EMA indicator handles, tester-safe HA calculation fallback, strict object naming, and timestamp de-duplication. Cleanup releases handles and removes prefixed objects to avoid chart clutter and resource leaks.
π Read | AppStore | @mql5dev
#MQL5 #MT5 #Strategy
β€30π5π€£4π1
This article breaks down a practical way to reduce bad trades: treat higher timeframes (MN/W1/D1) as the source of direction, and view lower-timeframe swings as noise. The core workflow is marking key reaction zones (prior highs/lows), then confirming bias with price action shifts like a purge plus an engulfing/structure change.
The βTrend Kingβ MQL5 EA automates that discipline by only taking entries aligned with the detected trend. It combines SMA/EMA trend filters, purge + engulfing signal rules, volume confirmation, and a trailing stop to protect gains.
Key engineering details include strict parameterization (RR targets, lookback windows, multi-timeframe confirmation), 1% risk management, OnInit validation for safe configuration, and new-candle gating to avoid redundant intrabar decisions.
π Read | Forum | @mql5dev
#MQL5 #MT5 #EA
The βTrend Kingβ MQL5 EA automates that discipline by only taking entries aligned with the detected trend. It combines SMA/EMA trend filters, purge + engulfing signal rules, volume confirmation, and a trailing stop to protect gains.
Key engineering details include strict parameterization (RR targets, lookback windows, multi-timeframe confirmation), 1% risk management, OnInit validation for safe configuration, and new-candle gating to avoid redundant intrabar decisions.
π Read | Forum | @mql5dev
#MQL5 #MT5 #EA
β€31π4
A Python + MetaTrader 5 study compared real EURGBP to a synthetic cross (EURUSD/GBPUSD) over 12,593 M5 bars from 2025-01-14 to 2025-03-15.
Mean imbalance: -0.000026, stdev: 0.000070. Distribution was strongly non-normal (skew -9.33, kurtosis 160.69), with lag-1 autocorrelation at 0.5985, indicating persistence and occasional large negative outliers.
Session breakdown showed Europe had the lowest spread (~0.000005) and lowest imbalance volatility (0.000030). A mean-reversion setup using EMA and a 2-sigma threshold (0.000126) produced 24 European trades with net +0.006073, while Asia and US were negative under higher spread costs.
π Read | Signals | @mql5dev
#MQL5 #MT5 #AlgoTrading
Mean imbalance: -0.000026, stdev: 0.000070. Distribution was strongly non-normal (skew -9.33, kurtosis 160.69), with lag-1 autocorrelation at 0.5985, indicating persistence and occasional large negative outliers.
Session breakdown showed Europe had the lowest spread (~0.000005) and lowest imbalance volatility (0.000030). A mean-reversion setup using EMA and a 2-sigma threshold (0.000126) produced 24 European trades with net +0.006073, while Asia and US were negative under higher spread costs.
π Read | Signals | @mql5dev
#MQL5 #MT5 #AlgoTrading
β€24π9π€―3
Part 11 builds a MetaTrader 5 correlation matrix dashboard to quantify cross-asset relationships for portfolio design, hedging, and multi-symbol strategies. It supports Pearson (linear), Spearman (rank-based), and Kendall (order agreement), all computed on price deltas over a selectable timeframe and bar count.
Two visual modes are implemented: a standard grid using configurable thresholds plus p-value βstarsβ for statistical confidence, and a heatmap using color interpolation to reveal subtle correlation differences.
The MQL5 design emphasizes extensibility: symbol-list parsing with Market Watch validation, matrices for correlations and p-values, reusable CDF-based p-value functions, and event-driven UI controls for timeframe and mode switching with automatic refresh on new data.
π Read | Signals | @mql5dev
#MQL5 #MT5 #algorithm
Two visual modes are implemented: a standard grid using configurable thresholds plus p-value βstarsβ for statistical confidence, and a heatmap using color interpolation to reveal subtle correlation differences.
The MQL5 design emphasizes extensibility: symbol-list parsing with Market Watch validation, matrices for correlations and p-values, reusable CDF-based p-value functions, and event-driven UI controls for timeframe and mode switching with automatic refresh on new data.
π Read | Signals | @mql5dev
#MQL5 #MT5 #algorithm
β€28β‘4π1
Bollinger Bands often assume mean reversion, but performance shifts across regimes. A practical filter is RSI: take longs only on lower-band breaks with RSI oversold, and shorts only on upper-band breaks with RSI overbought.
A fixed EURUSD D1 backtest (Jan 2023βJan 2026) with tick modeling and randomized execution delay produced 14 trades. Win rate reached 64% with 4.37 expected payoff, but trade frequency was too low for systematic use.
Rule tweaks to boost activity raised trades to 29 but reduced net profit and increased drawdowns, indicating added noise.
Data was exported from MQL5 to CSV, then modeled in Python with time-series cross-validation. ARDRegression scored best and was exported to ONNX for EA inference, yet the equity curve worsened versus rule-based baselines.
π Read | VPS | @mql5dev
#MQL5 #MT5 #Indicator
A fixed EURUSD D1 backtest (Jan 2023βJan 2026) with tick modeling and randomized execution delay produced 14 trades. Win rate reached 64% with 4.37 expected payoff, but trade frequency was too low for systematic use.
Rule tweaks to boost activity raised trades to 29 but reduced net profit and increased drawdowns, indicating added noise.
Data was exported from MQL5 to CSV, then modeled in Python with time-series cross-validation. ARDRegression scored best and was exported to ONNX for EA inference, yet the equity curve worsened versus rule-based baselines.
π Read | VPS | @mql5dev
#MQL5 #MT5 #Indicator
β€31β7