left-cornerright-corner

What is a MT4 Script?

How to use it, load it, remove it and delete it.

Watch the video below and read the information below the video

What is a MT4 script?

A MT4 script is an automated program written in MQL4 and intended for a single performance of actions, for instance, delete all open deals now. Scripts stop running once they have completed their intended actions.

They differ from an EA or indicator in that it can not be used continuously and can not make trading decisions.

Script can be found using the MT4 Navigator and are great for automating routine trading actions such calculating the correct lots size for your next deal very quickly.

Enabling Scripts to run on your MT4 Platform

Depending on the nature of your scripts you will need to authorise th running of scripts by ticking the appropriate blocks in the "Expert Advisors" tab in the "Options" menu selection after selecting "Tools" in the main menu.

Loading a new Script into your MT4 platform

The MT4 may come with a few preloaded Scrips. It is likely that you would like to load a specific script with specific functionality into you own trading platform. Scripts are small files in a  mq4 format or in a ex4 format.

  1. Once you have downloaded the Script copy it into memory by right clicking and selecting "save".
  2. The open your MT4 platform and select "File" and the "Open Data Folder" from the dropdown menu.
  3. Open the "MQL4" folder and then open the "Scripts" folder
  4. Right click and paste the saved Script file into this folder and close the window.
  5. The open and close your MT4 platform and when going to the Scripts folder in the navigator you will notice your newly loaded script

As easy as that.

Loading a Script onto the chart

To be safe it is always good to load scripts onto a new chart that you are no using for actual trading. If you are going to use the script for a specific currency and timeframe open a new chart with the specific currency and timeframe setup.

Simply locate the script in the navigator window and drag it onto the chart you are going to use.

This is shown on the right.

It will normally open an input window requiring you to enter input which the script will use to complete the action it was intended to do.

After clicking on  "OK" the script will run and complete the actions it was designed to do.

It function is now complete and it will not run again or update. Normally you would merely need to reload the script onto the same chart to change the input and rerun the script.

 

Removing the script from your chart

To remove the script from your trading you can merely delete the chart it is on.

Alternatively when your right click you will be given a "Remove Script" selection.

 

Removing the script from MT4

To remove the script from your MT4 platform, right click on the script in theNavigator window and select delete. This will delete the script from your MT4 platform.

MT4 Scripts are great tools for automating routine tasks or accessing information not normally available. They can be fun to use and make Forex trading much easier and enjoyable.