IndicatorParameters_Demo
This is a utility EA that monitors chart indicators for changes (additions/removals) and retrieves their parameter information using the IndicatorParameters() function. It listens for CHARTEVENT_CHART_CHANGE events, compares the current indicator list with the previous snapshot, and prints details about added or deleted indicators along with their input parameters.
Open the interactive view (equity curve, symbol switch)Key facts
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 chart indicator monitoring utility. It uses the OnChartEvent event listener mechanism to trigger detection logic when the chart changes. The core mechanism maintains two indicator_info struct arrays (new state and old state), comparing them through iteration to detect indicator additions or removals. When a newly added indicator is detected, it calls GetParametersInfo to retrieve the indicator type and all input parameters (including integer, double, and string parameter values), printing them to the log. Position sizing and money management are completely absent since it does not execute any trading operations. This tool is primarily used for debugging and development, helping developers understand the configuration of indicators attached to a chart.
Strengths
- Real-time monitoring of chart indicator changes, useful for debugging and developing indicator-related features
- Uses IndicatorParameters() to retrieve complete indicator parameter information, detailed and accurate
- Well-structured design with clear indicator_info struct encapsulation and good code readability
- Automatically prints parameter details when new indicators are added, very helpful for indicator configuration troubleshooting
Weaknesses
- Only triggers detection on CHARTEVENT_CHART_CHANGE, cannot capture indicator parameter modifications (e.g., when users change indicator settings)
- Indicator handles are not released with IndicatorRelease() when no longer needed, potentially causing resource leaks
- Lacks a graphical interface for display, only outputs information via Print, resulting in poor user experience
- No error handling for IndicatorParameters() call failures; invalid handles may cause crashes
Possible improvements
- Add IndicatorRelease() calls to release indicator handles that are no longer in use, preventing resource leaks
- Add error checking for IndicatorParameters() return values to prevent exceptions from invalid handles
- Add detection for indicator parameter changes (not just additions/removals) by comparing parameter content to discover modifications
Risk assessment
Overall risk: Safe
- Unreleased indicator handles may cause memory/resource leaks during long-running sessions
- Lack of error handling when calling IndicatorParameters() with invalid handles
Evaluation scores
Parameters
| Parameter | Default | Description |
|---|---|---|
CHARTEVENT_CHART_CHANGE | N/A (event-driven) | Chart change event triggers monitoring logic |
ind_info_new[] | N/A (runtime) | Current indicator information array |
ind_info_old[] | N/A (static) | Previous indicator information snapshot array |
Similar Utility EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.