Справка по MetaEditor → MCP and AI → Examples → Building Multi Timeframe Automated Strategies

Building Multi Timeframe Automated Strategies Using AI

Adapt file names, symbols, periods, risk limits, and requirements to your project or preferences. Preserve an unchanged baseline and test the algorithm in a demo environment before live use.
 
You are solely responsible for AI-generated content, AI-assisted actions, trading decisions, trading results, and any resulting losses.

Volatility-normalized timeframe ensemble:

Create a EURUSD EA using the latest 200 completed-bars on D1, H4, H1, and M15. Volatility normalize each trend vote, weight it by reliability over the latest 50 observations, require a configurable agreement score, execute on M15 closes, and display every vote, weight, timestamp, and risk.

Regime cascade strategy:

Create a EURUSD regime cascade EA using the latest 120 bars per timeframe. D1 sets broad regime, H4 detects transitions, H1 defines setup, and M5 times volatility re-expansion. Cancel stale setups whenever an upstream state changes and visualize the state path.

Multi-resolution compression breakout:

Create a EURUSD nested compression EA using 120 D1, H4, and H1 bars plus 500 M5 bars. Require D1 and H4 ranges below their 20th percentiles, H1 contraction inside H4 structure, and a closed M5 expansion with tick-volume confirmation. Size from structure and exit when expansion efficiency fails.

Cross-symbol macro context:

Create a EURUSD EA using D1 and H4 context from four configurable proxies, a dollar index, bond, equity, and volatility symbol, over their latest 120 bars, followed by an H1 setup and M15 entry. Skip unavailable or stale proxies, align different sessions, and cap correlated exposure.

Event-time and clock-time fusion:

Create a EURUSD EA that combines the latest 2,000 directional-change tick events with 200 completed H1 and H4 bars. Map each event to the latest available higher-timeframe state, prevent duplicate entries, and display threshold, overshoot, context, and source timestamps.

Timeframe disagreement strategy:

Create a EURUSD finite-state EA from 200 completed D1, H4, H1, and M15 bars. Classify early reversal, mature trend, pullback, and transition states from timeframe disagreement. Define one entry and exit per state, and log the path behind every trade.

Higher-timeframe trend and lower-timeframe entry:

Create a EURUSD EA that reads the latest 200 completed H4 bars and evaluates entries once per each of the latest 500 M5 bars. Align by timestamp, wait for synchronized buffers, manage handles safely, and log the exact H4 bar used by each M5 decision.

Reusable data router:

Generate a reusable data router for EURUSD and GBPUSD on M15, H1, and H4, holding 200 bars per series. Validate counts, BarsCalculated, timestamps, ordering, and freshness, and expose a readiness matrix that blocks strategy evaluation until all six series align.

Exact bar mapping:

Audit the multi-timeframe mapping in this EA mapping over one specified trading week. Replace index equivalence with timestamp mapping and trace 20 representative decisions, including a session gap and daylight saving boundary if present.

Look-ahead-bias test:

Inspect the latest 50 higher-timeframe dependent decisions. For each, prove that every referenced bar and indicator value had closed by the decision time, and add an assertion that rejects later data.

New-bar event control:

Refactor signal evaluation to run once per new M15 bar while protection remains tick responsive. Verify four cases. Ordinary new-bar, price gap, reconnect, and timeframe change. Prevent duplicate entries and preserve restart state.

Multiple symbols and timeframes:

Extend this framework to EURUSD, GBPUSD, and USDJPY on M15, H1, and H4 using 200 bars per series. Isolate state, normalize prices and volumes, throttle requests, and require a complete nine cell readiness matrix before trading.