Features
Sends notifications for trade opens and closes
Shows trade type (Buy/Sell) and lot size for new trades
Displays profit/loss for closed trades
Works in both live trading and strategy tester (sends to logs in tester)
Monitors last 2 hours of trading history
Prevents notification spam through basic throttling
Installation
Add this function to your Expert Advisor (EA) or script
Enable push notifications in your MetaTrader platform:
Tools → Options → Notifications
Check "Enable Push Notifications"
Configure MetaTrader mobile app on your phone
Important Notes
Account Compatibility :
Designed for netting accounts
Not suitable for hedging accounts (where multiple positions per symbol are allowed)
If you need hedging support, a modified version would be required
History Window :
Monitors the last 2 hours of trading history
Can be adjusted by changing the 7200 value (in seconds)
Throttling :
Prevents excessive notifications by limiting checks to once per second
Can be removed by deleting the time check if needed
Error Handling :
Includes basic error checking
Prints error messages to journal for troubleshooting
Common Issues and Solutions
No Notifications Received :
Verify push notifications are enabled in MT5
Check mobile app is properly configured
Ensure your broker allows push notifications
Missing Trades :
Check if the 2-hour history window is sufficient
Increase the history window if needed (7200 seconds)
Duplicate Notifications :
This shouldn't occur due to built-in checks
If it happens, verify you're not calling the function multiple times
Best Practices
Call this function in your EA's OnTick() function
Keep the MetaTrader mobile app installed and configured
Test in a demo account first
Monitor the Experts log for any error messages
#77531 Libraries
Why I wrote it My scalper trades two setups. A bullish order block and the bearish mirror of it. The Strategy Tester gave me one profit factor for both of them. I spent two weeks t...
#77488 Libraries
Every lot size calculator that assumes one pip is worth ten dollars is wrong on gold, wrong on indices, wrong on JPY crosses and wrong on any account not denominated in USD which i...
Ralph Ivan Simeon View detail → #77156 Libraries
A prop firm account runs under a second rulebook MetaTrader 5 knows nothing about: a maximum loss measured from a fixed starting balance, a daily limit that resets at an hour the b...
Bruno Nunes Myrrha Ribeiro View detail → © 2026 ESIMBA BOTX5 Trading involves risk. Always test thoroughly in a suitable environment before running live.
Privacy Policy Terms of Service Risk Disclosure