Setup
Before starting to use scripts, one has to set them up. Working parameters common for all scripts are stated in the terminal settings window. This window can be opened by the "Tools Options" menu command or by pressing of accelerating keys of Ctrl+O. To set up script parameters, one has to open the "Expert Advisors" tab.
Only five options influence the operation of scripts:
- Allow automated trading this option allows to enable or disable the performing of trade operations by Expert Advisors and scripts. If it is disabled, scripts and Expert Advisors will work, but they won't be able to trade. This limitation can be useful for testing the analytical capacity of an Expert Advisor in the real-time mode (not to be confused with testing of Expert Advisors on history data). Automated trading can also be allowed or disabled using button on the toolbar.
- Allow DLL imports
To have their functionalities enlarged, scripts can use DLLs. If this option is enabled, the libraries can be used without any limitations. If this option is disabled, no script will be able to use any external DLLs.
- Allow WebRequest for listed URL
The WebRequest() function in MQL4 is used for receiving and sending information to websites using GET and POST requests. To allow an MQL4 application to send such requests, enable this option and manually explicitly specify the URLs of trusted websites. For security reasons, the option is disabled on default.