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

Top MQL4 and MQL5 source codes based on user ratings - 119

Submit your code

It is known that the market is mainly driven by two emotions: fear and greed. This should be seen as an attempt to implement these emotions in the form of a mathematical model.

CLS (ClearScreen) delets all object drawn on the chart with key press "C"

Now we will get the code with function and purpose as below: 1. How to call and using the bollinger band 2. How to call and using the volume tick 3. How to call and using the Moving average volume. 4. How to code using the Trailling & Check volume lot size

If you only want to execute your code blocks "only once per bar" it's important to check if there is new bar arrived or not.

Smoothed ATR that uses color to show whether the trend strengthens or weakens.

The Exp_ColorBBCandles Expert Advisor based on the ColorBBCandles indicator.

The indicator displays the dominant force of market movement (bulls-bears) to the volume

Signals of entries and exits on the system "Friday effect"

The indicator draws two trend lines for the closest price extremes

Advanced ADX indicator.

The MDAC indicator with bar coloring according to Elder.

X2MA_HTF_Signal_BG shows information about trend direction (based on the X2MA indicator data) as a graphic object with a colored indication of trend or deal direction and gives alerts or audio signals and sends push notifications to a smartphone.

A semaphore arrow indicator that shows trend change time based on the ADX indicator.

A non-normalized trend oscillator.

The GannZIGZAG indicator with the timeframe selection option available in input parameters.

The RVIWithFlat indicator with the timeframe selection option available in input parameters.

The BvsB indicator with the timeframe selection option available in input parameters.

Range Expansion Index (REI) is a relative oscillator with the timeframe selection option available in the input parameters.

The WPRTrend_x10 indicator shows the WPR oscillator position from ten different timeframes.

The Exp_ColorXdinMA Expert Advisor is based on the ColorXdinMA moving average change of direction.

The DEMA_RLH indicator with the timeframe selection option available in the input parameters.

Trading system based on the signals of the ColorBulls indicator.

The iCCI_NR with the timeframe selection option available in the input parameters.

Indicator of the oscillator type, which displays its values based on the XRSX technical indicator.

METRO_DeMarker_HTF_Signal shows a trend direction or a signal for performing a deal generated by METRO_DeMarker_Sign indicator at the chosen bar as a graphic object with colored trend indication or deal direction and sends alerts or audio signals in case of a market entry moment.

The ColorZerolagX10MA_StDev indicator with the timeframe selection option available in input parameters.

When run on the price chart, the script modifies stop loss or take profit of all open orders for the current instrument.

The ZigZag based on the OsMA oscillator.

The ZigZag based on the iForce oscillator.

The Exp_TDI-2_ReOpen trading system based on the intersection of TDI-2 indicator lines, with adding to trend-following positions.

The Stochastic_Chaikins_Volatility indicator with the timeframe selection option available in its input parameters.

A redrawing channel with a colored background.

The Expert Advisor sets pending Buy Stop and Sell Stop order at a specified time.

Variation of a long known and useful MACD indicator using DEMA (Double Exponential Moving Average) instead of using EMA (Exponential Moving Average) for MACD calculation, and DSL (Discontinued Signal Lines) and instead of using one signal line uses two. That way it sort of introduces levels as well as signal lines and, judging from tests, it seems to be better in avoiding false signals and it can be used in (short term) reversals detection.

AD

The AD (Accumulation Distribution) indicator with three calculation methods.

A Trend Oscillator.

The Volatility Band 2 indicator is similar to the standard Bollinger Bands, and is a modification of Volatility_Band with the following difference: instead of a separate 'Low band adjustment', this parameter affects both the lower and the upper bands of the indicator.

The indicator is using 3 instances of Hull Moving Average.

RSI + STARC Bands (Stoller Average Range Channels).

Combination of MAMA (MESA Adaptive Moving Average) and FAMA (Following Adaptive Moving Average) made as an oscillator.

1...112113114115116117118119120121122123124125126...183