ICT kill zones define time windows where higher activity is expected, expressed in New York local time: Asian 20:00-00:00, London 02:00-05:00, New York 07:00-10:00, and London Close 10:00-12:00. Each session window can be customized (HH:MM-HH:MM, NY time).
A common platform issue is broker server time versus New York time, including mismatched US and EU DST switch dates. The indicator converts candles to New York time so session boxes remain aligned year-round. Server clock handling supports Auto (reads terminal GMT offset), the typical βNew York + 7hβ forex server setup (GMT+2/GMT+3 with EU DST rules), or a fixed GMT offset.
It draws each kill zone box from high to low with labels, extends finished session highs/lows until traded through, and marks the 00:00 New York open as a dashed line. It can display recent trading days, supports M1-H1, and show...
π Read | AlgoBook | @mql5dev
A common platform issue is broker server time versus New York time, including mismatched US and EU DST switch dates. The indicator converts candles to New York time so session boxes remain aligned year-round. Server clock handling supports Auto (reads terminal GMT offset), the typical βNew York + 7hβ forex server setup (GMT+2/GMT+3 with EU DST rules), or a fixed GMT offset.
It draws each kill zone box from high to low with labels, extends finished session highs/lows until traded through, and marks the 00:00 New York open as a dashed line. It can display recent trading days, supports M1-H1, and show...
π Read | AlgoBook | @mql5dev
π13β€11π₯11π€©8β‘3
TesterStats.mqh computes Strategy Tester report statistics directly from deal history, including metrics not available via TesterStatistics(): Z-Score, AHPR, GHPR, LR Correlation, and LR Standard Error. Output can be used for custom optimization criteria or to match backtest report values on a live account.
Validation was done across 5 scenarios (EURUSD, USDJPY, XAUUSD; fixed lots and percent risk; with and without TesterWithdrawal) by comparing 44 fields against TesterStatistics() and the HTML report. With β1 minute OHLCβ and βEvery tickβ, all 44 matched. With βEvery tick based on real ticksβ, equity is sampled less frequently, producing equity drawdown 0.05%β0.26% deeper, while other values remained identical.
Report rules implemented: 0.00 result counts as profit; post-start deposits/withdrawals excluded from balance drawdown; equity drawdown re...
π Read | Calendar | @mql5dev
Validation was done across 5 scenarios (EURUSD, USDJPY, XAUUSD; fixed lots and percent risk; with and without TesterWithdrawal) by comparing 44 fields against TesterStatistics() and the HTML report. With β1 minute OHLCβ and βEvery tickβ, all 44 matched. With βEvery tick based on real ticksβ, equity is sampled less frequently, producing equity drawdown 0.05%β0.26% deeper, while other values remained identical.
Report rules implemented: 0.00 result counts as profit; post-start deposits/withdrawals excluded from balance drawdown; equity drawdown re...
π Read | Calendar | @mql5dev
π16β€10π₯8π€©6
LLM-driven trading in MetaTrader breaks quickly when the EA only asks for BUY/SELL. Practical constraints include M15βH1 operation, 30β90s inference latency, upcoming news within 10 minutes, max 3 open positions, and ~1% risk per trade.
A workable design separates thinking from execution and enforces sequential filters: Signal β News β Risk. The MQL5 EA becomes pure I/O on new-bar events, while a local Python server (LangChain) handles indicators, agents, and SQLite logging with decision_id plus a RESULT feedback loop.
Transport runs over a persistent local WebSocket on 127.0.0.1:8977 using a small command set (ANALYZE, RESULT, MEM_STATUS, STATUS, STOP) with separate long/short timeouts. Every decision, including hold, is recorded, and closed-trade PnL (with swap/commission) is returned to update agent_stats.
π Read | CodeBase | @mql5dev
A workable design separates thinking from execution and enforces sequential filters: Signal β News β Risk. The MQL5 EA becomes pure I/O on new-bar events, while a local Python server (LangChain) handles indicators, agents, and SQLite logging with decision_id plus a RESULT feedback loop.
Transport runs over a persistent local WebSocket on 127.0.0.1:8977 using a small command set (ANALYZE, RESULT, MEM_STATUS, STATUS, STOP) with separate long/short timeouts. Every decision, including hold, is recorded, and closed-trade PnL (with swap/commission) is returned to update agent_stats.
π Read | CodeBase | @mql5dev
β€14π14π₯9π€©7π2π2π€1
RAFT is adapted from optical-flow estimation to market time series by treating prices as continuous motion, focusing on direction and strength rather than isolated bars. Its recurrent refinement loop repeatedly updates the state, staying stable during volatility and regime shifts.
The implementation reframes RAFTβs correlation space into a temporal pyramid: multiscale correlations are computed along the time axis to capture both microstructure noise and longer trends. Recent state stacks replace a single initial state to preserve momentum and inertia.
On the MT5 side, a CNeuronMultiScaleStackCorrelation component extends stack correlation with OpenCL-backed aggregation, matrix products sized by (stackSizeΓlevels), and optional activation. A dedicated backward path propagates gradients through both matmul and time aggregation, keeping training intact while remaini...
π Read | Calendar | @mql5dev
The implementation reframes RAFTβs correlation space into a temporal pyramid: multiscale correlations are computed along the time axis to capture both microstructure noise and longer trends. Recent state stacks replace a single initial state to preserve momentum and inertia.
On the MT5 side, a CNeuronMultiScaleStackCorrelation component extends stack correlation with OpenCL-backed aggregation, matrix products sized by (stackSizeΓlevels), and optional activation. A dedicated backward path propagates gradients through both matmul and time aggregation, keeping training intact while remaini...
π Read | Calendar | @mql5dev
β€18π15π€©12π₯8β2
Session-filtered EAs often fail silently around DST. TimeCurrent() is broker server time, shifted by the broker, and it updates only on ticks. A hardcoded βLondon 10:00 serverβ can become one hour early or late after clock changes, with no Experts log errors.
The risk peaks when US and EU DST calendars diverge. US: second Sunday in March to first Sunday in November. EU: last Sunday in March to last Sunday in October. The mismatch windows are 2β3 weeks in spring and 1 week in late October, changing London/New York spacing from 5 hours to 4.
A practical fix is calendar-based offset calculation that works identically live and in Strategy Tester, where TimeGMT() equals server time. Build an include that computes broker DST state and converts UTC session definitions into broker-hour at runtime (London/New York/Tokyo), replacing fragile fixed-hour filters.
π Read | Quotes | @mql5dev
The risk peaks when US and EU DST calendars diverge. US: second Sunday in March to first Sunday in November. EU: last Sunday in March to last Sunday in October. The mismatch windows are 2β3 weeks in spring and 1 week in late October, changing London/New York spacing from 5 hours to 4.
A practical fix is calendar-based offset calculation that works identically live and in Strategy Tester, where TimeGMT() equals server time. Build an include that computes broker DST state and converts UTC session definitions into broker-hour at runtime (London/New York/Tokyo), replacing fragile fixed-hour filters.
π Read | Quotes | @mql5dev
π20β€18π₯15π€©14
MetaTrader 5 optimizations can βwinβ by fitting noise, especially when a sweep evaluates thousands of parameter sets on the same history. This article implements Bailey et al.βs Probability of Backtest Overfitting (PBO) using Combinatorially Symmetric Cross-Validation (CSCV) to quantify that risk and reject an optimization when PBO exceeds 5%.
Instead of a single in/out split, the history is partitioned into 16 contiguous blocks and evaluated across all 12,870 half/half block combinations. For each split, the best in-sample parameter set is selected, then its out-of-sample rank among all candidates is measured; PBO is the frequency that this choice falls into the bottom half.
The MT5 implementation focuses on practical correctness and speed: log returns for additivity, signals lagged by one bar to avoid look-ahead, data-driven threshold ranges via ...
π Read | CodeBase | @mql5dev
Instead of a single in/out split, the history is partitioned into 16 contiguous blocks and evaluated across all 12,870 half/half block combinations. For each split, the best in-sample parameter set is selected, then its out-of-sample rank among all candidates is measured; PBO is the frequency that this choice falls into the bottom half.
The MT5 implementation focuses on practical correctness and speed: log returns for additivity, signals lagged by one bar to avoid look-ahead, data-driven threshold ranges via ...
π Read | CodeBase | @mql5dev
π21π₯17β€14π€©13π1
Probability theory models data D given parameters ΞΈ via p(D|ΞΈ). Mathematical statistics inverts this: estimate ΞΈ from D. Bayesian inference treats ΞΈ as a random variable, updating prior P(ΞΈ) into posterior P(ΞΈ|D) using Bayesβ theorem, with todayβs posterior becoming tomorrowβs prior.
In the discrete case, hypotheses H1..Hk get priors P(Hi) and likelihoods P(D|Hi). Posteriors follow from P(Hi|D) β P(D|Hi)P(Hi), with normalization via total probability. A coin example shifts belief from 0.5 to 0.833 after one head.
For count data, a Poisson tick-rate model can combine an informative prior (e.g., mean 150) with new observations, using grid approximation, log-likelihoods, and logsumexp for numerical stability.
Continuous parameters replace sums with integrals, making evidence hard to compute at scale. Conjugate priors (e.g., beta-binomial) keep updates in closed ...
π Read | VPS | @mql5dev
In the discrete case, hypotheses H1..Hk get priors P(Hi) and likelihoods P(D|Hi). Posteriors follow from P(Hi|D) β P(D|Hi)P(Hi), with normalization via total probability. A coin example shifts belief from 0.5 to 0.833 after one head.
For count data, a Poisson tick-rate model can combine an informative prior (e.g., mean 150) with new observations, using grid approximation, log-likelihoods, and logsumexp for numerical stability.
Continuous parameters replace sums with integrals, making evidence hard to compute at scale. Conjugate priors (e.g., beta-binomial) keep updates in closed ...
π Read | VPS | @mql5dev
π29π₯21π€©15β€14
A PPO-based RL trading pipeline tested a behavioural-cloning loop that re-trains the policy from its own live demo trades. Over two months, models produced under heavier cloning degraded and shifted toward inaction, including cases where they stopped trading entirely.
Live decisions were logged as (observation, action) with outcome metadata. Cloning applied weighted cross-entropy after each rollout plus a two-epoch pre-training pass for final models. Weights came from trade R-multiples, spread across all steps in a trade.
Two failures surfaced. A feature-schema change invalidated most buffered episodes without purge. More materially, after usable episodes appeared, final-model evaluation showed higher Hold shares, far fewer Buy/Sell actions, more negative Sharpes, and 12 models that never traded. Trials using only the light callback did not show the same s...
π Read | Docs | @mql5dev
Live decisions were logged as (observation, action) with outcome metadata. Cloning applied weighted cross-entropy after each rollout plus a two-epoch pre-training pass for final models. Weights came from trade R-multiples, spread across all steps in a trade.
Two failures surfaced. A feature-schema change invalidated most buffered episodes without purge. More materially, after usable episodes appeared, final-model evaluation showed higher Hold shares, far fewer Buy/Sell actions, more negative Sharpes, and 12 models that never traded. Trials using only the light callback did not show the same s...
π Read | Docs | @mql5dev
π26π₯25π€©19β€12
Classic volatility indicators (EWMA, ATR, GARCH) collapse price action into squared returns, so a steady selloff and a noisy range can look identical. This article implements the GuyonβLekeufack path-dependent volatility model in MQL5, explicitly retaining direction.
The model predicts volatility from two streaming features: a trend term (kernel-weighted signed returns) and an activity term (kernel-weighted squared returns). Both use a two-timescale exponential mixture (fast/slow half-lives). The per-bar update is O(1): four accumulators, cached decays, no lookback arrays or matrix work.
Calibration splits the problem: a simplex searches six kernel parameters while linear regression solves the three coefficients exactly, with leakage-safe, chronological out-of-sample testing against EWMA and GARCH(1,1). Results show the trend component materially impr...
π Read | Docs | @mql5dev
The model predicts volatility from two streaming features: a trend term (kernel-weighted signed returns) and an activity term (kernel-weighted squared returns). Both use a two-timescale exponential mixture (fast/slow half-lives). The per-bar update is O(1): four accumulators, cached decays, no lookback arrays or matrix work.
Calibration splits the problem: a simplex searches six kernel parameters while linear regression solves the three coefficients exactly, with leakage-safe, chronological out-of-sample testing against EWMA and GARCH(1,1). Results show the trend component materially impr...
π Read | Docs | @mql5dev
β€85π29π€©27π₯23π¨βπ»4π2π1
Educational example of a trend-following Expert Advisor in MQL5, focused on structure and runtime safety. Signals are generated on closed bars and evaluated only once per new bar: BUY when fast MA crosses above slow MA (bar 2: fast β€ slow, bar 1: fast > slow), SELL on the inverse. The EA waits for the first new crossover after startup, maintains a single position, and reverses on an opposite signal.
Order logic includes free margin validation via OrderCalcMargin, lot normalization to symbol min/max/step, and SL/TP adjustment to SYMBOL_TRADE_STOPS_LEVEL. Execution applies a spread filter, slippage limit, and retries on requotes or price changes, but only until the signal bar ends. Indicator handles are released in OnDeinit, with English/Polish messages based on terminal language.
Runs only in Strategy Tester and on demo; live trading is blocked. Provided βas...
π Read | CodeBase | @mql5dev
Order logic includes free margin validation via OrderCalcMargin, lot normalization to symbol min/max/step, and SL/TP adjustment to SYMBOL_TRADE_STOPS_LEVEL. Execution applies a spread filter, slippage limit, and retries on requotes or price changes, but only until the signal bar ends. Indicator handles are released in OnDeinit, with English/Polish messages based on terminal language.
Runs only in Strategy Tester and on demo; live trading is blocked. Provided βas...
π Read | CodeBase | @mql5dev
β€21π€©7π4π₯2π2β1π1
Educational example of a trend-following Expert Advisor in MQL5, focused on structure and runtime safety. Signals are generated on closed bars and evaluated only once per new bar: BUY when fast MA crosses above slow MA (bar 2: fast β€ slow, bar 1: fast > slow), SELL on the inverse. The EA waits for the first new crossover after startup, maintains a single position, and reverses on an opposite signal.
Order logic includes free margin validation via OrderCalcMargin, lot normalization to symbol min/max/step, and SL/TP adjustment to SYMBOL_TRADE_STOPS_LEVEL. Execution applies a spread filter, slippage limit, and retries on requotes or price changes, but only until the signal bar ends. Indicator handles are released in OnDeinit, with English/Polish messages based on terminal language.
Runs only in Strategy Tester and on demo; live trading is blocked. Provided βas...
π Read | Docs | @mql5dev
Order logic includes free margin validation via OrderCalcMargin, lot normalization to symbol min/max/step, and SL/TP adjustment to SYMBOL_TRADE_STOPS_LEVEL. Execution applies a spread filter, slippage limit, and retries on requotes or price changes, but only until the signal bar ends. Indicator handles are released in OnDeinit, with English/Polish messages based on terminal language.
Runs only in Strategy Tester and on demo; live trading is blocked. Provided βas...
π Read | Docs | @mql5dev
β€21π9π€©5π₯4π2β1
Educational mean-reversion Expert Advisor built around Bollinger Bands, with an optional RSI filter. Entry logic uses two completed bars: BUY when bar 2 closes below the lower band and bar 1 returns inside the bands (optional RSI on bar 2 below 30). SELL mirrors this using the upper band (optional RSI above 70).
Exits trigger on a touch of the current middle band (BUY: Bid β₯ middle, SELL: Ask β€ middle) or Stop Loss. Trading hours restrict only new entries, including overnight windows such as 22:00β06:00; closing always remains active. An option is provided to force closing outside the time window. Max concurrent positions is configurable.
Implementation details include indicator handles with CopyBuffer validation, switchable filters, server-time windows crossing midnight, free margin/lot/stop-level checks, spread filtering, and order retry logic. Demo and S...
π Read | VPS | @mql5dev
Exits trigger on a touch of the current middle band (BUY: Bid β₯ middle, SELL: Ask β€ middle) or Stop Loss. Trading hours restrict only new entries, including overnight windows such as 22:00β06:00; closing always remains active. An option is provided to force closing outside the time window. Max concurrent positions is configurable.
Implementation details include indicator handles with CopyBuffer validation, switchable filters, server-time windows crossing midnight, free margin/lot/stop-level checks, spread filtering, and order retry logic. Demo and S...
π Read | VPS | @mql5dev
β€22π€©13π11π₯9π2π1π1
Educational breakout Expert Advisor using pending orders and a daily range built from M1 bars. After the configured range window (for example 00:00β07:00 server time), the EA calculates High/Low and places one set of orders per day: BuyStop above High with spread/shift, and SellStop below Low with shift. SL is set beyond the opposite side of the range, while TP is computed via a configurable risk/reward ratio.
On fill, the opposite pending order is deleted. Unfilled orders are removed at a cancel time, and an open position can be closed at a specified time. Breakout sides are skipped when price is already beyond the trigger level, and ranges outside min/max width are ignored. After terminal restart, order history is used to restore state and prevent duplicate daily placement.
The code demonstrates CTrade BuyStop/SellStop, broker distance adjustments for SL/...
π Read | Forum | @mql5dev
On fill, the opposite pending order is deleted. Unfilled orders are removed at a cancel time, and an open position can be closed at a specified time. Breakout sides are skipped when price is already beyond the trigger level, and ranges outside min/max width are ignored. After terminal restart, order history is used to restore state and prevent duplicate daily placement.
The code demonstrates CTrade BuyStop/SellStop, broker distance adjustments for SL/...
π Read | Forum | @mql5dev
π₯20π16β€15π€©5π€£3π2π1
Spread Monitor is a single-file MQL5 Expert Advisor that displays the current spread for the attached symbol in a chart-corner panel with color status.
The EA reads SYMBOL_SPREAD (points) on a throttled, user-defined interval and stores samples in a fixed-size rolling buffer. From this in-memory history it recalculates current, average, minimum, and maximum spread, and counts how many samples exceed a configurable warning level to quantify how often spreads are elevated.
The status row switches to red when the current spread is above the warning threshold and green otherwise. History resets when the EA is removed, the symbol changes, or the terminal restarts. Panel objects use a fixed name prefix, enabling clean removal on exit without touching unrelated chart objects.
No orders are placed, modified, or closed, and trading by other programs is not blocked. I...
π Read | Docs | @mql5dev
The EA reads SYMBOL_SPREAD (points) on a throttled, user-defined interval and stores samples in a fixed-size rolling buffer. From this in-memory history it recalculates current, average, minimum, and maximum spread, and counts how many samples exceed a configurable warning level to quantify how often spreads are elevated.
The status row switches to red when the current spread is above the warning threshold and green otherwise. History resets when the EA is removed, the symbol changes, or the terminal restarts. Panel objects use a fixed name prefix, enabling clean removal on exit without touching unrelated chart objects.
No orders are placed, modified, or closed, and trading by other programs is not blocked. I...
π Read | Docs | @mql5dev
π22β€19π₯11π€©9π€£2
PropGuard Lite is a risk guard for prop firm accounts (FTMO-style rules) and any MT5 setup that needs enforced loss limits. It never opens trades on live or demo charts; it monitors equity including floating P/L and acts only on risk events.
When a limit is hit, it closes positions (all or one magic number), oldest first, deletes pending orders, and keeps closing anything reopened by other EAs. Daily halts clear on the next trading day; max-loss halts persist until manually reset.
Daily loss can be based on initial capital or a day-start reference (balance or higher of balance/equity). Max loss is a percent of initial capital. A buffer triggers slightly early to allow for slippage. Day boundaries use a configurable reset hour and time zone offset.
State is restart-safe: references are rebuilt from deal history, halts are stored in terminal globals. Include...
π Read | Signals | @mql5dev
When a limit is hit, it closes positions (all or one magic number), oldest first, deletes pending orders, and keeps closing anything reopened by other EAs. Daily halts clear on the next trading day; max-loss halts persist until manually reset.
Daily loss can be based on initial capital or a day-start reference (balance or higher of balance/equity). Max loss is a percent of initial capital. A buffer triggers slightly early to allow for slippage. Day boundaries use a configurable reset hour and time zone offset.
State is restart-safe: references are rebuilt from deal history, halts are stored in terminal globals. Include...
π Read | Signals | @mql5dev
π₯10β€9π9π€©9
AccountGuard provides a single-header account lock for MT5 Expert Advisors, controlled via compile-time #define settings and embedded into the .ex5. Licensed accounts can be listed as login-only or server:login pairs, with flexible separators. Optional switches allow any demo account, a fixed expiry timestamp, and a Strategy Tester bypass for backtesting.
Integration uses AG_Init() in OnInit() and AG_Allowed() as a gate before any new orders, while existing exits and trailing logic continue to run. AG_Reason() supplies a concise lock message for panels or logs. Runtime inputs include a custom alert message and an internal self-test covering 32 scenarios.
Default behavior is fail-closed: empty lists, typos, expiry, or missing account data result in LOCKED, with automatic rechecks. Expiry uses server-derived time to reduce clock rollback abuse. No DLLs, WebReq...
π Read | Docs | @mql5dev
Integration uses AG_Init() in OnInit() and AG_Allowed() as a gate before any new orders, while existing exits and trailing logic continue to run. AG_Reason() supplies a concise lock message for panels or logs. Runtime inputs include a custom alert message and an internal self-test covering 32 scenarios.
Default behavior is fail-closed: empty lists, typos, expiry, or missing account data result in LOCKED, with automatic rechecks. Expiry uses server-derived time to reduce clock rollback abuse. No DLLs, WebReq...
π Read | Docs | @mql5dev
β€13π10π€©8π₯3π1
Strategy Tester does not cover live-chart conditions such as terminal restarts, EAs starting before account connect, multiple chart instances, server-side history changes, or chart button clicks. A demo-account bench is provided to validate these scenarios and emit a PASS/FAIL report.
LiveTestDriver.mq5 reads phase A/B/C from MQL5\Files\LiveTestBench\phase.txt, runs phase checks, then exits via TerminalClose(). Execution is blocked on non-demo accounts. ExampleDailyLock.mq5 is the EA under test, using global variables for persistence, enforcing one instance per account via GlobalVariableSetOnCondition, and exposing an Unlock button. ExampleDailyLock_DemoTest.mq5 builds a demo-only variant using DEMO_ONLY without modifying the EA source. run_live_test.ps1 writes startup config, launches a portable terminal per phase, and prints results.
Phase A validates start...
π Read | Freelance | @mql5dev
LiveTestDriver.mq5 reads phase A/B/C from MQL5\Files\LiveTestBench\phase.txt, runs phase checks, then exits via TerminalClose(). Execution is blocked on non-demo accounts. ExampleDailyLock.mq5 is the EA under test, using global variables for persistence, enforcing one instance per account via GlobalVariableSetOnCondition, and exposing an Unlock button. ExampleDailyLock_DemoTest.mq5 builds a demo-only variant using DEMO_ONLY without modifying the EA source. run_live_test.ps1 writes startup config, launches a portable terminal per phase, and prints results.
Phase A validates start...
π Read | Freelance | @mql5dev
β€11π10β‘2π₯2π€©2π¨βπ»1
TesterReport.mqh parses Strategy Tester reports saved as HTML (Backtest tab -> Report -> HTML) and exposes deals, reconstructed closed trades, and key summary figures for post-processing in MQL5. Typical uses include report comparison, portfolio aggregation, CSV export, and validation against account history.
Parsed settings include EA name, timeframe, currency, and initial deposit. Each Deals row is mapped to SReportDeal with time, ticket, symbol, type/direction, volume, price, commission, swap, profit, balance, and comment.
Closed trades (SReportTrade) are rebuilt because the HTML report has no position IDs. Each exit is matched against the oldest open entry on the same symbol with the opposite side. Partial closes and reversals generate multiple trades; entry commission is allocated pro-rata by closed volume. NetProfit() and balance drawdowns are com...
π Read | AppStore | @mql5dev
Parsed settings include EA name, timeframe, currency, and initial deposit. Each Deals row is mapped to SReportDeal with time, ticket, symbol, type/direction, volume, price, commission, swap, profit, balance, and comment.
Closed trades (SReportTrade) are rebuilt because the HTML report has no position IDs. Each exit is matched against the oldest open entry on the same symbol with the opposite side. Partial closes and reversals generate multiple trades; entry commission is allocated pro-rata by closed volume. NetProfit() and balance drawdowns are com...
π Read | AppStore | @mql5dev
π9β€7π₯2π€©2
A chart-side risk panel calculates position size before any order is sent, with explicit handling of broker volume rules.
For the active symbol it shows spread in points and the spread cost per 1.00 lot, plus point value per 1.00 lot derived from tick value and tick size for correct pricing on metals, indices, and non-USD crosses. It also prints the brokerβs min/step/max volume.
Risk can be set as % of balance, % of equity, or fixed account-currency amount. With a stop distance in points, it computes loss per 1.00 lot, the raw lot size, the lot rounded down to the volume step, and the actual money at risk after rounding.
Edge cases are made visible: when the raw lot is below broker minimum (risk cap cannot be respected), and when step rounding shifts real risk away from the requested value, with highlighting above a 10% gap. Read-only indicator: no ...
π Read | NeuroBook | @mql5dev
For the active symbol it shows spread in points and the spread cost per 1.00 lot, plus point value per 1.00 lot derived from tick value and tick size for correct pricing on metals, indices, and non-USD crosses. It also prints the brokerβs min/step/max volume.
Risk can be set as % of balance, % of equity, or fixed account-currency amount. With a stop distance in points, it computes loss per 1.00 lot, the raw lot size, the lot rounded down to the volume step, and the actual money at risk after rounding.
Edge cases are made visible: when the raw lot is below broker minimum (risk cap cannot be respected), and when step rounding shifts real risk away from the requested value, with highlighting above a 10% gap. Read-only indicator: no ...
π Read | NeuroBook | @mql5dev
β€5π5
PortfolioWeights.mqh adds portfolio-weight computation to MQL5 using matrix/vector types and no DLL. Inputs are return series per component, including symbols or daily PnL streams from multiple Expert Advisors.
Five long-only allocations are provided: InverseVolatility, RiskParity (cyclical coordinate descent), HierarchicalRiskParity using single-linkage on distance sqrt((1-corr)/2) with order[] output, MinimumVariance with optional per-component cap, and MaximumDiversification. Risk contributions per component are also reported.
Covariance estimation includes Ledoit-Wolf shrinkage, shrinking correlations toward zero based on optimal intensity on unit-variance scaled returns, improving stability when observations are limited relative to dimension. Minimum-variance and maximum-diversification are solved via active-set QP with bounds and one equality.
...
π Read | NeuroBook | @mql5dev
Five long-only allocations are provided: InverseVolatility, RiskParity (cyclical coordinate descent), HierarchicalRiskParity using single-linkage on distance sqrt((1-corr)/2) with order[] output, MinimumVariance with optional per-component cap, and MaximumDiversification. Risk contributions per component are also reported.
Covariance estimation includes Ledoit-Wolf shrinkage, shrinking correlations toward zero based on optimal intensity on unit-variance scaled returns, improving stability when observations are limited relative to dimension. Minimum-variance and maximum-diversification are solved via active-set QP with bounds and one equality.
...
π Read | NeuroBook | @mql5dev
β€6π5π€©1
ICT Model Tracker is a non-trading indicator that detects and measures a strict ICT setup sequence on any chart using closed bars only. It marks the liquidity sweep inside a killzone, the MSS with displacement and FVG (or iFVG), then the limit entry with SL/TP, and tracks each setup through expiry or outcome without repainting. Single file, no DLL.
A deliberately published negative baseline is included: US100.cash M5, Jan 2025 to Aug 2026, default settings averaged -0.05R per trade across 690 setups and 425 trades (profit factor 0.91), with no profitable configuration in the tested set. This is presented as model measurement rather than a coding issue, with independent replay matching events and stats.
Features include NY-time killzones with DST handling, multiple liquidity references, outcome labels (+R, -1R, EXP, MISS), and a stats panel segmented ...
π Read | Freelance | @mql5dev
A deliberately published negative baseline is included: US100.cash M5, Jan 2025 to Aug 2026, default settings averaged -0.05R per trade across 690 setups and 425 trades (profit factor 0.91), with no profitable configuration in the tested set. This is presented as model measurement rather than a coding issue, with independent replay matching events and stats.
Features include NY-time killzones with DST handling, multiple liquidity references, outcome labels (+R, -1R, EXP, MISS), and a stats panel segmented ...
π Read | Freelance | @mql5dev
π16β€7π₯2π¨βπ»2π1