Watch Dog - Expert Advisor Monitoring Script

Watch Dog - Expert Advisor Monitoring Script
Download ALL MT4 scripts (422)
YouTube Video Thumbnail



Similar MetaTrader Tools

Watch Dog - Expert Advisor Monitoring Script

Info

The Watch Dog - Expert Advisor Monitoring Script is a Script for MetaTrader 4 that watchdog is an expert advisor and system monitoring script that sends email alerts for various events and issues. Features:- Email alerts for order openings, closings, requotes, log errors, and server shutdown.

Usage

This tool is typically used for enhancing chart analysis and decision making.

Platform

This Script works exclusively on MetaTrader 4 (both build 600+ and newer versions).

Setup

Place the downloaded file in MQL4/Scripts folder via File ? Open Data Folder in MetaTrader 4.


How to Install and Use Watch Dog - Expert Advisor Monitoring Script

1. Installation: Move your script file into the MQL/Scripts directory and restart the platform.

2. Execution: Drag the script onto a chart; it will perform a one-time action, such as closing all open orders or clearing chart objects.

3. Editing: Use MetaEditor (F4) to modify code, click "Compile," and verify no errors appear in the terminal before running.

4. Removing: Scripts stop automatically, but you can remove them manually by right-clicking the chart and choosing "Remove Script."

Frequently Asked Questions

Q: How are scripts different from EAs? A: Scripts execute a single action and then stop; EAs monitor the market and trade continuously.

Q: Can I assign a hotkey to a script? A: Yes, right-click the script in the Navigator, select "Set Hotkey," and define your preferred keyboard shortcut.

Q: Why did my script stop? A: Scripts are designed to stop immediately after finishing their programmed command; this is normal behavior.

What this tool does

Watchdog is an expert advisor and system monitoring script that sends email alerts for various events and issues.

Typical Use Case

This Script excels in automated trading and technical analysis on MetaTrader 4.

Compatible Platform & Setup

This Script works on MetaTrader 4. Place the file in the MQL4/Scripts folder and restart the terminal.

Description & Settings

Related: trend change alert and email notification expert advisor - another powerful script for MetaTrader 4 traders.

Watchdog is an expert advisor and system monitoring script that sends email alerts for various events and issues.

Also recommended: e-v trailing by profit expert advisor - similar script with strong performance on MetaTrader 4.


Features:

- Email alerts for order openings, closings, requotes, log errors, and server shutdown.
- Customizable events and log-events for specific monitoring tasks.
- Pre-defined events for journal log errors, EA script changes, connectivity loss, and more.

Setup:

1. Adjust the basedir value to your MetaTrader installation path: basedir = "c:\program files\metatrader4\";

2. Optional: Set up a webspace with PHP support for the server alive-event (disabled by default).

Event Configuration:

The script is event-based, with each event defining a monitoring task. You can customize or add events in the init() function. For example, to add a log-event that searches the journal log for "error", uncomment and update the relevant lines in the script.

Pre-defined Events:

- wde_jl_deleted: Searches journal log for "order deleted" every minute.
- wde_jl_requote: Searchs journal log for "requote" every minute.
- wde_jl_failed: Searches journal log for "failed" every minute.
- wde_jl_ealoaded: Helper event.
- wde_jl_earemoved: Sends mail when an EA script is removed or loaded (1-minute check interval).
- wde_alive: Invokes a URL every 40 seconds (helper event).
- wde_connectivity: Sends mail when MetaTrader loses connection.
- wde_openclose: Triggers a wde_statemen-event when an order opens or closes.
- wde_statement: Sends hourly updates on active trades, closed trades, and account values.
- wde_error: Provides error information.

Optional: Alive-Event Setup

To use the alive-event, follow these steps:

- Install update.php, check.php, and timestamp.txt on a website with sendmail and PHP support.
- Make timestamp.txt writable.
- Enable the alive-event: wdc[wde_alive][wdc_enabled]=1.

You may also like: e-so trailing expert advisor - excellent alternative for script users on MetaTrader 4.

Source Code

/*=============================================================
 info:    watchdog - an ea monitoring script. watchdog alerting you when things go wrong! 
 name:    watchdog.mq4
 author:  erich pribitzer
 version: 1.2
 update:  2012-01-08 
 notes:   gmt bugfix
 version: 1.1
 update:  2012-01-01 
 notes:   ---

.......

Leave your opinion, ask a question, share some knowledge

Limitations & Risk Warning

  • This tool is provided for educational and testing purposes only.
  • Past performance does not guarantee future results.
  • Trading involves substantial risk of loss. Use on a demo account first.
  • Results may vary depending on market conditions, broker, and settings.
  • We recommend thorough backtesting and forward testing before using with real funds.
© ROBOTFX Free educational tools by RobotFX. Use entirely at your own risk; we are not liable for any financial losses incurred.