Topic: Early Morning Breakout Backtesting on EURUSD and GBPUSD

Please could someone point me in the right direction.

I am using Forex Strategy Builder to backtest some early morning breakout strategies hopefully then to automate using MT4 platform with Forex Strategy Software.

I have read the tutorials but do not seem to be able to master the software and it is probably something simple that I am missing out.

The historical data I am using is tick data from Dukascopy (JForex) and I am trying to backtest an Early Morning Breakout strategy on EURUSD and GPBUSD. I used the FSB guide to download this and changed the data directory to point at the new folder but it does not seem to recognise it and says there is no data in the folder although there is!

I would like to run a report on these two currency pairs opening a position 7pips above the hourly high between 00.00 and 06.00 GMT and conversely the short position. Trades would be entered between 06.00 and 13.00 GMT.

I have used three opening logic conditions entry time, day of week and hourly high low. I have input strategy properties as permanent stop loss 20 pips and permanent take profit at 100 pips. I am not sure what I would use as the closing point of the position or closing logic condition?

There is no journal/report or equity/profit/loss position showing even when I use 1 day data. Although this data appears to be showing in the left hand window of FSB and in the right hand top window under account statistics it shows the bars tested.

Is there anyone that can help me with this? Is there something obvious that I am doing wrong. Do I need to convert data? or activate something else to generate the report?

I would really appreciate it. Many thanks.

Re: Early Morning Breakout Backtesting on EURUSD and GBPUSD

Hey,

Firstly lets get few things straight - tick data in FSB is not a stand-alone timeframe, it is there to help with intrabar interpolation. My advice to you is to download all relevant timeframes and tick data, these combined give you the best possibility for reliable backtest.

Your strat:
[Opening Point of the Position]
Hourly High Low
     Enter long at the hourly high
     Base price  -  High and Low
     Start hour (incl.)  -  0
     Start minutes (incl.)  -  0
     End hour (excl.)  -  6
     End minutes (excl.)  -  0
     Vertical shift  -  7

[Opening Logic Condition]
Entry Time
     [All]   Enter the market between the specified hours
     From hour (incl.)  -  6
     From min (incl.)  -  0
     Until hour (excl.)  -  13
     Until min( excl.)  -  0

[Closing Point of the Position]
Stop Limit
     Exit at the Stop Loss or the Take Profit level
     Stop Loss  -  20
     Take Profit  -  100

Again, a few notes for clarification which are of most importance: GMT times you have to sort out yourself, the times depend on the data you are using = broker timezone. For instance, if your broker is GMT, times stay as they are. If your broker is GMT+2, then you have to adjust the indicators properly to match GMT.

For closing point I selected Stop Limit indi, again find out what is your data type - is it 4- or 5-digit data. If it's 4, then 20 points of SL is 20 in the indi. If 5-digits are used, 20 points of SL is 200 in the indi (don't forget the same goes for TP too).

Use timeframes up to H1, because you can't get hourly high/lows from daily data.

Re: Early Morning Breakout Backtesting on EURUSD and GBPUSD

Thank you very much for your concise and prompt reply - a real help. I really appreciate you taking the time.
The Dukascopy Data is timed at GMT. It is in excel csv format and when I open it some of the data appears to be in 4 digit format and some in 5 digit.

I'll have a look following your advice and see if I can get some reliable reports.

Do you use Dukascopy data - is it a good reliable source or is there somewhere better?

Many thanks,

Re: Early Morning Breakout Backtesting on EURUSD and GBPUSD

No problems, you're welcome! big_smile

Duka should be fine, in the Market menu keep Check the Data ticked, if there are gaps or blanks FSB notifies you.

Colin, I understand you're still having trouble seeing the results, please do post all relevant screenshots here. Start of the main page of FSB, keep the strategy in place.

Re: Early Morning Breakout Backtesting on EURUSD and GBPUSD

Ok. Check the data is ticked. Screen shot is attached as having problems embedding using postimage.org. It shows on the right that 19998 bars have been tested but under market statistics it only appears to show less than a month of data. I pointed the data directory in FSB to the file that I have the Dukascopy data in and the data goes back to 1997.

Post's attachments

FSB Screen Shot.JPG 159.43 kb, file has never been downloaded. 

You don't have the permssions to download the attachments of this post.

Re: Early Morning Breakout Backtesting on EURUSD and GBPUSD

Data is showing correctly - on M1 20,000 bars equals to a bit less than 14 days. You can change the amount of bars to 50,000 in Data Horizon (Market menu). Switch up to M5 and the covered time span will grow respectively.

You're using Day of Week indi, do you want the entry to happen on a specific day? Please tell me the setting of the indi.

5-digit data I see, everything adjusted accordingly?

Spread seems off, for 5-D 2 pips equals to 20.

Make a screenshot of your Account Settings (Account menu).

Re: Early Morning Breakout Backtesting on EURUSD and GBPUSD

Thank you.
I have updated Data Horizon to 50,000, switched to M5, deleted the day of week indicator and amended the spread to 20 and the SL and TP to 200 and 1000 respectively as using 5 digits.

Attached are current main screen shot and account settings.

I would like to build a reliable back test that covers a number of years so should I do this on hourly data rather than shorter time frames given the 50,000 maximum bar situation? or run several reports.

What is FSB showing me? It appears to show that testing those 20000 bars has provided two trades on bar 137 resulting in a loss of 0.46?

I trade this strategy on a daily basis so there should be at least one trade a day. Apologies if I am misunderstanding this. I appreciate your patience.

Post's attachments

FSB Main Screen.JPG 184.92 kb, file has never been downloaded. 

You don't have the permssions to download the attachments of this post.

Re: Early Morning Breakout Backtesting on EURUSD and GBPUSD

Account Settings Screen Shot attached.

Post's attachments

FSB Account Settings.JPG
FSB Account Settings.JPG 31.83 kb, file has never been downloaded. 

You don't have the permssions to download the attachments of this post.

Re: Early Morning Breakout Backtesting on EURUSD and GBPUSD

Alright, we're getting there. It says "margin call" on the equity chart, and that means what it says. You have to raise the account balance and/or leverage.

For covering the years you have couple of options - use data horizon to divide the data to 50,000 bar blocks and go through them one by one, raise the bar limit over 50,000 thousand (drawback is that it might slow things down a bit), switch to H1 and use the scanner to interpolate the ambiguous bars.

Re: Early Morning Breakout Backtesting on EURUSD and GBPUSD

OK. Thank you very much for your help.

The idea of me backtesting was to give me confidence with my strategies and refine them. If the results are correct I need to do some serious refining or start again!!!

The doubt in the back of my mind is that using this strategy I have made some good profits which makes me concerned that some of the parameters I have put in to the FSB software need amending.

Can you clarify that:

1. The Market statistics window top left is where you determine the 4 digit or 5 digit data usage? The confusion for me is that under this FSB window it shows minium price 1.8758 (5 digit) and minimum price 1.6038 (4 digit). Also when I open my csv data it shows a combination of 4 and 5 digit data. As you said at the start this is important because at present my SL is at 200 representing 20 pips (not 20 for 4 digit) and TP is 1000 representing 100 pips.

2. On the Opening Point of the Position (hourly High Low Enter long at the hourly high between 0 and 6 with vertical shift of 7) is this telling FSB to enter long on the high over that 6 hour period and short on the low or on each hourly bar's high and low? I would like the system to enter the trade 7 pips above the highest high over that time period and short on the lowest low over that period. Is that what this opening position does?

3. If I use hourly bars instead of 5 minutes will this reduce the reliability of the results? The imported hourly data shows Open, Close and High and Low so are all of these used in the report or just the open and close? If just the Open and close presumably the price action could move to trigger my profit or stop within that hour but not show on the report?

Screen shot attached.

Thank you again for all your assistance.

Re: Early Morning Breakout Backtesting on EURUSD and GBPUSD

Main Screen Shot

Post's attachments

FSB Main Screen.JPG 274.23 kb, file has never been downloaded. 

You don't have the permssions to download the attachments of this post.

Re: Early Morning Breakout Backtesting on EURUSD and GBPUSD

....
4. I just realised I also need to change the vertical shift under the opening logic from 7 to 70 if using 5 digit data. Using the indicator chart (attached) it was previously showing hourly high 1.45173 and long position entry price 1.45180 when it should be 1.45240.

Post's attachments

FSB Indicator Chart.JPG 80.8 kb, file has never been downloaded. 

You don't have the permssions to download the attachments of this post.

Re: Early Morning Breakout Backtesting on EURUSD and GBPUSD

cfrancis wrote:

OK. Thank you very much for your help.

The idea of me backtesting was to give me confidence with my strategies and refine them. If the results are correct I need to do some serious refining or start again!!!

The doubt in the back of my mind is that using this strategy I have made some good profits which makes me concerned that some of the parameters I have put in to the FSB software need amending.

Can you clarify that:

1. The Market statistics window top left is where you determine the 4 digit or 5 digit data usage? The confusion for me is that under this FSB window it shows minium price 1.8758 (5 digit) and minimum price 1.6038 (4 digit). Also when I open my csv data it shows a combination of 4 and 5 digit data. As you said at the start this is important because at present my SL is at 200 representing 20 pips (not 20 for 4 digit) and TP is 1000 representing 100 pips.

No, I looked at the journal. If you have a price with 5-D it means it is 5-D data, it can't be a mix, a price of 1.6038 is actually 1.60380. There's no problem of making 5-D to 4-D in FSB.

2. On the Opening Point of the Position (hourly High Low Enter long at the hourly high between 0 and 6 with vertical shift of 7) is this telling FSB to enter long on the high over that 6 hour period and short on the low or on each hourly bar's high and low? I would like the system to enter the trade 7 pips above the highest high over that time period and short on the lowest low over that period. Is that what this opening position does?

Yes, that's exactly what you are telling it to do, but if the setting is from 0 to 6, the period is 5 hours, 6 is excluded as the indi states. If you want 6th hour included, indi should be set from 0 to 7, at the same time entry time has to be adjusted from 7-13 too, otherwise testing results might be not correct.   
Look at this screenshot below, I've defined High and Low of that 5 hour period, position gets opened 7 pips below the low, and Sl gets triggered on that trade.

http://s17.postimage.org/r1lpqf8u3/colin_strat.jpg

3. If I use hourly bars instead of 5 minutes will this reduce the reliability of the results? The imported hourly data shows Open, Close and High and Low so are all of these used in the report or just the open and close? If just the Open and close presumably the price action could move to trigger my profit or stop within that hour but not show on the report?

The way FSB works is absolutely the same in every TF. But I can understand your worry here, suddenly the strat which was profitable seems to be dangerous. Couple of comments - automatic trading differs from manual, different results are to be expected to appear, the discrepancy between them is a matter of debate.

An example: before using the scanner:
http://s18.postimage.org/6fsp9xdw5/colin_strat1.jpg

After using the scanner:
http://s13.postimage.org/mey17nhk3/colin_strat2.jpg

Quite obvious change, isn't it?

Re: Early Morning Breakout Backtesting on EURUSD and GBPUSD

cfrancis wrote:

....
4. I just realised I also need to change the vertical shift under the opening logic from 7 to 70 if using 5 digit data. Using the indicator chart (attached) it was previously showing hourly high 1.45173 and long position entry price 1.45180 when it should be 1.45240.

You are absolutely correct!

Re: Early Morning Breakout Backtesting on EURUSD and GBPUSD

Thank you very much. I appreciate your comprehensive response.