OrderNotify
Download scriptThis script is an automated monitoring tool designed for the MetaTrader 4 platform. Its primary purpose is to keep you informed of trading activity by sending real-time email notifications whenever a new trade is opened or an existing one is closed on your account.
How It Works
The script operates as a "listener" that constantly monitors your account's active positions. Here is the step-by-step logic it follows:
- Initial Startup: When you first run the script, it performs a quick check to record how many trades are currently open. This creates a baseline so that it doesn't send unnecessary notifications for trades that were already active before the script started.
- Real-Time Monitoring: The script continuously tracks the number of open orders. Every time the market updates (a "tick"), it compares the current number of open positions against the previous count.
- Detecting New Trades: If the script detects that the number of open positions has increased, it identifies that a new trade has been opened. It automatically gathers specific details about this new trade—such as the currency pair, the type of order (e.g., BUY or SELL), the volume (lots), and the current profit—and sends you an email alert.
- Detecting Closed Trades: Conversely, if the number of open positions decreases, the script recognizes that a trade has been closed. It then scans your trading history to find the most recent completed transaction and sends you an email summary including the same relevant details (symbol, order type, profit, etc.).
- Account Summary: Every notification sent to your email is enriched with your overall account status. This includes your account number, current balance, and total floating profit/loss in your specific currency, allowing you to see the "big picture" of your portfolio at a glance without having to open the trading platform.
Key Features
- Automated Tracking: You don't need to manually check your trades; the script pushes the information to your inbox as it happens.
- Detailed Reporting: Instead of just saying "a trade was closed," the script provides specific figures like profit, swap, and account balance.
- Smart Filtering: By comparing the "old" total to the "handle" (current) total, it ensures you only receive notifications for actual changes in your trading activity.
Orders Execution
Miscellaneous
10
Views
0
Downloads
0
Favorites
OrderNotify
ÿþ/ / + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
/ / | O r d e r N o t i f y . m q 4 |
/ / | 2 0 1 7 , T o m a s H r u b y / P a r b e s t s . r . o . |
/ / | h t t p : / / t o m a s h r u b y . c o m |
/ / + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
# p r o p e r t y c o p y r i g h t "