[TUTORIAL] Complete Backtesting and Analysis Setup (100% Free)

I have experience on PHP an MySQL, not ASP.NET :slight_smile: also MQL4, Javascript

That’s great. It’s always nice to have a big skillset in our industry. :slight_smile:

Thanks for the info. Everything worked out great for me.

There is one thing though, when i run the MACD sample test in the strategy tester I get a bunch of “OrderModify Error 1” entries in the journal. The report seems to be fine but are these errors effecting my results in anyway?

Order Modify Error 1, from what I recall, simply means the EA is attempting to modify the stop or take profit level, but the new value is already the same as the current one that is set.

I do not think it affects your backtest in any way. Although I would try to avoid any errors when it comes to testing your own EAs. But since you were testing the MACD Sample EA, I wouldn’t worry about it at all.

I noticed that your MACD sample test was unprofitable. I ran mine on EUR/USD from feb 1, 2013 to May 14, 2013(yesterday) using the h1 chart and actually got good results. I won 20 of 22 trades. and made $529 profit from a starting balance of $10,000. Winning 20/22 seems very unrealistic. Do you think the test I ran screwed up somehow? maybe those errors had something to do with it?

also: not all 20 were actual wins there were a few where i broke even. But only 2 where I actually lost cash though.

Haha, who knows, you might have stumbled onto the holy grail by accident. :wink:

I can’t remember which period I ran my test for, the reason our results are varied is simple due to different time spans. February to May is a pretty short time, the EA may have gotten a little lucky lately. :wink:

Actually, now that I look at the time span you tested, it seems like almost the perfect conditions for a MACD based EA to succeed. Haha

Damn. If I only I knew this three months ago hahaha. But overtime this strategy would be unprofitable you think?

Also, do you know where i can find a good tutorial on how to use the expert advisor wizard? I opened it up and am completely lost haha.

edit: I noticed mql5 has a feature where it builds the code for you. I can’t figure out how to use this feature on mql4 though. Is mql4 code only?

Hey Clark, I went thru all these steps, but when i try to convert the file, thru the C: it never opens to get thru that step. Is it maybe the wrong download of python?

[QUOTE=“MoneyNVRSleeps;490471”]Hey Clark, I went thru all these steps, but when i try to convert the file, thru the C: it never opens to get thru that step. Is it maybe the wrong download of python?[/QUOTE]

I’m a little confused; which step did it not work?

I am using Python 3.

[QUOTE=“loganperillo;490464”]

Damn. If I only I knew this three months ago hahaha. But overtime this strategy would be unprofitable you think?

Also, do you know where i can find a good tutorial on how to use the expert advisor wizard? I opened it up and am completely lost haha.

edit: I noticed mql5 has a feature where it builds the code for you. I can’t figure out how to use this feature on mql4 though. Is mql4 code only?[/QUOTE]

In my opinion the MACD Sample EA that is included will probably not perform very well in the long run. But then again, who knows, you may have found some way to make it work! That’s the beauty with system trading, sometimes a small edit/addition can change the system dramatically!

In terms of programming EAs there are many books/articles on MQL4 and MQL5. Keep in mind I was using MT4 and everything I’m doing will not work with MT5 without a few adjustments .

There are also many WYSIWYG builders available. Although I advocate going through it the hard way and learning to program from scratch.

Would you recommend an upgrade to MT5? Is it supported by most brokers yet? because the EA wizard in MT5 seems to be alot more user friendly. You can build EAs without coding. I really would like to avoid learning to code MQL4 it seems like alot of work hahaha. I’d rather focus that energy on developing the actual strategies and trading.

I have talked to many brokers and most are NOT looking to make the transfer at all. MT5 is too buggy and it’s just a pain.

Personally, I’m not a fan of it at all.

And again, I would recommend you spend the time learning how to program early on or else you will have a time where you are stuck. There really is no lazy/easy way out. If everyone and their dog could build strategies and just run them, this department of the industry would be WAY over-saturated.

You’re probably right I should learn mql4. There’s still a lot I need to figure out within the MT4 program itself first though.

Don’t rush into things. It will take time. :slight_smile:

Do you have any recommendations in developing my first trading system? I see alot of people on here saying newbies should stick with price action and forget indicators.

I would say don’t even start system trading until you can trade profitably manually.

Hi Clark,

I have some question to ask.

I currently backtested one of my EA and I found something weird. I use the data provided by the broker.

What I found weird is , the results from Market open day and Market closed day are different.

For example , I backtested during weekday, I get a different results when I backtested during weekend.

Which one will be the accurate one?

When you use the Strategy Tester and you’re connected to a trading server, the spread is set to the current spread, so during weekends your spread will be bigger compared to your weekdays. As a result your backtests will vary slightly.

If you’re working online (connected and logged in with a broker) I would recommend backtesting when you feel the EA will be placing trades (weekdays).

I will try it tomorrow. I hope it will be the same as what I get during last weekday. Because my EA is just a simple EA. Trade during the London open.

I would advise downloading another copy of MT4 solely for backtesting, it will be a lot easier to manage. Rather than using 1 MT4 for your trading and backtesting.

The reason is if you’re importing your own data into MT4, once you are connected to a broker, your imported data will get replaced with the broker’s feed. As well as the issue with spreads which you talked about just now. All in all, it makes sense to have another copy of MT4 just for the strategy tester, and make sure to never log in and always disconnected.