MQL5.community

79.8K posts

MQL5.community banner
MQL5.community

MQL5.community

@mql5com

Automated trading on MetaTrader

Cyprus Katılım Mart 2010
1 Takip Edilen16K Takipçiler
MQL5.community
MQL5.community@mql5com·
Swap carry is often treated as background noise in intraday systems, but it can represent a sizable hidden cost, including triple charges midweek. On some symbols, a positive swap can offset spread and commission over time, making outcomes more predictable than direction-only trading. Classic swap locking uses two accounts with different swap tables on the same instrument, holding opposing positions. Best cases have positive swap on both sides; profit remains forecastable but still requires balance management between accounts. A more technical extension uses synthetic positions derived from correlated pairs (for example, EURJPY as EURUSD plus USDJPY) to replicate exposure while targeting different swap profiles. A utility concept is outlined: parse Market Watch symbols, normalize naming, build currency graphs, and search bounded-length “swap polygo... #MQL5 #MT5 #AlgoTrading #Strategy mql5.com/en/articles/91…
MQL5.community tweet media
English
0
0
0
50
MQL5.community
MQL5.community@mql5com·
An indicator module that auto-plots Fibonacci retracement and extension levels from the latest ZigZag swing high/low. Levels refresh automatically when new swing points are confirmed, keeping the grid aligned with current structure. Supported ratios include 0%, 23.6%, 38.2%, 50%, 61.8%, 78.6%, 100%, 127.2%, and 161.8%. Each level can be enabled or disabled independently, with optional price labels per level. A ZigZag connector line can also be shown for context. ZigZag parameters are configurable via depth, deviation, and backstep. Computation is optimized to process only on new bars, reducing redundant recalculation. Fibonacci ratios remain a core reference set for harmonic-pattern workflows. #MQL4 #MT4 #Indicator #Strategy mql5.com/en/code/70539?…
MQL5.community tweet media
English
0
0
1
65
MQL5.community
MQL5.community@mql5com·
Manual trendlines stay as the trader’s input, but an MT5 Expert Advisor takes over the tedious part: continuously watching those lines for meaningful price interactions. The workflow is built around explicitly synchronizing only the OBJ_TREND objects that matter. Once synced, the EA tracks each line’s lifecycle via OnChartEvent (create/modify/delete), keeps a structured internal list keyed by object name, and updates it when objects change. For monitoring, the EA converts the two anchor points (time/price) into a live reference level by computing slope and projecting the line’s current price each tick. It then classifies interactions such as approach, touch, break, or rejection and raises alerts plus on-chart status updates—useful for multi-chart trading without constant screen time. #MQL5 #MT5 #EA #Strategy mql5.com/en/articles/21…
MQL5.community tweet media
English
0
0
0
144
MQL5.community
MQL5.community@mql5com·
This article turns Hidden Smash Day detection into a testable MT5 trading system by separating pattern recognition (custom indicator buffers) from execution logic (Expert Advisor). Signals are only evaluated on new bars: a Hidden Smash at index 2 becomes tradable only after the next bar closes beyond its high/low, ensuring reproducible backtests. The EA adds context filters: configurable trade direction, optional Supertrend alignment, and weekday-based trading permissions. Risk controls are explicit: stop-loss can be set to the Hidden Smash bar extreme or ATR-based volatility distance, take profit uses a fixed reward-to-risk ratio, and sizing supports fixed lots or balance-based risk percent via OrderCalcProfit while respecting broker volume constraints. Execution enforces one position per magic number, with indicator handles and CTrade simplifying integrat... #MQL5 #MT5 #EA #Strategy mql5.com/en/articles/21…
MQL5.community tweet media
English
0
0
2
138
MQL5.community
MQL5.community@mql5com·
Standard HPO patterns break down on financial labels with overlap. GridSearchCV and RandomizedSearchCV waste trials, cannot stop after the first PurgedKFold fold, and do not persist state for crash recovery or parallel workers. The result is excess compute, biased validation from leakage, and fragile experiments. Optuna fits this domain when wired to a strict data contract: X/y aligned to event times, PurgedKFold as the only splitter, and separate weights for training (uniqueness) versus scoring (return attribution). A WeightedEstimator wrapper keeps weight computation inside the estimator so the objective stays focused on CV. A workable setup: TPE sampling, fold-level reporting for pruning, Hyperband allocation across trials, SQLite storage with resume, plus a suggester that maps sklearn distributions to trial.suggest_* and treats weight scheme and decay as... #MQL5 #MT5 #Optuna #HPO mql5.com/en/articles/20…
MQL5.community tweet media
English
0
0
0
109
MQL5.community
MQL5.community@mql5com·
Recurring M1–M15 entries fail when price hits H1/H4/daily liquidity. Manual multi-chart confirmation is slow and unreliable. Proposed solution: an MQL5 indicator with explicit inputs (ZoneTimeframe, LookbackBars, RatioMultiplier, ExtendBars, allowed reversal patterns, alert throttling) and measurable acceptance criteria. Detect HTF supply/demand via base→impulse scans, project zones onto the active chart, then alert only on zone re-entry plus a formal LTF reversal (engulfing, pin bar, inside-bar breakout). Architecture: Zone Detection, Visual Layer with persistent rectangles across timeframe changes, and Reaction Monitoring on closed bars. OnCalculate runs two-pass: populate historical arrows, then emit a single non-repeating real-time alert per zone using per-zone triggered flags and throttling. #MQL5 #MT5 #AlgoTrading #Indicator mql5.com/en/articles/21…
MQL5.community tweet media
English
0
0
1
114
MQL5.community
MQL5.community@mql5com·
On-balance volume (OBV) is a momentum indicator that uses volume flow to anticipate potential changes in price. It was developed by Joseph Granville and popularized in his 1963 work, Granville's New Key to Stock Market Profits. A common limitation of standard OBV is low signal quality. Direction can change frequently, and the line itself often lacks clear levels that can be referenced for breaks, pullbacks, or confirmation. One practical adjustment is to apply Donchian-style channels to the OBV series. The goal is to frame recent OBV extremes, reduce noise sensitivity, and make break conditions more explicit. Usage remains consistent with OBV. Channel breaks and color-state changes can be monitored as candidates for breakouts, retracements, and momentum shifts. #MQL5 #MT5 #Indicator #OBV mql5.com/en/code/37249?…
MQL5.community tweet media
English
0
0
2
142
MQL5.community
MQL5.community@mql5com·
Multivariate time series forecasting benefits from modeling both temporal structure and cross-channel dependencies, which is critical in finance where correlations shift during regime changes. Common baselines either process channels independently, concatenate everything, or cluster variables, each with clear tradeoffs. The DUET framework proposes dual clustering: Temporal Clustering (TCM) for heterogeneous time patterns and Channel Clustering (CCM) for frequency-domain channel selection, followed by a Fusion Module using masked attention and a prediction head. Reported results show consistent accuracy gains under variability. An MQL5 implementation can map MoE-style temporal encoders to convolutional layers for segmented parallelism, with Top-K noisy gating implemented via OpenCL kernels (forward TopKgates and backward TopKgatesGrad) to select active ex... #MQL5 #MT5 #ML #Forecasting mql5.com/en/articles/17…
MQL5.community tweet media
English
0
1
1
145
MQL5.community
MQL5.community@mql5com·
A Telegram notification bridge for MT5 trade activity, built with dual detection. Real-time events are handled via OnTradeTransaction, with a 2-second deal history scan as fallback. A deduplication layer tracks the last 500 deals in memory to prevent duplicate alerts when both paths report the same event. Covers trade open/close, SL/TP edits with old→new values, pending orders, reversals, deposits/withdrawals, connection state, and periodic account summaries (balance, equity, free margin, floating P/L, session P/L, day high/low equity, drawdown). Optional symbol, lot-size, and magic-number filters support multi-EA accounts. Setup requires a Telegram bot token, chat ID, starting the bot chat, and allowing WebRequest for api.telegram.org in MT5. Runs only on live/demo charts since Strategy Tester blocks network calls. Uses HTTPS POST via WebRequest wi... #MQL5 #MT5 #EA #Telegram mql5.com/en/code/70383?…
MQL5.community tweet media
English
0
0
3
141
MQL5.community
MQL5.community@mql5com·
CRT Indicator (STF) is a compact MQL5 indicator designed to objectively test “textbook” Candle Range Theory patterns directly on live charts. Implemented in under 100 lines, the focus is strict structure and unambiguous rules rather than discretionary pattern matching. The logic targets a three-candle formation with explicit conditions: directional shift, range expansion, midpoint placement, and a structure violation trigger. When detected, the originating candle range is projected immediately using simple trendlines. No buffers, no multi-timeframe inputs, no repaint behavior, and no visual clutter. Output is single-timeframe structural detection rendered in real time. Primary use is comparative analysis: how these rigid CRT definitions behave across symbols and timeframes when reduced to candle geometry only. This is a diagnostic tool, not a comple... #MQL5 #MT5 #Indicator #Strategy mql5.com/en/code/70379?…
MQL5.community tweet media
English
0
2
3
155
MQL5.community
MQL5.community@mql5com·
Part 2 extends a news filter beyond blocking entries by managing already-open positions during high-impact windows. The goal is to prevent premature SL/TP hits from spread widening and transient spikes without closing trades or altering strategy statistics. A controlled layer suspends SL/TP once per news window, stores original levels per ticket, and restores them deterministically when the window ends. Restoration is price-aware: if the market has not crossed stored levels, restore exactly; if crossed, place the nearest broker-valid level in front of price while respecting minimum stop distances. Implementation requires a per-ticket state container, a suspension flag to prevent repeated modifications, magic-number scoping, and explicit single-symbol behavior. Risk remains during suspension due to lack of hard stops; the window should be short. Persistent s... #MQL5 #MT5 #EA #Strategy mql5.com/en/articles/21…
MQL5.community tweet media
English
0
0
2
135
MQL5.community
MQL5.community@mql5com·
Hidden Smash Day setups are simple in concept but ambiguous on charts. For systematic trading, terms like “lower portion of the bar” and “confirmation” must be converted into numeric thresholds to stay deterministic in backtests and live runs. An MQL5 custom indicator can codify the Larry Williams rules: close location within the bar range, close relative to the prior close, and next-session confirmation (buy: next close above prior high; sell: next close below prior low). Signals can be marked immediately or only after confirmation via an input mode. Visual output stays minimal: sea green up arrows below buy bars and black down arrows above sell bars. The implementation emphasizes non-repainting logic, strict bar-complete evaluation, and consistent buffer indexing for historical and real-time updates. #MQL5 #MT5 #Indicator #Strategy mql5.com/en/articles/21…
MQL5.community tweet media
English
1
0
6
145
MQL5.community
MQL5.community@mql5com·
ATR Strength Index implements an RSI-style oscillator where the input series is ATR delta rather than price change. Each bar computes diff between consecutive iATR values, splits it into positive and negative components, and applies Wilder smoothing over RSI_period via PosBuffer and NegBuffer. An Invert switch flips the diff sign so the oscillator aligns with standard RSI direction conventions. Output is clamped to 0..100 with neutral handling when both smoothed legs are zero. The indicator draws in a separate window, limits processing via NumberOfBars, and adds adjustable upper/lower horizontal levels with custom colors using OBJ_HLINE. #MQL4 #MT4 #AI #EA mql5.com/en/code/70343?…
MQL5.community tweet media
English
0
0
1
146
MQL5.community
MQL5.community@mql5com·
This article extends a MetaTrader 5 chart-management library with explicit event support for chart objects, subwindows, and indicators. A new enumeration defines chart event types, and registered changes trigger custom events sent to the controlling chart, enabling deterministic event routing in the EA. A key implementation detail is reliable identification of removed windows/indicators. Indicator objects now store their chart subwindow index, and deleted charts, windows, and indicators are preserved in dedicated lists so handlers can query historical context after removal. The chart window and chart classes are updated to share these lists via pointers owned by the chart collection, avoiding duplication while enforcing read-only access outside the collection. Indicator handle lifecycle is corrected: handles are retained during use and released in de... #MQL5 #MT5 #Indicator #Strategy mql5.com/en/articles/93…
MQL5.community tweet media
English
0
1
0
165
MQL5.community
MQL5.community@mql5com·
An MT5 mean-reversion EA design based on dynamic price zones and momentum filtering. Supply/demand boundaries are derived from the highest high and lowest low over the last 48 candles, with entries triggered when price reaches a configurable buffer around these levels. Trend context is taken from a moving average, while RSI is used to reduce false breaks: BUY when price hits the lower zone with RSI below 40; SELL when price hits the upper zone with RSI above 55. Risk controls include balance-based position sizing using a fixed risk percentage, plus mandatory stop loss and take profit on every order. Break-even and trailing stop logic automate profit protection. Positions can also be closed early when RSI reaches extreme opposite readings. Operational features include an on-chart dashboard (RSI, spread, risk, magic number), detailed expert logs, zero compil... #MQL5 #MT5 #EA #Strategy mql5.com/en/code/68934?…
MQL5.community tweet media
English
0
0
2
197
MQL5.community
MQL5.community@mql5com·
Parameter persistence in MQL after terminal restart comes down to four storage options: terminal global variables, chart objects, order comments, and text files. Each has hard limits on type, scope, and lifetime. Terminal globals are cross-chart but only store double, so packing integers into 64 bits is sometimes required. Chart objects can hold state via hidden properties and survive via templates. Order comments are capped at 23 chars but can encode compact metadata for post-trade analytics and runtime routing. Text files remain the most flexible: Key=Value params per analyzer, per chart ID, restored on EA restart and only re-run on the next bar. External integration is typically file-based: JSON outbound, Key=Value inbound, plus optional WebRequest notifications to mobile. #MQL5 #MT5 #AlgoTrading #EA mql5.com/en/articles/93…
MQL5.community tweet media
English
2
0
1
212
MQL5.community
MQL5.community@mql5com·
ExMachina Prop Dashboard is an MT5 chart indicator focused on real-time compliance tracking for funded-account rules. It updates on every tick and keeps key risk limits visible without relying on delayed web dashboards or window switching. The tool provides prop-firm presets plus a full custom ruleset, covering daily loss limits, max drawdown variants (static, trailing high-water mark, end-of-day), profit targets, minimum trading days, and calendar deadlines. It reports current P&L in dollars and percent, remaining buffer before breach, and supports configurable day reset time to match broker rollover. Status logic summarizes progress as ON TRACK, AT RISK, TARGET HIT (days pending), PASSED, or FAILED (limit breach or time expiry). Alerts can trigger at a configurable threshold (default 80%) and on breach via popup, sound, push, or email. It monitors all ... #MQL5 #MT5 #Indicator #FTMO mql5.com/en/code/70268?…
MQL5.community tweet media
English
0
1
4
225
MQL5.community
MQL5.community@mql5com·
ExMachina Trade Pilot is an MT5 expert advisor focused on order execution and position lifecycle management from a single control panel. It targets common platform gaps: partial take-profits, automated breakeven, and trailing logic beyond fixed-point trails. The workflow consolidates risk-based lot sizing, SL/TP placement, and multi-stage exits. Up to three take-profit levels can be configured with independent close percentages; each hit triggers an automatic partial close with logging and live status tracking. Management tools include ATR-based, fixed-point, and previous-candle trailing with a minimum step, plus breakeven on a profit threshold with optional offset. One-click market and pending orders apply predefined offsets and SL/TP rules. Additional controls cover close-all, direction-based closes, pending cleanup, and a dashboard for spread, exposure, ... #MQL5 #MT5 #EA #Strategy mql5.com/en/code/70266?…
MQL5.community tweet media
English
0
0
5
221
MQL5.community
MQL5.community@mql5com·
The article shifts a retail stat-arb workflow from SQLite (OLTP) to DuckDB-backed analytics using Parquet files, keeping mean-reversion and sub-second HFT out of scope. The goal is faster research loops: qualify ideas in seconds before spending time on full MT5 EA backtests. It shows how to export an entire SQLite database or selected tables to Parquet via DuckDB, then query those files directly with SQL or Python’s lazy relational API. Key technical gains come from Parquet’s columnar layout, embedded min/max statistics, compression, and DuckDB’s zero-copy reads, which reduce I/O and skip irrelevant files. For scalable history storage, the plan is to denormalize price data and adopt Hive-style partitioning (source, asset class, ticker, timeframe, year, month) to keep datasets portable and easy to merge across brokers and providers. #MQL5 #MT5 #AlgoTrading #DuckDB mql5.com/en/articles/21…
MQL5.community tweet media
English
0
0
1
259
MQL5.community
MQL5.community@mql5com·
Quant research keeps producing backtests with high Sharpe, low drawdown, and immediate live failure. The main driver is overfitting through multiple channels, not a single mistake fixed by a basic train/test split. Common failure modes include data snooping across many candidates, curve-fitting to path-specific noise, and accumulated researcher degrees of freedom during iterative tuning. Three controls target different layers. Validation-within-Validation enforces outer training, inner validation, and a one-time final test, often with anchored walkforward. CPCV removes temporal leakage via purging and embargoing, then evaluates combinatorial OOS paths. CSCV audits selection with Probability of Backtest Overfitting, reporting how often the in-sample winner ranks poorly out-of-sample. #MQL5 #MT5 #AlgoTrading #overfit mql5.com/en/articles/21…
MQL5.community tweet media
English
1
0
3
197