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 - 47

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

ALGLIB math function library (v. 3.5.0) ported to MQL4.

Time indicator displays broker time and local computer time on the chart.

Example of working with OBJ_EDIT graphic object.

Weekly and Monthly Pivot shows resistance and support lines of pivots using classic formula

This isn't an operating EA, but profit management EA.

Draws label of the chart symbol and Period. Any text size, color and position on chart.

Shows the distance to assumed stop with two lines located at a predetermined distance from the current price.

Alerts on New Bar. Alert options - 1: Popup Alert, 2: Sound, 3: Email, 4: Push Notification for iOS and Android.

Triggerlines ported from NinjaTrader to be used with existing strategy and to help identify key buying and selling areas.

Draws a Weekly Open Horizontal Line and Horizontal Target Line above and below the Weekly Open Line.

Example of working with OBJ_LABEL graphic object.

It uses 3 fast MAs to determine entries and exits as well in an event of a crossover.

This is the Expert Advisor with Money Management and signal selection. You can add your own signals in this EA very easily by just adjusting the function signals.

EURX=34.38805726 x [(EURUSD x 0.3155) + (EURGBP x 0.3056) + (EURJPY x 0.1891) + (EURCHF x 0.1113) + (EURSEK x 0.0785)]

Coensio Swing Trader makes it possible to trade semi-automatically using manually pre-defined support/resistance or breakout levels.

Indicator measures the momentary USD currency strength, using combined data from the following four USD pairs: EURUSD, GBPUSD, AUDUSD and USDJPY.

Best used on monthly candlestick charts with four decimal points to a pip (use the JPY version for other pairs). This EA calculates the likelihood of your desired range of pips being hit based on two years of past trading ranges and a statistical forecast

TRYBASK= 1 x [(USDTRY x 0.50) + (EURTRY x 0.50)]

Candle Closing Time Remaining (CCTR) is an indicator which displays the remaining time for an open candle to be closed.

Shows the Max and Min levels of the previos day and today's open price. Change the "up" and "dn" parameters to see the day candle.

The indicator shows the current market conditions.

The indicator shows the remaining candle time.

This scripts uploads data of open and pending trades to a webserver and with additional webscripting saves it to a database for further processing. May be a good basic for providing signals in your site.

this sideway or trend...confuse?? use this indicator

Specific support and resistance indicator is based on indicators MW_ZigZag.ex4 and High_Low v2.ex4.

English version of AllAmplitude.mq4 The original script was posted here: http://codebase.mql4.com/3852 . The output file will be stored in the MetaTrader 4\experts\files\ directory. The file name contains following information: "Symbol_Period---da

Trade 5min charts mostly EURUSD. Added news filter from Forex Factory and stops. Loads of versions inside. Good luck

You confuse where the next target? Use this indicator - it will show you where the next target.

With 3 settable parameters (currency pair, timeframe, and template) opens a new chart on your screen at the initalization period of the script.

EA for Trading on News event, will set BUY and SELL Stop (pending order) then will delete one pending order after open BUY/SELL occur (OCO) on specifed date and time.

Draws different color candles above and below MA lines. Supported MA methods: SMA, EMA, SMMA, WMA & TMA.

This Indicator draws different color candles above and below a Kijun Sen line.

Draws Tenkan and Kijun with Color Fill between 1. Price and Tenkan, 2. Price and Kijun, 3. Tenkan and Kijun and 4. No Fill.

The indicator draws 2 Moving Averges with different color filling.

Adds account information to chart: Profit, Balance, Equity, Free Margin, Margin and Margin Level %. On chart click hide/show account information. Show Profit only option.

Displays open position: Symbol + Lots + Points + Profit (Updated for MT4 Build 600)

Display up to six Times Zones. Hide Time Zones not required.

This indicator shows when to buy and sell in the right time..so you don't miss the train.

Tracking Variable Spreads with an Offline Chart

Timer is a break trough system.

1...404142434445464748495051525354...102