EA-870 · Utility

Example1_LibCustomChart

This EA demonstrates the usage of the LibCustomChart.ex5 library for accessing custom chart data (e.g., tick, renko, range bars) via iCustomChart. It automatically detects whether a custom chart is present and falls back to standard chart data if not. On each tick it refreshes chart data, reads the last Close price, and prints a new bar alert.

Open the interactive view (equity curve, symbol switch)

Key facts

CategoryUtility
RiskSafe
Rating★★★☆☆
TypeUtility tool
TimeframesM1, M5, M15, M30, H1, H4, D1
IndicatorsClose Price
AuthorLizar

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 a utility example demonstrating how to use the LibCustomChart library. Its core logic initializes the custom chart connection via CustomChartInit in OnInit, refreshes data via CustomChartRefresh in OnTick, then uses CopyClose to read the last unfinished bar's close price and prints it. It also detects new bar formation via CustomChartNewBar and issues an alert. There are no entry conditions, exit conditions, position sizing, or money management logic — it is purely a data reading and printing demonstration tool. Its greatest value lies in showing how to seamlessly switch data sources between standard and custom charts without modifying the EA code.

Strengths

  • Demonstrates the standard calling pattern for custom chart library, making it easy for developers to learn
  • Automatically detects custom chart presence, enabling seamless switching between standard and custom chart data
  • Clean and concise code with detailed comments and documentation, easy to understand and extend

Weaknesses

  • Only a demonstration example with no actual trading functionality
  • No error recovery mechanism — if CustomChartRefresh keeps failing, the EA cannot function properly
  • Lacks detailed logging for CopyClose failures, making troubleshooting difficult

Possible improvements

  • Add more comprehensive data reading examples such as Open/High/Low/Volume and timestamps
  • Add error counting and reconnection mechanism to improve robustness when custom chart data source is unstable

Risk assessment

Overall risk: Safe

  • This EA does not execute any trading operations, no financial risk
  • If the custom chart data source is abnormal, the printed close price may be inaccurate

Evaluation scores

Code quality4.0
Strategy logic2.0
Risk management5.0
Robustness3.0
Innovation3.0
Documentation5.0
Overall3.7

Parameters

ParameterDefaultDescription
CustomChartInit()N/AInitialize custom chart connection; returns success status
CustomChartRefresh()N/ARefresh custom chart data; returns success status
CustomChartNewBar()N/ADetect whether a new bar has formed

Similar Utility 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.