Voir comment télécharger gratuitement des robots de trading
Retrouvez-nous sur Telegram !
Rejoignez notre page de fans
Un script intéressant ?
Poster un lien vers celui-ci -
laisser les autres l'évaluer
Vous avez aimé le script ? Essayez-le dans le terminal MetaTrader 5
Experts

EA Moving Average - expert pour MetaTrader 5

Publié par:
Vladimir Karputov
Vues:
8589
Note:
(13)
Publié:
2018.06.16 10:20
Mise à jour:
2018.06.16 10:23
Besoin d'un robot ou d'un indicateur basé sur ce code ? Commandez-le sur Freelance Aller sur Freelance

Idea by: Aleksandr.

MQL5 code by: Vladimir Karputov.

The EA is based on \MQL5\Experts\Examples\Moving Average\Moving Average.mq5 from standard delivery. What's new or changed:

  • For each of the four signals (Buy Open, Buy Close, Sell Open, and Sell Close), there is now their own indicator Moving Average, for which parameters may be set, such as: period (averaging period), shift (horizontal shift of the indicator), method (averaging method), and price (type of prices, based on which the indicator is calculated);
  • Flags Use Buy positions and Use Sell positions - enable opening BUY and SELL positions, respectively;
  • Flag Consider Price Last Out - consider the price of the last closed trade. If the value is "true", then the new BUY position will be opened at a price equal to or lower than the price of the last transaction, while the new SELL position will be opened at a price equal to or higher than the price of the last closed transaction.

Price of the last closed position is monitored on OnTradeTransaction. The EA keeps at most one position in the market, so it can be used on both netting and hedging accounts.


Inputs

  • Maximum Risk in percentage - highest risk, in percents;
  • Descrease factor - decrease factor, in case of losing trades in trading history;
  • ххх: period - averaging period (individual for each indicator);
  • ххх: shift - horizontal shift (individual for each indicator);
  • ххх: method - averaging method (individual for each indicator);
  • ххх: price - price, at which the indicator is calculated (individual for each indicator);
  • Use Buy positions - a flag enabling opening BUY positions;
  • Use Sell positions - a flag enabling opening SELL positions;
  • Consider Price Last Out - a flag to consider the price of the last closed trade;
  • magic number - unique identifier for the EA.

Default parameters, EURUSD M15, period from 2018.01.01 to 2018.05.03.

EA Moving Average


Recommendations on optimizing on M15

(Genetic) optimization can be performed in the "1 minute OHLC" tick generation mode. To start with, mark the parameters of period (Start 12, Step 1, Stop 30) and shift (Start 0, Step 1, Stop 6).

Upon genetic optimization, go to the "Every tick" mode or the "Every tick based on real ticks" mode and run a single test for the pass selected.

Traduit du russe par MetaQuotes Ltd.
Code original : https://www.mql5.com/ru/code/20626

Sar_HTF_Alert Sar_HTF_Alert

Indicator iSAR with the timeframe selection option in input parameters, implemented in color, with the possibility to generate alerts when the trend changes its direction.

UniversalMACrossEA UniversalMACrossEA

The EA based on two iMA (Moving Average, MA) indicators. Selecting the lot calculation mode: Manually or in the risk percentage per trade. Position trailing.

Exp_Sar_Tm_Plus Exp_Sar_Tm_Plus

A trading system based on indicator signals Parabolic Stop and Reverse system with the possibility to set a fixed position holding time.

exp_Amstell exp_Amstell

The EA uses a virtual Take Profit for closing gaining positions. Opening positions with a step. Catch the type of the last position and its price in OnTradeTransaction.