Gap Trader Expert Advisor exploits one of the most common phenomena of the Forex market namely the weekend gap, a price difference between the last Friday’s closing price and the coming Monday’s opening one. This price jump is due to the fact that the interbank currency market continues to react on fundamental news during the weekend, opening on Monday at the most liquid level. Weekend Gaps are consistently been filled by the market and therefore fanatically traded by Forex expert traders. Gap Trader using H1 time frame fully automates the execution of the aforementioned strategy by:
- Immediately spotting a weekend gap on Monday market opening and betting on its filling. Gap Trader can be used simultaneously in as many currency pairs as the user wants.
- Managing all open positions with free-ride opportunity utilization orientation. (Trailing Stop Loss function)
- Using the magic number feature to separate between any previous opened non-gap-trading positions and gap-trading ones, with the first being unaffected by the use of Gap Trader expert advisor. Magic number is also used for the distinction between gap-trading positions in different currency pairs.
On Monday’s market open, if the Friday’s last H1 candle high (low) is lower (higher) than the Monday’s opening price by more than 10 pips, three short (long) positions, position A, B and C, are opened. From now on this price difference will be called gap. All three positions have an initial Stop Loss set at a user specified level, although the default Stop Loss level is set to 100 pips. Position A has a Take Profit level that is set one gap distance away from the opening price, TP A =1xgap, position B has a Take Profit level equal to two gaps distance from the opening price, TP B=2xgap, and position C does not have a Take Profit level. (Picture 1) Once position A is closed, in other words once the first gap distance is reached, position’s B and C Stop Loss is set to the zero loss level (Stop Loss A= Stop Loss B=opening price) and the Trailing Stop Loss Function kicks in starting the free-ride part of the strategy.
Gap Trader will close all positions that are still open by next Monday and whose gap distance has not been filled, letting open all wining bets and their free-riding potential for maximum profits.
Trailing Stop Loss Function
Once the 1xgap is filled the Trailing Stop Loss function will get into action. It starts a free ride position by setting position’s B and C Stop Loss level at the zero loss point. Should the price move more to your favor it trails the stop loss level upwards for a long position or downwards for a short position maximizing your potential profits. The Trailing Stop Loss distance from the current price is set to a user defined level expressed in pips, with the default level set to 39 pips. (Picture2)
Magic Number Feature
Every Forex pair at the initialization of Gap Trader expert advisor should be given a unique non zero integer magic number value by the user. This number is essential to the function of the expert advisor as it is used on the one hand to distinguish between any non-gap-trading positions that are already open and the gap-trading positions and on the other hand between gap-trading positions on different Forex pairs.
Use of Gap Trader (Video)
In order to use Gap Trader in a Forex pair, the user has to open the pair’s corresponding chart window in H1 time frame and simply drag and drop Gap Trader icon from the list of expert advisors in the navigate window to that of the forex pair chart. Once you do that the parameter window will be shown.
Description of Input Parameters
- Lotsize:The bet size can be either an integer or a decimal value. Default value set to 1.
- Magicnoumber:A unique non zero integer, non negative value for each pair
- StopLossPips:Initial Stop Loss value expressed in number of pips away from the opening price. Its value should be an integer! Default value set to 100.
- TraillingStopLossPips:The Stop Loss value that will be used when the Trailing Stop Loss function will be activated. It is expressed in the number of pips away from the current price. It should be an integer! and its default value set to 39. If the gap value is less that the inputted value then Gap Trader will set it equal to the gap value otherwise it will be left unaffected.
After the input parameters are set to their desired levels press the ok button and Gap Trader is on. Make sure that the expert advisors activation button on the toolbar is on and also a smiling face has appeared to the upper right corner of each chosen Forex pair chart.
This is achieved by introducing two input variables:
-GapDay: The day of the week when a market opens after the weekend
-OpenHour: The time when the market opens
With this version (GapTrader.v2) the aforementioned issue is solved!
2) Additionally, with this version the available margin is checked before opening a set of Gap Trading positions.