EA-49018 · Utility

New Candel - Bar Detector

This EA is a new bar detection utility that monitors M1 bar closing times and plays a sound alert when a new bar is about to close. It uses a flag-based mechanism to prevent multiple alerts per bar and provides on-chart commentary showing bar timing information.

Open the interactive view (equity curve, symbol switch)

Key facts

CategoryUtility
RiskSafe
Rating★★☆☆☆
TypeUtility tool
TimeframesM1
IndicatorsiTime
Authorby H A T Lakmal

Backtest results (H1, about 1 year)

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

Strategy analysis

The EA's strategy concept is to detect the formation of new M1 bars by comparing the current server time with the calculated closing time of the previous bar. The entry condition triggers when the current time exactly equals the calculated bar close time and the flag is false, playing a sound alert and setting the flag. Exit conditions are not applicable since this is a non-trading utility. Position sizing and money management are completely absent, as the EA does not execute any trades. The core logic relies on an exact time match between TimeCurrent() and the calculated close time, which is fragile because tick arrivals are irregular and the exact-second match may be missed. The flag reset mechanism correctly resets when the current time exceeds the close time, preparing for the next bar cycle.

Strengths

  • Simple and clear logic, easy to understand and use
  • Flag-based mechanism prevents multiple triggers per bar, well designed
  • On-chart commentary displays timing information for debugging and verification
  • Sound alert feature is practical for notifying traders of new bar arrivals
  • Code structure follows standard MQL5 EA template conventions

Weaknesses

  • Relies on exact second-level time match which can be completely missed during sparse tick periods
  • Hardcoded PERIOD_M1 timeframe with no flexibility to configure other periods
  • Global variable NewBarRecived resets on EA restart, potentially causing duplicate triggers or missed bars
  • Does not use the standard MQL5 new bar detection method (comparing iTime shifts), making it less robust
  • Multiple spelling errors (Recived vs Received, Falgs vs Flags) reflect poor code quality

Possible improvements

  • Adopt the standard new bar detection method: store the previous bar's open time and detect new bars when iTime(_Symbol,PERIOD,0) changes, avoiding reliance on exact time matching
  • Make the timeframe and sound file path configurable input parameters for greater flexibility and reusability

Risk assessment

Overall risk: Safe

  • The EA does not execute any trading operations, no financial risk
  • Unreliable time matching logic may cause missed notifications but will not cause financial loss

Evaluation scores

Code quality2.0
Strategy logic2.0
Risk management5.0
Robustness2.0
Innovation1.0
Documentation2.0
Overall2.3

Parameters

ParameterDefaultDescription
NewBarRecivedfalseNew bar flag indicating whether a new bar notification was received

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.