EA-359 · Multi-Timeframe

EA_OBJPROP_CHART_ID

This EA is a utility that demonstrates how to create and manage OBJ_CHART objects (embedded charts) within an indicator subwindow. It displays a daily (D1) and H4 chart inside a custom subwindow indicator, each with its own Price Channel indicator attached. The EA does not open any trades; it purely showcases chart object manipulation and multi-timeframe chart embedding.

Open the interactive view (equity curve, symbol switch)

Key facts

RiskSafe
Rating★★☆☆☆
TypeUtility tool
TimeframesD1, H4
IndicatorsPrice Channel
AuthorMetaQuotes Software Corp.

Backtest results (H1, about 1 year)

Not backtested yet — this EA could not be converted automatically.

Strategy analysis

This EA is not a trading strategy but rather an MQL5 graphical object manipulation utility. Its core function is to embed charts of different timeframes within an indicator subwindow using OBJ_CHART objects, enabling multi-timeframe simultaneous display on a single screen. Entry conditions are not applicable since this EA does not execute any trading operations. Exit conditions are similarly not applicable. Position sizing is not involved as there are no opening positions. Money management does not exist either. The main technical points of the EA include: creating OBJ_CHART objects via ObjectCreate, setting chart properties (position, size, scale, timeframe) using ObjectSetInteger, obtaining the embedded chart handle through OBJPROP_CHART_ID, further configuring the embedded chart (background color, foreground, grid, shift) using ChartSetInteger/ChartSetDouble, and finally adding the Price Channel indicator to the embedded charts via iCustom and ChartIndicatorAdd.

Strengths

  • Demonstrates the complete creation and configuration flow of OBJ_CHART objects, highly valuable for learning MQL5 graphical programming
  • Implements multi-timeframe chart simultaneous display, enabling traders to monitor different timeframe market dynamics on one screen
  • Clean code structure with well-encapsulated CreateChartInSubwindow function and parameterized design for easy reuse and modification

Weaknesses

  • Does not execute any trading operations, serving only as a technical demonstration with limited practical utility
  • Object deletion code in OnDeinit is commented out, potentially leaving residual chart objects after EA removal
  • Hardcoded indicator paths and parameter values lack input configuration flexibility, unable to adapt to different user needs

Possible improvements

  • Uncomment the object deletion code in OnDeinit and add comprehensive resource cleanup logic to prevent residual graphical objects after EA removal
  • Convert hardcoded parameters (chart names, dimensions, indicator paths, etc.) into input parameters for enhanced flexibility and configurability

Risk assessment

Overall risk: Safe

  • Commented-out object deletion in OnDeinit may cause OBJ_CHART object accumulation and memory consumption if EA is repeatedly loaded and unloaded
  • Depends on external custom indicators 'Subwindow' and 'Price_Channel'; if these indicators are absent, initialization will partially fail

Evaluation scores

Code quality3.0
Strategy logic1.0
Risk management1.0
Robustness2.0
Innovation3.0
Documentation2.0
Overall2.0

Parameters

ParameterDefaultDescription
daily_chart0D1 embedded chart handle variable
H4_chart0H4 embedded chart handle variable
D1"daily"Name of D1 OBJ_CHART object
H4"H4"Name of H4 OBJ_CHART object
subwindow_handle0Subwindow indicator handle
subwindow_ID0Subwindow ID number
indicator_handle0Indicator handle variable

Similar Multi-Timeframe EAs

Backtests are historical simulations and do not guarantee future results. Not financial advice.

Get the weekly Arena report

One email a week: ranking changes, new signals and new research. No spam; unsubscribe any time.