Watch how to download trading robots for free
Find us on Telegram!
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 - 13

icon

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.

Submit your code

It's an expert to help any user to find better settings for FolowLine indicator. Expert works only with FolowLine indicator.

This expert uses iDoubleChannel indicator. You can use to make backtesting to find best settings for indicator.

It is an indicator of technical analysis that aims to assist every trader in his manual trades.

It is a manual trading system consisting of 5 indicators. We buy when all indicators are in blue, and we sell when all indicators are in red. Indicators auto turn chart in M5 time frame, there is a switch to skip it.

Simple utility that makes use of offline charts to facilitate training by enabling bar-by-bar display - both forward and backward, as well as reset to a pre-defined date/time.

Adaptive ATR

Detects intersections between MA3, MA20 and MA150.

It's a multi-currency grid and martingale system that can trade all input pairs from one chart. The expert will close all orders for each pair using a profit level. The expert has the possibility to trade up to 100 pairs. It's a grid, hedging and averaging system. For more information, please visit product's page https://www.mql5.com/en/market/product/30282

NewsReleaseEA is an expert to trade about economic news uses pending orders. For more information, please visit product's page: https://www.mql5.com/en/market/product/31590 Read how can to set GMT offset in my blog: https://www.mql5.com/en/blogs/post/732403

This Expert Advisor is a pure scalping system.

This Expert Advisor is a pure hedging system. The expert place and manage two market opposite orders. Runs perfectly on pairs with tight spread and low commission broker (commission plus spread equal or less than 0.5 pip). The code is available for testing and studying. For more information please visit the product's page: https://www.mql5.com/en/market/product/33295

Used to compare 2 currencies on one chart, the Original indicator will recenter its calculation on every bar, and hence the price will keep shifting up and down and so the historical relative values do not remain constant. This indicator was modified so that the 'center' or initial relative reference point stays fixed and does not update each bar. It will only reinitialize when the indicator is reloaded or settings are changed.

Currency Index that calculates evenly on all 7 major pairs. Can also change base currency. Based on No Nonsense Forex podcast.

Let say you have an EA and you want it to trade in between an interval of time but you do not have the source codes to modify the EA. This utility allows you to automatically enable or disable the automated trading button. You can use the codes as an EA, Indicator or script but I used as an EA. You can remove Ordersend command because I set it only for the codes to past the test but it is meaningless.

EA with candle size filter and scale on loss

Arrow trends by iBearsPower and iBullsPower indicator for MT4.

A Price Time correlation model is used for Trend and Reversal trading

Indicator Bears and Bulls Power for MT4 together in one separate window.

TraderTool is a tool/panel that will help any trader to perform trades quickly and easily. The product has been developed with user-friendliness and ease of use in mind. It has the ability to manage multiple types of orders, either placed by an Expert Advisor or manually. It also allows you to place orders in a single click. For more informations, you can visit the product's page: https://www.mql5.com/en/market/product/9509

Volatility ratio

Virtual Robot

Three Moving Averages Convergence/Divergence - Indicator for MT4

The code consists of lines created according to the opening, closing, low and high values of prices.

"Wedge pattern" naked trading price action EA draws 2 mini Trend Lines with "Fractals" on chart and trades with Wedge pattern strategy,has Trailing Stop Loss &Take Profit works with all time frames major forex pairs and stocks NASDAQ.

"Head and Shoulders" naked trading price action EA draws 2 mini Trend Lines with "Fractals" on chart and trades with "Head and Shoulders" strategy,has Trailing Stop Loss &Take Profit works with all time frames major forex pairs and stocks NASDAQ.

Divides whole levels into Halfs and Quarters.

Trend indicator

This EA doesn't need any indicator, just moving price action is necessary to operate.

Expert adviser that use a custom modified Awesome Oscillator indicator

Shows what % the current ATR is relative to it's historical value.

"Triple top and triple bottom" naked trading price action EA draws 2 mini Trend Lines with "Fractals" on chart and trades with Triple top and triple bottom strategy,has Trailing Stop Loss &Take Profit works with all time frames major forex pairs and stocks NASDAQ.

"Broadening top" naked trading price action EA draws 2 mini Trend Lines with "Fractals" on chart and trades with Broadening top strategy, has Trailing Stop Loss &Take Profit works with all time frames major forex pairs and stocks NASDAQ.

"Reversals With Pin Bars" naked trading price action EA draws 2 mini Trend Lines with "Fractals" on chart and trades with the Reversals of Pin Bars,has Trailing Stop Loss &Take Profit works with all time frames major forex pairs and stocks NASDAQ.

Improved version inspired by RSI_candles by © mladen 2018 https://www.mql5.com/en/code/20968

Trending Indicator MACD with coloured Histogram to detect trend and retracements in that trend.

The script exports summary of closed trades grouped by each trading day to .csv file

All ingenious is simple!

Support and Resistance lines are used with the Standard Deviation indicator for generating trade signals.

"Cryptocurrency Divergence" EA draws 2 mini Trend Lines with "Fractals" on chart and trades with Divergence\Convergence of RSI & MACD indicators ,has Trailing Stop Loss &Take Profit works with all time frames major forex pairs, Crypto and stocks NASDAQ.

Advisor for a currency pair Gbp/Ghf. Algorithm - by opening the bar. Timeframe - H1.

1...67891011121314151617181920...102