Gap and Trail MT5 – robot for automated trading on the effect of closing gaps, with trailing positions

Professional trading on a real account. The effect of closing the price gap is used. Trailing stop of open positions reduces risk. The minimum deposit is only $10. Version for the MetaTrader5 terminal of the popular Gap and Trail robot.

Trading strategy – gap (price gap) that occurs after weekends or holidays, usually closes, and due to this you can get a good profit

After weekends or holidays, gaps often appear on the market (gaps in price charts). According to statistics, most gaps closes (the price returns to the beginning of the gap). The trading strategy implemented by this robot is based on this regularity. At the time of the gap, the robot opens the position in the direction of its closure. For each transaction, individual goals are calculated depending on the characteristics of the market. Open positions are accompanied by a robot. In the process of price movement, a trailing stop is performed on the extremes of the formed candles, which significantly reduces trading risks.

The robot has all the protections that allow it to work successfully in adverse conditions on a real account. Also, flexible money management adapts transactions for the accumulated volumes and allows you to reinvest the funds received. All this makes the work of the robot as safe and efficient as possible.

On major currency pairs, gaps occur relatively rarely, usually after weekends or holidays. Therefore, the robot opens transactions infrequently (2-4 per month). However, transactions are very accurate and open with increased volume, providing a given high trading efficiency.


The testing of the robot was carried out on the quotes of the Standard.mt5 real account of the Alpari broker and showed the stability of the robot operation over long periods (3-5 years). When testing for the period 2016 – 2019 with a starting deposit of $100, the following results were obtained (rounded): on EURUSD $37000; on GBPUSD $88000 and on AUDUSD $28000. The results are shown in the screenshots.


  • Magic – magic number for orders;
  • Language – robot message language (English / Russian);
  • Trading days – allowed trading days (Only monday / All days);
  • Use money management – use of automatic capital management ( Yes / No);
  • Magnification factor of the lot – coefficient of linear dependence of the lot on the available funds in money management;
  • Initial lot – initial lot with money management disabled;
  • Size of the gap – the minimum size of the gap, which is allowed to open trades, points;
  • Coefficient of the take profit – gap share used for profit (0.2-1.0);
  • Stop loss – initial stop loss, points;
  • To control the spread before opening order –  (Yes / No);
  • Maximum spread – maximum spread for opening trades (if a To control the spread = Yes).

Recommendations for use

The robot can be used to trade on any accounts. But it is preferable to use accounts with 5-digit quotes, low spread and high speed. Account leverage is preferably at least 1: 500.

In the case of a floating spread, when it is possible to have an unacceptable spread, you should prohibit positioning with an invalid spread value using the To control the spread = Yes parameter. The deal will be opened when the spread becomes less than the value specified in Maximum spread.

The Maximum spread parameter must be greater than the minimum spread of a specific account. Otherwise, the robot will not work. Good results are obtained if the broker provides a fixed spread of no more than 10-30 points.

Optimization over time is usually not needed. However, when switching to other brokers, especially with an increase in the spread, optimization may be necessary.

Existing set files will be posted on this page.

If optimization is needed, I will tell the buyer details of it in a personal message.

If you have questions, write a letter to the developer. I am pleased to help on any issue.

Download demo version 2.5. It only works in the strategy tester.
For MT5 terminal

Download demo version 2.6. It only works in the strategy tester.
For MT5 terminal

Buy a robot   $200

Set-files of optimal parameters of the Gap and Trail MT5 robot

Date of optimization: 2019.06.21
Broker : Альпари
Account type : Standard.mt5 (real account).
Timeframe : H1
EURUSD 2019_06_21.set    (spread is limited to 50 points)
GBPJPY 2019_06_21.set     (spread is not limited, use with a spread of not more than 70 points)
GBPUSD 2019_06_21.set   (spread is limited to 70 points)
AUDUSD 2019_06_21.set   (spread is limited to 30 points)

Date of optimization : 2019.06.30
New set-files for the robot Gap and Trail MT5 version 2.5.
Received on real quotes of Alpari broker with 100% quality. Account type: Standard.
Optimized on the history of 2018.01.01 – 2019.06.30. Spread limit applies.
Best trading results on GBPJPY, GBPUSD.
MT5 Alpari AUDUSD 2019_06_30.set  
MT5 Alpari EURUSD 2019_06_30.set    
MT5 Alpari GBPJPY 2019_06_30.set    
MT5 Alpari GBPUSD 2019_06_30.set    

New set-files for the robot Gap and Trail MT5 version 2.5.
Received on real quotes broker IC Markets with the quality of 100%. Account type: True ECN.
Optimized on the history of 2018.01.01 – 2019.06.30. Spread restriction does not apply.
Best trading results on GBPJPY, GBPUSD.
MT5 ICMarkets AUDUSD 2019_06_30.set
MT5 ICMarkets EURUSD 2019_06_30.set
MT5 ICMarkets GBPJPY 2019_06_30.set
MT5 ICMarkets GBPUSD 2019_06_30.set