Connect_Disconnect_Sound_Alert
This EA monitors the terminal's connection status to the trade server and triggers sound alerts when the connection is established or lost. It tracks connection/disconnection timestamps but has all sound playback logic commented out, making it currently non-functional as an alert system.
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 connection status monitoring utility. Its core concept is polling CTerminalInfo.IsConnected() to detect changes in the terminal's connection to the trade server. Entry conditions are not applicable since the EA does not execute any trades. Exit conditions are similarly not applicable. Position sizing and money management are completely absent. The EA's logic uses a blocking while loop inside OnInit() with a 1-second polling interval to continuously check connection status, recording timestamps when state changes occur and (originally) playing corresponding sound files. However, all PlaySound() calls are commented out, rendering the alert functionality entirely non-operational. Furthermore, placing a blocking while loop inside OnInit() is a severe design flaw since it prevents the EA from completing its initialization properly.
Strengths
- Simple and practical concept — connection monitoring has real value for traders
- Uses the CTerminalInfo wrapper class to access connection status, following OOP design
- Records connection and disconnection timestamps for post-incident troubleshooting
Weaknesses
- All PlaySound() calls are commented out, rendering the core alert functionality completely non-functional
- Placing a blocking while loop inside OnInit() is a severe architectural error that prevents proper EA initialization
- Essential callback functions like OnTick() and OnDeinit() are completely missing
- Sound file resource declarations are also commented out, so even un-commenting PlaySound would not work
- Sleep(1000) inside an OnInit loop occupies the thread and may cause terminal unresponsiveness
Possible improvements
- Move connection monitoring logic from OnInit() to OnTick() or use OnTimer() events to avoid blocking the initialization process
- Uncomment and fix the sound playback logic, and properly declare resource files or use terminal built-in sounds
Risk assessment
Overall risk: Safe
- The EA performs no trading operations, posing no financial risk
- The blocking OnInit loop may cause terminal sluggishness, indirectly affecting other EAs
Evaluation scores
Parameters
| Parameter | Default | Description |
|---|---|---|
first | true | First run flag to skip initial state change sound alert |
Now_IsConnected | false | Current connection status boolean |
Pre_IsConnected | true | Previous connection status boolean |
Connect_Start | 0 | Connection start timestamp |
Connect_Stop | 0 | Connection disconnect timestamp |
Similar Utility EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.