EA-35056 · Utility

IsConnected

This EA monitors the terminal's connection status to the trade server in a loop, printing 'Online' or 'Offline' messages whenever the connection state changes. It uses CTerminalInfo to detect connectivity transitions and logs the timestamps of connection and disconnection events. It is purely a monitoring utility with no trading functionality.

Open the interactive view (equity curve, symbol switch)

Key facts

CategoryUtility
RiskSafe
Rating★☆☆☆☆
TypeUtility tool
TimeframesM1, M5, M15, M30, H1, H4, D1
IndicatorsCTerminalInfo
AuthorDark Ryd3r

Backtest results (H1, about 1 year)

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

Strategy analysis

This EA does not involve any trading strategy; it is purely a connection status monitoring tool. Its core logic runs a while loop polling the terminal's connection status every second, detecting changes by comparing the current state with the previous state. When a transition from offline to online is detected, it records the Connect_Start timestamp; when transitioning from online to offline, it records the Connect_Stop timestamp. The tool performs no entry or exit operations and involves no position sizing or money management. It uses a 'first' flag to handle state initialization on the first run, ensuring the initial state transition is correctly captured. The overall implementation is straightforward and serves only diagnostic and monitoring purposes.

Strengths

  • Simple and straightforward implementation with clear logic
  • Real-time monitoring of connection state changes helps diagnose network issues
  • Records connection and disconnection timestamps for post-incident network stability analysis

Weaknesses

  • Uses a blocking while loop with Sleep, occupying the EA thread and preventing other EA events from being processed
  • Print messages have confusing logic: prints 'Offline' when going online, and 'Online' when going offline
  • Does not use event-driven approach (e.g., OnTimer), resulting in inefficient resource utilization

Possible improvements

  • Replace the blocking while loop with an OnTimer event-driven approach to avoid occupying the EA thread
  • Fix the print message logic error to ensure correct Online/Offline output during state transitions

Risk assessment

Overall risk: Safe

  • The blocking loop prevents the EA from processing other events (like deinit), potentially making it difficult for the terminal to remove the EA normally
  • Pre_IsConnected is initialized to true, so if already connected on first check, no state change notification is triggered

Evaluation scores

Code quality2.0
Strategy logic1.0
Risk management5.0
Robustness2.0
Innovation1.0
Documentation1.0
Overall2.0

Parameters

ParameterDefaultDescription
Sleep interval1000msConnection status polling interval (ms)
firsttrueFirst run flag for state comparison initialization
Now_IsConnectedfalseCurrent connection status
Pre_IsConnectedtruePrevious connection status

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.