Not more than 3 months ago I've been writing an article about how you can trade the 4:00PM London Fix, giving out an easy step by step guide on how to profit from the price action around that time. You can read more about it here: London Fix Strategy

In this article we're going to make one step further and automatize the whole process by using Dukascopy Visual JForex. This will be one of those strategy that will require no indicators and I'm going to use some of the blocks that I've already been using them in my previous article, and you should be already familiarized with them. I like to keep things simple so in this regard even if you don't have any programming skills whatsoever you will be able to understand the whole process.

Lets proceed first by giving a short summary of our strategy:
  1. Currency pair: GBPUSD;
  2. Time Frame: 1h;
  3. Target= 16 pips. Since beginning of the year the average pips volatility at 4:00PM was around 16.6 pips (see Figure 1);
  4. Stop Loss below the candle's low at 3:00PM.
  5. Trading Rules:
  • We buy and fade any sell off that is happening right in to the 4:00PM London Fix. If we have a red candle we buy.
  • We sell and fade any rally that is happening right in to the 4:00PM London Fix. If we have a green candle we sell.

Figure 1. GBP/USD Average Pips Volatility

Now that you have the summary of the strategy and we know what we want to build up it's very important to have a plan on how you are going to achieve building it. It's one thing to know what you want to build and another how you implement it, that's why we are going to break our build up strategy process in 3 stages. This systematic thinking is a common way for the understanding of a complex system that many programmers use it:

  1. First part we have to do is to find the time of the day when the 4:00 PM London FIX happen, we're going to go through all hourly candles until we find the one hour candle that matches the 4:00 PM London FIX, as our strategy will start working at 4:00 PM.
  2. Second part is where we check if the 1h candle that goes into the 4:00 PM FIX is whether bullish or bearish.
  3. Last part is to create the order execution where we're going to go long if the candle is bearish or short if the candle is bullish

  • Constructing The Blocks For The 4:00 PM London FIX
On this stage in order to find the 4:00 PM London FIX we want to go through all the hourly candles and filter when the 4:00 PM candle starts, as our strategy will start executing orders at that moment. For this we need to use the "IF" block in order to go through every hourly candle and spot the candle that opens at 4:00 PM. Next, the "IF" block will be connected to the "GetTimeUnits" block, which is going to calculate the time of the tick which is going through the block at current moment. The output variable of this new block can take value anywhere between 0-23, as there are 24 hours within a day. Basically we're going to store the output value in a new variable that we're going to create and named it: current_time.

Basically as we go through each candle we are looking at the time of that candle and also this block will store that value in a new variable: current_time.

The final stage of this process is to check when "current_time" is equal to 4:00 PM London FIX, and we're going to use another "IF" block which is going to use as the first parameter the new variable "current_time" which stores the value of the time of current candle. And we are going to compare it with a new variable calling it "London_FIX" with the assigned Start value at 15. We are using 15 because current London time is GMT+1 where Dukascopy platform uses the GMT+0 time. The cycle will be finished and go through the next phase only when the current candle is the London FIX time.

Figure 1. Finding the 4:00 PM London FIX (click on figure to enlarge)

  • Constructing The Blocks for Bullish or Bearish Candle
This process should be quite easy to construct as we're going to use only to blocks "IF's" in order to find out whether the candle is bullish or bearish. First we'll have to use the logic component "IF" to filter only the candles we need so we'll open positions only at 4:00 PM London FIX. Second "IF" block will compare the open price of the candle with the close price of the candle to decide whether the candle is bullish or bearish. You go to Variables-onCandle-Candle Open&Candle Close and drag and drop this two variables into the second "IF"block and we're ready to move onto the next step.

Figure 2. Finding if the candle is bullish or bearish (click on figure to enlarge)
  • Constructing The Blocks For Order Execution
Last stage of this simple and yet very effective strategy is to use the blocks for the order execution. We're gong to use "Open at Market" block which can be found in Repositorium-Component-Trading-Open at Market. We're going to use two of this blocks one for the buy side and one for the sell side like follow:
  1. If the candle open price is greater than the closing price it means we're having a bearish candle and we want BUY.
  2. If the candle open price is less than the closing price it means we're having a bullish candle and we want SELL.
Figure 3. The order execution blocks (click on figure to enlarge)

  • Backtesting
Any strategy is not over until you run a through a backtesting period of time as we want to make sure it has a positive expectancy and it's indeed profitable. From the top Menu- Compiler- Build, if there are no errors a new message should pop up: "Strategy builded successfully", click ok. Next from the top Menu- Compiler- Run and after you have established the connection to strategy processor I was using the following parameters for the backtesting:
  • Testing period: last month: 1 Sept - 31 Sept;
  • Account Balance: 100k;
  • Pair: GBP/USD;
  • Trade amount: $5M;
  • Stop loss: 25 pips;
  • Take profit: 15 pips;

Figure 4. Backtesting Results (click on figure to enlarge)

The best results I've obtained is for the month of May with a net return of approximately 32%(see Figure 4). I've only run the backtesting for the last few months and the average results gravitate towards BE. Not many hedge funds can post a double digit return so I can say it's a pretty decent results. Starting from this month I'll be using this strategy in the Strategy Contest and see how it will perform from here on and I'll try to optimize the strategy along the way. I hope my article will inspire or help you in designing your own strategy.

Best Regards,
Translate to English Show original