Download MetaTrader 5

Watch how to download trading robots for free

Interesting script?
So post a link to it -
let others appraise it

You liked the script? Try it in the MetaTrader 5 terminal

2010.09.21 11:20

ProMart - expert for MetaTrader 5

| English Русский 中文 Español Deutsch 日本語 Português

votes: 25
martingail.mqh (3.26 KB)view
promart.mq5 (4.83 KB)view


An Expert Advisor opens position using two MACD indicators. It reverts the position in the case of loss. It uses a martingale with the limited number of doublings. The doublings can be disabled.

 Input parameters:

  • DML- amount of money, used for 1 lot;
  • Ud - number of doublings. It starts from 0 - no doublings;
  • Stop - stop loss in points;
  • Tp - take profit in points;
  • Slipage - slippage in points;
  • MACD1Fast - Fast ЕМА of MACD, used for the entry;
  • MACD1Slow - Slow ЕМА;
  • MACD2Fast - Fast ЕМА of MACD, used to determine the trend;
  • MACD2Slow - Slow ЕМА.
Testing results:


Translated from Russian by MetaQuotes Software Corp.
Original code:

Accelerator Oscillator (AC) Accelerator Oscillator (AC)

The Acceleration/Deceleration Indicator (AC) measures acceleration and deceleration of the current driving force.

Average Directional Movement Index (ADX) Average Directional Movement Index (ADX)

The Average Directional Movement Index Indicator (ADX) helps to determine if there is a price trend.

TP-SL_Removing TP-SL_Removing

Immediately deletes the SL/TP of all positions.

Closed_TOTAL Closed_TOTAL

Total closure of all positions (winners/losers). You can also select which are of a single instrument.