There are two sections of the Message Tab, Event and Output:
The following Events are available:
- EA_Started The Expert Advisor has started (called from the init function)
- EA_Stopped The Expert Advisor has stopped (called from the deinit function)
- TradeOpened A Trade on the account has opened.
- TradeClosed A Trade on the account has closed.
- AccountBalanceAbove Account balance threshold. value is entered using the Value button.
- AccountBalanceBelow Account balance threshold. value is entered using the Value button.
- AccountMarginAbove Account margin threshold. value is entered using the Value button.
- AccountMarginBelow Account margin threshold. value is entered using the Value button.
- The Write to Journal checkbox will send the Message data to the Journal tab of the MetaTrader Platform.
- The Show Alert checkbox will display the Alert window on the MetaTrader Platform.
- The Play Sound checkbox will play the specified sound. The sound options are provided from the MetaTrader Platform sound file.
- The Send Email checkbox will send an Email of the data from the MetaTrader Platform. The MetaTrader Platform must be configured to send emails.
- The Write on Chart checkbox will display the data on the price chart. The Message data can be added to other messages on the chart, or it can clear all other message data.
Note: The Journal Tab is useful for debugging a running EA. Messages can be used to determine if the execution of the EA is following the desired path and if the values of variables are correct.