• Home
  • Forex For Beginners
  • Forex Brokers
    • Binary Options Brokers
  • Forex Robots
  • All Posts
  • Trading Tools
    • Economic Calendar
    • Forex Market Hours
    • Online Quotes
    • Forex Charts
    • Lot Size Calculator
    • Margin Calculator
Forex Trader Portal

Forex - Trading Strategies, Robots, Indicators, Lessons

MindTheGap Advisor — auto trading on weekly gaps

June 1, 2025 by Michael 3 Comments

FillTheGap Advisor — auto trading on weekly gaps

Hello, dear Forex traders!

One of the most popular strategies in Forex is trading on price gaps of Monday. Between quotes of late Friday and early Monday Gap, which often seek to “close” may occur on some pairs, that is, when the gap happens, quotes often tend to go back to Friday’s level.

However, all is not so simple, as it requires specific filtering of the signals. We present to your attention the most advanced in its category Forex Expert Advisor for trading on gaps — MindTheGap. In this article, we’ll test the EA on some currency pairs and evaluate the results.

Characteristics of the EA

Platform: Metatrader 4
Version of the EA: 1.17
Currency pairs: AUDCAD, AUDJPY, AUDNZD, AUDUSD, CADCHF, CHFJPY, EURAUD, EURCAD, EURCHF, EURGBP, EURNZD, EURUSD, GBPAUD, GBPCHF, GBPUSD, NZDJPY, USDCAD (17 pairs)
Timeframe: M5
Hours: on Mondays
Recommended brokers: Roboforex (ECN-accounts)


Help on installing

We install the EA as usual. If you first meet Forex robots and you have a bunch of questions — read this article.

Attention! In this EA the settings significantly affect trading results, use the recommended set files (see files at the end of this article).

Expert Advisor Strategy


The algorithm of the EA is unusual, so let’s consider it in more detail.

1. On Monday at 00:05 on the opening of the market, the adviser looks for candles and looking for the gap with the defined parameters:
The distance from the Low Point of Friday’s candle to Open point on Monday, should not be less than MinGap and MaxGap pips for purchases and from High to Open pips for sales.
If the EA finds no gap, we wait for next Monday.

2. We check the distance from the current price to Low or High of the last Friday candle. It should also be not less than MinGap. If it is less, we go to the standby mode.

3. If a gap is found, the filter is passed, the adviser looks at what direction the first, “Monday” candle has closed. Next, I will consider the example for buying.

4. The candle has closed down.4.1. Looking for an opportunity to put a pending order at the open price of Monday. If the distance is not enough, go to step 4.2.

4.1. Looking for an opportunity to put a pending order at the open price of Monday. If the distance is not enough, go to step 4.2.

4.2. Check whether we can enter the market. For this, we have two oscillators which turn on when UseWPREnter=true, UseCCIEnter=true. If both are off, the adviser will not check their testimony, and in failing to put a pending order, will enter the market. If at least one of the oscillator is enabled, the system is verifying on the levels WPREnterLevel, CCIEnterLevel.

If the filters are not checked — go into standby mode.

4.2.1. Immediately after the oscillator filters, we check Spread. If the current spread is less than MaxSpread, we enter the market, if it is more , we go to standby mode. By the way, we compare the current average value of spread during the period of 100 candles.

4.3. If we didn’t pass all tests (at least one), go to standby mode.

5. The candle closed up.

5.1. Pending orders are not provided here, there are only tests on the oscillators and maximum spread.

5.2. If something is not passed, go to standby mode.

6. Work in the standby mode. In this mode, the EA checks the following conditions on each tick:

6.1. This is the oscillator filter analyzed above.

6.2. Check for the spread.

6.3. The standby mode operates CandlesToWait candles exactly. If the number of candles is exceeded, don’t pay attention for the signal.

7. When entering at market price, pending orders are deleted. When you activate a pending order, the standby mode is canceled.

8. With open market positions, there is a check for exit conditions with the same oscillators at every tick. It is enough that at least one of the indicators reached the level CCIExitLevel or WPRExitLevel respectively. If it is false, all they must reach the desired levels at the same time. At the same time, if ExitInLoss is enabled, the EA exits the transaction when there are the conditions for exit even if we would get a loss. If ExitInLoss is off, there must be accumulated a certain minimum profit which must be not less than MinExitTP from take profit of the order to exit the transaction.

9. Take profit of the order can be calculated very simply:

9.1. We have TP in pips, so it is used by the default.

9.2. But if TP is less than MinTP from the gap (for example, 0.5 from the gap), then for TP we use MinTP from the gap.

9.3. If it happened that TP is more than MaxTP from the gap (for example, 2.5 from the gap), then for TP we use MaxTP from the gap.

10. We set Stop in the points of the variable SL.

11. We change MM using the variable LotVariant, we have a little choice — either it is fixed lot FixLot or it is fixed risk Risk in percentage of the deposit.

The recommended level is not more than 3% per trade

12. We use control slippage and set Magic for all orders. If Magic=0, the EA will generate a unique magic for a specific pair of a specific chart for a specific terminal of a specific accounts of a certain broker — well, you get the idea)
Orders will be open NumOfTry times in the event of any problems — you’ve lost internet connection, your broker has problems with internet, etc.

13. All positions can be trawled with the help of simple trailing stop (TralOnPips is enabled), at a distance of TrailingStop from the current price.
In this case, if TrailingFromBE is enabled, it will be trawling from the breakeven only, if it is off, it will be trawling from Stoploss.

The Expert Advisor does not use martingale and grid of orders, but it can apply the mode of double entrance, but with the half reduced lot (it depends on settings).

The robot has many options that facilitate creating of profitable sets for different currency pairs.


The example of the EA work

gap robot example


Back tests of the EA

Backtest are done for each pair separately because Metatrader 4 platform does not allow performing multi-currency tests. The first series of tests is done with a fixed lot. This allows you to evaluate test results without considering money management. The second series of tests is done with a proportional lot. This allows you to evaluate the results of testing based on money management.

Using the program EA Analyzer we will make a consolidated statement for the test of all pairs with fixed lots and with proportional lots.

Portfolio MindTheGap 2007 2016 lot 0.1

mindthegap statement

Portfolio MindTheGap 2007 2016 lot MM

mindthegap statement mm

Conclusion: the EA MindTheGap when working with proportional lots of 17 pairs shows long-term stable growth of profit without any critical drawdowns.


Live monitoring


Description of settings

• Settings01 — “Signal Settings” section
• ExpertName — name of the EA (MindTheGap v1.17)
• Magic — magic of orders
• MaxSpread — maximum allowable spread (in 4-digit pips)
• MaxSpread2 — maximum allowable spread for additional order (in 4-digit pips)
• UseAllGaps — it enables trading with gaps: true — with all gaps, false — only with gaps on Monday at 00:00
• MaxGap — maximum gap size for further calculations
• MinGap — minimum gap size for further calculations
• CandlesToWait — if there is a gap, but indicator filter is not passed or spread is too large, it goes into standby mode for CandlesToWait candles
• CCIPeriod — the period of the CCI indicator
• WPRPeriod — the period of the WPR indicator
• CCIEnterLevel — the level of the CCI indicator, which is the entrance
• CCIExitLevel — the level of the CCI indicator, which is the exit
• WPREnterLevel — the level of the WPR indicator, which is the entrance
• WPRExitLevel — the level of the WPR indicator, which is the exit
• ExitInLoss — if the price goes not in the profitable direction, then when ExitInLoss=true, the order is closed at a loss
• MaxExitSL — percentage of the StopLoss value, at which the order is closed (it works when ExitInLoss=true and the parameters CCIExitLevel or WPRExitLevel have been passed)

• MinExitTP — percentage of the Take Profit value, at which the order is closed (it works when ExitInLoss=false the parameters CCIExitLevel or WPRExitLevel have been passed)
• Setting02 — Stoploss и Take profit Settings» section
• SL — StopLoss
• TP — TakeProfit
• Setting04 — « ММ Settings» section
• LotVariant — options of trading lot calculations: Fixed lot, Fixed percentage, Fixed proportion, Calculation of the lot depending on volatility
• FixLot — fixed Lot size
• Risk — percentage of Lot size from equity
• MoneyForMinLot — amount of money for the minimum (initial) lot
• VolRisk — lot size depending on volatility
• VolHistBars — the number of bars to calculate volatility
• UseDynamicDecrease — use the decrease of the base lot in case of a loss
• DynamicDecreaseFactor — percentage of the base lot reduction in case of a loss
• Settings05 — «Double entrances»section
• Allow_Second_Trade — allow the second entrance
• Distance — distance to the second order in pips
• Lot_Factor — ratio of the second lot size from the base lot
• Settings06 — «Partial exit» section
• AllowPartialExit — Partial exit is enable
• ExitDistance — the distance in percentage of TakeProfit, when a partial closure is triggered
• ClosePercent — how many percents of the base lot will be closed during partial closure
• Setting08 — «Standart Trawl» section
• TralOnPips — Standart Trawl is enable
• TralingStop — trailing stop
• TralStep — trailing step
• Setting09 — «Trailing by shadows of candles»section
• Use TrailingByShadows — Trailing by shadows of candles is enable
• BarsUse — the number of candles for calculation of the trawl
• BarsOtstup — indent in bars for calculation of the trawl
• Setting10 — «Trailing by ATR» section
• Use TrailingByATR — Trailing by ATR is enable
• AtrPeriod —ATR indicator period
• AtrShift —ATR indicator shift
• AtrKoeff — coefficient to calculate a trailing stop by ATR
• Setting12 — «Trailing by MA» section
• UseMATrailing — Trailing by MA indicator is enable
• iMAPeriod —MA indicator period
• iMAShift — MA indicator shift
• iMAMethod — method of averaging in MA indicator
• IMAotstup - indentation of MA indicator for trailing
• Setting12 — «Breakeven» section
• UseBE — Use breakeven function
• BELevel — move to breakeven (opening level +BEPlusPipsпунктов) when profit is BELevel pips
• BEPlusPips — profit in pips for breakeven (see above)
• Setting14 — «breakeven in percents of the gap» section
• UsePercBE — use breakeven function in percents of the gap
• BEPerc — percentage of breakeven relative to the size of the gap
• Setting17 — «Service settings» section
• CandlesToDelete — after how many candles you must delete a pending order
• BarPeriod — period for calculating of the indicators
• WorkPeriod — working timeframe (it must match the timeframe on the backtests!)
• Setting18 — «Other settings» section
• Slippage — slippage
• NumOfTry — the number of retry attempts to open an order with a large slippage
• SleepTime — the interval between attempts to open an order in seconds
• SleepMaximum — maximum number of attempts in seconds
• ECNAccount — using ECN account
• UseComments — use comments in orders

Attention! Do not change anything in the EA parameters and use only the recommended sets, unless you really know what you’re doing!

Recommended money management

Recommended money management mindthegap
Recommended risk per trade is 3 percent of the deposit. The lot can be calculated simply by setting the level of risk in the EA’s parameters, and everything will be calculated automatically.

Overall results


The EA MindTheGap is a complex multi-currency robot that trades using popular for many decades trading strategy on the closing of Monday gaps.

However, it uses the latest achievements in the field of trading automation and programming of the advisers. The EA can be used as the part of the portfolio of the reliable robots, and also as a complement to manual trading (with strict adherence to money management).

Overall this is a very reliable classic strategy with modern improvements. You don’t have to wait for 100500% profit, but if you have been on the market for a long time, you can understand what the true value of this robot is: this robot is reliable, and decades proven system, giving confidence during drawdowns and a good income for a long-term time period.


Important!

For correct operation of the EA, the trading terminal must be enabled with the opening of the market on Sunday evening to the closing on Friday evening. If you are not able to keep the computer in working order 24/5, it is recommended to use a VPS server.


Download Forex robot “MindTheGap”

button-download

Related Posts:

  • Montag Expert Advisor - Profit on Mondays
    Montag Expert Advisor - Profit on Mondays
  • Repainting indicators - is it always bad thing?
  • Five Signs of a Useless Forex Indicator
    Five Signs of a Useless Forex Indicator
Posted in: Forex Robots Tagged: download, gap ea, gap robot
« CSS indicator - with full power of currencies for your profit Lesson 1 - Believe in Yourself and Change Your Life! »
← CSS indicator - with full power of currencies for your profit
Trailing Stop Light - Become a Trailing Stop Master →

Categories

  • Binary Options
  • Currency Pairs
  • For Traders
  • Forex for Beginners
  • Forex Indicators
  • Forex Robots
  • Forex Trading Psychology
  • Forex Trading Strategies
  • Price Action

Recommended Forex Broker

Have To Look

  • The 5 Steps to becoming a trader
  • How to install a Forex Robot?
  • The whole truth about leverage in Forex
  • What is difference between old and new pips in Forex?
  • Trading Strategies Installation Instructions
  • My VPS choice

    About This Site

    This blog mission is to teach people about Forex trading, including trading strategies, robots (EA), and indicators. We provide newcomers with lessons, reviews, tutorials, and more.

    Join us on Facebook!

    Random Posts

    • How to run 2 Metatrader terminals from one broker at the same time
    • Stairstep Breakout System — when the Flat is your friend
    • How to trade СFD — try your hands on stocks, metals and commodities
    • I Got Offended About Forex, so I am Not Trading Anymore
    • How to work with bonuses on Forex?

    Copyright © 2023 Forex Trader Portal.

    Omega WordPress Theme by ThemeHall

    Home | Forex Robots Laboratory | For copyright holders | All posts |
    Risk Warning. There is a high level of risk involved when trading leveraged products such as Forex. You should not risk more than you can afford to lose. All posts published on this portal are only recommendatory and all responsibility for decisions lies on readers.
    (c) 2015-2021 All rights reserved