forex software

Create and Test Forex Strategies

forex software

Skip to forum content

Forex Software

Create and Test Forex Strategies

You are not logged in. Please login or register.


Forex Software → Expert Advisor Studio → MT4 Data Question- Backtesting

Pages 1

You must login or register to post a reply

RSS topic feed

Posts: 11

Topic: MT4 Data Question- Backtesting

Hi Guys,

So I have exported my broker data from MT4 in EA, generated a strategy, set the spread in MT4 backtester and EA the same however in EA my strategy makes $400 over a given time however in MT4 over the same time period it looses about $600. This is using all the data methods in MT4 as well.

Ive done some reading and found alot of people say you need to import data into MT4 to get a decent back test.
I found that when backtesting in MT4 the red/green/grey bar in 'Report' is 80% red. My understanding is that it means it doesnt have good data.

So my question is do i need to import data from somewhere into MT4 and the reimport it to EA. However if I do this ll be creating strategys not using my broker data.

Could someone please give me a clear understanding of how to get accurate results on both EA and MT4?

Thanks

Re: MT4 Data Question- Backtesting

Use the Tool tickstory.. You can download tickdata.. And Import to Mt4 than use Export Tool..

Re: MT4 Data Question- Backtesting

I agree with DeadLef

Broker data often has holes in it, where as TickStory is of much better quality.

Re: MT4 Data Question- Backtesting

Ok so I have downloaded tick data from SQ Tick Downloader (Dukascopy) and built my stategies on this data.

However, this is where I am really confused and at a loss.

I ran a particular strategy for a bit over a week and it made $17 profit. When I backtest it over that same week the bot was runnning on MT4 using the same PC that I leave MT4 running 24/7 the results lined up with the PnL and trade times etc as to what actually happened. When I load that data into EA Studio it gives me the same result as MT4 as it should.

Here is where Im having an issue. On my PC that I build my strategies on which has Dukascopy data on it if backtest the bot on both MT4 and EA Studio it shows a loss of $60 so basically the Dukascopy data is completly different to my brokers data which I understand MT4 logs as long as the program is up and running.

So Im still at a point where I cannot get any reliable data to build strategies around.

Does anyone have any idea as to what I could do.

Re: MT4 Data Question- Backtesting

> So Im still at a point where I cannot get any reliable data to build strategies around.

The best data for creating strategies is from the broker you are going to use for trading. Think for it as if you want to buy the best performing car tested on a highway and to want the same results on a village dirt road.

Re: MT4 Data Question- Backtesting

Yes I understand that Popov but if you cannot get reliable data from my broker ie I can only get a few months worth and still don’t know how good of quality it is. What would be the next best thing? Keep MT4 running 24/7 and collect all the data over time? Because I think you said in another thread that as long as MT4 is running it will collect the data at the time it is running?


Popov wrote:

> So Im still at a point where I cannot get any reliable data to build strategies around.

The best data for creating strategies is from the broker you are going to use for trading. Think for it as if you want to buy the best performing car tested on a highway and to want the same results on a village dirt road.

Re: MT4 Data Question- Backtesting

Keep MT4 running 24/7 and collect all the data over time?

Yes, this is a solution. The MT may run all the time or you can run it every several days and to pass through all charts and periods. MT will save the files on your local machine.

It is possible to find someone that uses this broker and is in your timezone and to ask for the files. You can replace your local files with the more complete ones. After that MT will continue updating them.

I personally found a broker that has more or less good data and maintain an account there. I feed EA Studio from that broker.

Re: MT4 Data Question- Backtesting

Not a problem, for now that looks like the only solution for me is to run MT4 24/7 as it already is on my PC running my bots.

I will put up a post in the forum asking if anyone has the data from my broker.

Is there anyway to tell before making an account which brokers will have ‘reliable data’?

Another question I have is if I import say 3 years of Dukascopy data into EA Studio then import the brokers data which is say 2 months worth. Will Ea Studio over ride only the last 2 months allowing me to have 2 years and 10 months of Dukascopy data and 2 months of broker data or will it override the Dukascopy completely and leave me with only 2 months worth of data?

Re: MT4 Data Question- Backtesting

> Will Ea Studio over ride only the last 2 months allowing me to have 2 years and 10 months of Dukascopy data and 2 months of broker data or will it override the Dukascopy completely and leave me with only 2 months worth of data?

If the uploaded files are from the same server, EA Studio will override the complete files.

Re: MT4 Data Question- Backtesting

OK, so I have imported all new data into my MT4 via TickStory.

I have ran the Data Script several times now, using the same account currency, commisions and spread I still cannot get the very very different backtesting results in MT4 and EA Studio.
I have tried backtesting portfolios, single EA's, EA's with and fixed TP and SL. Everything i try I have no success.

The count of trades is incorrect by up to 30%, wins/losses on each trade is wrong. There is almost no correlation between testing in MT4 and EA Studio. I have even imported the Data into MT4 several times then re exporting it.
I have scrolled through the different timeframes using the home key as the video says to before exporting data.
I have followed the instructional video from EA Sudio on YouTube step by step, I have tried every method of backtesting on MT4.

I literally have run out of ideas, the problem is I have no idea if the MT4 backtester is wrong or EA Studio is wrong, how can i possibly know if I am actually generating strategies that have even the slightest possibility of working.

There has to be someone who has had the same issue and found a solution.

Thanks guys really at my wits end with it ive spent 2 days trying to work this out so far.

Re: MT4 Data Question- Backtesting

Ok, so I have FINALLY worked it out after tearing a few hairs out.

1. The history files in both the history folder and the tester folder need to be locked as read only, or as I believe MT4 overrides them with broker or metaquotes data. Either way the two data sets between tester and history were different.

2. When I worked this out I tried a strategy with both a 15pip fixed SL and 15pip TSL. The fixed stop loss had identical backtesting results as MT4. The trailing stop had very different results generating over 6x profit as MT4, however the TSL logic has a flaw in it:

When I went through the report on EA studio I had several losses that far exceeded what a loss of 15 pips would amount to, almost 3x the amount in 2 cases. Popov could you please have a look into this? The Bot did not open up mutiple positions as to result in a large loss this was one position opened and the stop loss not set correctly.

Posts: 11

Pages 1

You must login or register to post a reply

Forex Software → Expert Advisor Studio → MT4 Data Question- Backtesting

Similar topics in this forum