Watch how to download trading robots for free
Find us on Facebook!
Join our fan page
Access the CodeBase from your MetaTrader 5 terminal
Couldn't find the right code? Order it in the Freelance section
How to Write an Expert Advisor or an Indicator

MQL4 Source Codes of Scripts for MetaTrader 4 - 6

icon

Scripts are small applications that perform one-time actions. For example, you can delete all objects from a chart or place a set of orders for an open position. Find here hundreds of applications that can automate small analytical or trading functions.

Scripts are free to download and run in MetaTrader 4.

Submit your code
latest | best

This script can close all your open positions in your MetaTrader 4, or you can select different similar positions.

This set of scripts has been designed to scale-in your trades as price action runs in your favor. This will maximize profits due to proper pyramiding, decrease the impact of unprofitable trading decisions and in general, make your life easier.

Drag and drop wave counts.

Many developers face the same problem - how to get to the trading terminal sandbox without using unsafe DLLs. One of the easiest and safest method is to use standard Named Pipes that work as normal file operations.

Execute Script only one time and it will delete all pending orders i.e Limits and Stops by this script at once. No Need to run script for each order separately.

A simple script to quickly place letter/numbers on the chart for wave labeling (A, B, C or 1, 2, 3, etc)

Scripts to modify stop loss in buy or sell opened orders on current chart.

Calculates the profit from oppened trades if the Price reaches the dropped Price

Customizable Fibonacci Tool scripts to make these tools more informative on chart as per your needs.

Automatically does volume calculation based on percentage of desired account balance and enters instant or pending trades. Optional take profit is automatically at 1:1 with respect to SL.

A set of scripts to install and work with Gann fan. Custom fan has correct angles and is scale insensitive.

Scripts of pending, market orders, placing and removing stops.

The script (in the absence of communication) rescans the server, will make paging history, emulates the ticks for the indicators and experts.

Review the results of the work of your strategy (in history) by the hour.

This is a script to view a myfxbook's CSV statements file in MT4.

This is a "conceptual" script that uses the WinINet functions to load a HTTP page directly from mql4, without a C++ dll

Rewrites JForex csv data without the weekend candles and the seconds.

WatchDog sends an e-mail when things go wrong, an order has opened or closed, on requotes, on log errors, on server shut down... Just drag the script in a chart window.

Exports your history into a .csv file which can be read by excel or similar. You can sort your trades and see easily how much a certain EA won or lost.

These scripts will record and file a picture of the chart at the time of each trade executed with them.

This script is useful when you drop lines on chart and want to see the distance to current market price. You can drag line and see the distance in pips.

Just a simple script , that reads the HTML file a report , or detailed report , and draws a transaction from it on the chart

This script reads your unread GMail messages.

The script prints the week day and time.

Reads all available instruments and their characteristics and generates an HTML report. Positive Swaps are highlighted.

This script uses the Windows API to modify the "From:" and "To:" fields within the strategy tester according to user input. For this script the strategy tester should already be open. Tested on Windows 7 64 bit. If you are using another version of win

Drop the script on your chart to send a screenshot to twitpic with or without a message

This script will set your stoploss at the fractal level of your choosing. Money management built in helping take some of the guess work out of your trading.

Creates a report in HTML about all pairs and symbols, for example how many days ago a cross moving average appeard. Pairs with a last recent cross moving average at daily timeframe have a chance for a trend reversal which may be traded.

with some shortcuts i can operate with multiple objects very quickly, this script change the size, the color of line

The script quickly open warrants Market Execution/Instant Execution with a choice lot at risk%

Check a MetaQuotes Language 4 program for basic syntax errors like unbalanced braces, parentheses, brackets,.sin....

Check a MetaQuotes Language 4 program for basic syntax errors like unbalanced braces, parentheses, brackets,.single and double quote, and multi line comment symbol pairs.

Script closes all opened and pending positions.

TakeAllProfit

Plots price level and open positions from the IFR trading pages provided via the FXNews program offered to accounts registered with OANDA's FXTrade and FXGame platforms.

Drop Level Lines with the level value inserted above or below the line and the color changing automatically for bottom level or top level.

Draw several resistance and support lines as a "little segment line", differentiating the color of both types of line

Draws several resistance and support lines differentiating the color of both types of line by Drag and Drop a simple script.

Calculating the difference between the High and Low price to see the price range for every hour.

123456789