Download MetaTrader 5

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 Code Library for MetaTrader 4 - 5

The largest library features codes of free trading Expert Advisors, technical indicators and scripts. With the available applications you can trade in automated mode and analyze price dynamics. Use the library of codes to learn more about financial market sentiments.

Download free applications, test them and run in your MetaTrader 4. You can access them from the MetaTrader 4 platform and the MetaEditor development environment.

latest|best

The indicator displays in a separate subwindow of the chart the current symbol, Bid/Ask prices, the current swap, the expected deposit for long/short position as well as the floating spread for the symbol and the remaining time until the candle completion of the current timeframe... Let's see

Indicator PivotCustomTime.

Indicator AutoDayFibs.

ASCTrend1sig

Indicator T3 Bands.

Indicator Hi-Lo.

The Expert Advisor fills the missing bars on the chart with "dashes" (Dojis) — bars which have O=H=L=C.

The title contains the idea based on observations of the market regularities. It has been written for the CHF/USD pair.

The EA is based on Stochastic as well as CCI. It uses the fact that a reversal happens when the limits are broken, for cci - 120 and -120, for stoch - 70 and 30. Buys when the lower levels are broken, sells when the upper levels are broken.

The script outputs the information on symbols to a CSV file: swaps, spreads, stops, contracts.

Plotting the ROC indicators of two custom types (including Momentum) and periods in one window.

The script reads the list of deals from the account history, groups them by the sign specified in the parameters and outputs to a file.

The script is designed to transfer trades from the standard report of the MetaTrader 4 tester to the chart.

It is designed to create a non-standard symbol period based on the use of the standard period.

Trade - script sending BUY order and printing selected order data to the log.

The EA suggests the optimal lot size depending on the deposit size.

The 3_Otkat_Sys_v1.2 Expert Advisor. The system is configured for 5 hours (Moscow Time), does not trade on the nights of Monday and Friday.

The 1_Otkat_Sys Expert Advisor. The system is configured for 0 hours (Moscow Time), does not trade on the nights of Monday and Friday.

The MDAC indicator by Elder

The script closes all open positions and opens new one with the difference of Buy and Sell lots.

The SeNSetiVe indicator. The indicator displayed the market movement direction when the zero line is crossed.

The 3c_DM indicator.

The CandlesticksBW indicator. Plots bars by B. Williams.

The Commentator indicator analyzes and displays the possible action for a certain time interval.

The Ind-Widners Oscilator indicator. Draws the support and resistance levels.

The ind - Profitunity Bars indicator. Colors the bars in green, red and black.

Combined MA

The Bollinger Bands (BB) indicator is plotted at the distances equal to a certain number of standard deviations.

A simple alternative to the Alligator.

The indicator draws the linear regression line based on the closing prices of the last bars.

This script draws the price levels within a cycle (by Gann) between the significant Highs and Lows.

Indicator of channels on different timeframes.

EA that writes statistic data (Ask, Bid, Spread) in CSV file.

EA that can delete pending orders, close open orders and close terminal at certain time.

Indicator that automatically draws Fibo Retracement.

Displaying ATR (Average True Range) value in pips or points with option for setting multiplier.

Buy and Sell arrows based on exit from overbought and oversold region in Stochastic Oscillator.

An indicator for drawing all important Pivot Points including: "Classic", "Camarilla", "Woodie", "Floor", "Fibonacci", "Fibonacci_Retracement".

The indicator shows computer time resolution. Normally it is about 15-16 ms. This is important, for example, to copy positions from other MetaTrader 4.

Draw Elliott Waves (5 waves) manually.

123456789101112...82