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

MQL5 Source Code Library for MetaTrader 5 - 176

icon

This is the largest free source code library for MetaTrader 5 platform programs. Here you can find ready-made Expert Advisors, technical indicators, scripts and libraries. Use the code library when learning MQL5 language and develop your own automated trading applications based on the provided codes.

You can freely download and test published codes, as well as launch them in MetaTrader 5. The library is also available directly from MetaTrader 5 platform and MetaEditor development environment.

Submit your code

Ergodic Mean Deviation Index (MDI) Oscillator by William Blau.

Mean Deviation Index (MDI) by William Blau.

Stochastic Momentum Oscillator by William Blau.

Stochastic Momentum Index by William Blau.

Stochastic Momentum by William Blau.

Stochastic Oscillator by William Blau.

Stochastic Index Indicator (normalized smoothed q-period Stochastic) by William Blau.

Stochastic Indicator (smoothed q-period Stochastic) by William Blau.

Ergodic Oscillator by William Blau.

True Strength Index (TSI) indicator by William Blau.

Momentum Indicator by William Blau.

This Expert Advisor is a demo of working with OBJ_CHART objects as conventional charts. You can set custom color settings, attach indicators etc.

The strategy is following: when outer (outside) bar appears, it checks the fact of the inner bar breakthrough in trend direction and generates a signal to open position. A module of trade signals is compatible with the new version of MQL5 Wizard.

The Buy/Sell signals of the indicator are based on crossover of two moving averages with different periods.

This script reads all opened position and calculates their exposure for each currency.

The script converts the time, represented as datetime variable into the year, month, day, hour, minutes and seconds.

This indicator compares four types of regression (linear, quadratic, logarithmic and exponential) and chooses the one that best fits the data analyzed.

Kaufman Efficiency Ratio (also called "generalized fractal efficiency") according to Perry Kaufman books "Smarter Trading" and "New Trading Systems & Methods".

Kaufman Volatility indicator according to Perry Kaufman book "Smarter Trading: Improving Performance in Changing Markets".

The DRAW_COLOR_CANDLES style (as DRAW_CANDLES) draws candlesticks based on values of four indicator buffers, containing Open, High, Low and Close prices. In additions it allows you to specify color for each candlestick from a given set.

The DRAW_COLOR_BARS style draws bars based on values of four indicator buffers, containing Open, High, Low and Close prices. This is the advanced version of the DRAW_BARS style, that allows you to specify individual color for each bar from predefined color set.

The DRAW_COLOR_ZIGZAG style draws lines of different colors by values ​​of two indicator buffers. This is the color version of the DRAW_ZIGZAG style and allows you to specify individual color for each line from predefined color set.

The DRAW_COLOR_ARROW drawing style plots the color arrows (symbols from Windings font).

The DRAW_COLOR_HISTOGRAM2 drawing style is used to plot color histograms using two indicator buffers, the colors are specified in the color buffer.

The DRAW_COLOR_HISTOGRAM drawing style is used to plot color histograms.

The DRAW_COLOR_SECTION drawing style is used to plot sections with different colors, the colors are specified in the color buffer.

The DRAW_COLOR_LINE drawing style is used to plot lines with different colors, the colors are specified in the color buffer.

Premier Stochastic Oscillator - Double EMA smoothing of stochastic, based on article in TASC by Lee Leibfarth (August 2008)

VininI Cyber Cycle - Identify cyclical movements of price, based on VininI_Cyber Cycle(V2).mq4 by Victor Nicolaev (2009)

The cIntBMP library provides the creation of graphic BMP images. We will consider the example of its use in creation of self-similar fractal sets using the Iterated Function System (IFS).

The DRAW_ARROW drawing style plots the arrows (chars).

The DRAW_ZIGZAG drawing style allow to draw sections using the values of two indicator buffers. It looks like DRAW_SECTION, but it allows to draw vertical sections inside one bar.

The DRAW_BARS drawing style is used to plot the bars using the values of 4 indicator buffers with Open, High, Low and Close prices.

The DRAW_FILLING drawing style plots the filled area between the values of two indicator buffers. In fact, it plots two lines and fills the area between them with the specified color.

The DRAW_CANDLES drawing style plots the candles using the values of 4 indicator buffers with Open, High, Low and Close prices.

The DRAW_HISTOGRAM2 drawing style is used for plotting the values of two indicator's buffers as a histogram.

The DRAW_HISTOGRAM drawing style is used for plotting the values of the indicator's buffer as a histogram.

The DRAW_SECTION drawing style is used for plotting the values of the indicator's buffer as a sections.

The DRAW_LINE style is used for plotting the values of the indicator's buffer as a line.

The DRAW_NONE drawing style is used in cases, when you need to calculate and show the values of the indicator in "Data Window", but the plotting isn't needed.

1...169170171172173174175176177178179180181182183