Voir comment télécharger gratuitement des robots de trading
Retrouvez-nous sur Facebook !
Rejoignez notre page de fans
Accédez à la CodeBase depuis votre terminal MetaTrader 5
Vous n'avez pas trouvé le bon code ? Commandez-le dans la section Freelance
Comment rédiger un Expert Advisor ou un indicateur

Codes sources MQL5 des Expert Advisors pour MetaTrader 5 - 16

icon

Les Expert Advisors analysent les graphiques de prix et effectuent des transactions automatiquement en suivant les règles sous-jacentes. Vous trouverez ici des codes sources MQL5 permettant de résoudre divers problèmes. Vous pouvez sélectionner aussi bien des Expert Advisors simples basés sur le croisement de moyennes mobiles que des Expert Advisors complexes impliquant des algorithmes compliqués de génération de signaux et une protection contre les erreurs de trading.

Vous pouvez télécharger et lancer les Expert Advisors proposés dans MetaTrader 5. Il est recommandé de tester et d'optimiser les robots de trading dans le testeur de stratégie avant de les utiliser. La bibliothèque d'Expert Advisors est également disponible directement depuis la plateforme MetaTrader 5 et l'environnement de développement MetaEditor.

Soumettre votre code

A trading system based on the 'EMAAngle' and 'Laguerre RSI with Laguerre filter' indicators.

A trading robot for performing arbitrage between EURGBP and its synthetic quotes (triangular arbitrage).

Usually most brokers do not provide M1 data over 3 months in MetaTrader 4, but they provide M1 data over 3 years in MT5. So we can use this tool to obtain the M1 data in MetaTrader 5 tester and save the data into .hst file for MetaTrader 4 backtesting.

This is an MQL5 version of the Expert Advisor described in the article "How to reduce trader's risks" (https://www.mql5.com/en/articles/4233).

Trading signals are generated based on a comparison of two trend indicators: iMA (Moving Average, MA) and iSAR (Parabolic SAR). The EA works on the zero bar, only one position can be open. Trailing stop is used.

The Expert Advisor trades using the "Japanese Doji Candlestick" pattern.

A further development of code "Dealers Trade v 7.74 MACD" (https://www.mql5.com/en/code/19535). "Zero-lag MACD" (https://www.mql5.com/en/code/170) is used. When the number of positions increases, the following is also increased: step between positions, lot size, take profit (martingale).

The Expert Advisor is based on Puria method with a few changes. It uses two iMA (Moving Average, MA) indicators and one iMACD (Moving Average Convergence/Divergence, MACD).

The Expert Advisor trades based on the signals of iMA (Moving Average, MA) and iMACD (Moving Average Convergence/Divergence, MACD). The minimum distance between the price and the MA indicator is taken into account.

An Expert Advisor based on the iIchimoku (Ichimoku Kinko Hyo) indicator. Fixed lot.

The Expert Advisor uses the signals of "crossover of two iMAs (Moving Average, MA)". The EA uses Trailing Stop and Take Profit.

An example of creating synthetic instruments for calculating the strength of RTS, USD, RUB based on futures contracts of the FORTS market.

MetaTrader 5 allows creating synthetic instruments. The price of such instruments can depend on the current values of a number of financial instruments. In trading, such symbols allow spotting the beginning and end of global market movements at an early stage. In this example we create synthetic instruments to analyze the strength of Forex currencies EUR, USD, GBP, JPY and CHF.

x1

Simultaneous opening of opposing positions. Lot management

The EA uses three iMAs (Moving Average, MA), one iStochastic (Stochastic Oscillator) and one iRSI (RSI, Relative Strength Index). Positions are opened by market, as well as Buy Stop and Sell Stop pending orders are placed.

Information about profit, points, percent, spread and time remaining until the close the bar on the current currency pair and timeframe in a compact and convenient form.

The EA trades using signals of the iMACD (Moving Average Convergence/Divergence, MACD) indicator. Lot is increased when the number of position grows (Martingale)

An Expert Advisor based on indicators "MA Cross 3MACross Alert WarnSig" (https://www.mql5.com/en/code/19519) and "Price Channel" (https://www.mql5.com/en/code/44)

A trading strategy using the Martingale system.

The Expert Advisor uses signals of the iMA (Moving Average, MA) indicator with a delay from the bar opening time.

The Expert Advisor searches for N identical candlesticks in a row. It buys on bullish candlesticks and sells on bearish ones.

Two identical trading systems based on the crossover of the CMO indicator and the zero line, for long and short trades, which can be configured in different ways in one Expert Advisor.

A trading system based on the signals of the Daniella semaphore signal indicator.

Trading against the trend direction as of N hours ago.

A daily bar breakout strategy.

An Expert Advisor based on "KDJ Indicator"

The Expert Advisor trades based on iMA and iRSI signals. Values of iMA on four bars are compared. Indices of these bars can be optimized.

A trading strategy "three bars down, Stochastic up".

A trading system based on the Martingale technique.

A trading system based on the Vortex Oscillator signals.

The Expert Advisor is based on the signals of indicators iBands (Bollinger Bands, BB) and iRSI (Relative Strength Index, RSI).

Martingale and anti-martingale.

Maximum lot calculated based on free margin.

The Expert Advisor is based on the signals of the Stopreversal indicator and is provided with the possibility to set a strict trading time interval.

The Expert Advisor is based on the iRSI (Relative Strength Index, RSI) indicator signals.

The Expert Advisor is based on the iOsMA (Moving Average of Oscillator, OsMA) indicator signals.

An Expert Advisor for two currency pairs

The Expert Advisor tracks positions of all symbols with all magic numbers. If a position has been open for "Waiting for seconds" and its profit has reached "Take Profit" points, the EA closes the position. If the profit has not reached "Take Profit" points, the EA moves the take profit level.

The Expert Advisor is based on Bill Williams' strategy.

Closing positions: all, only profitable or only losing positions.

1...91011121314151617181920212223...36