What to learn for backtesting: C++, VBA?

Hi Team,

I never thought I’d ever be caught dead in the Expert Advisor/Automated Trading section, but I’m increasingly realizing that by not having the ability to quickly analyze past market data I’m at a significant disadvantage.

I’ve tried to do manual back-testing in Metatrader, but it is extremely time consuming and vulnerable to errors due in part to visual interpretation problems. I’ve also used Excel and its basic =IF() functions, but I’ve realized that with the massive amounts of data that needs to be tested (there are 1440 minutes in a day), this can get very messy very fast if I want to test like 5-8 years of data.

Increasingly its becoming obvious that I have to learn how to code properly if I want to get things done faster and have more control. I could just learn MT5, but the problem is that its a fairly specific language and you can’t use MT5 to analyze non-FX prices (e.g. stocks, options, indexes, etc).

Is learning VBA a good idea? This way I could test things directly in Excel. Or perhaps C++ is a better investment of my time? I know that C++ is closer to MT5, and is used to write actual programming code as opposed to back testing. As long as I can get C++ to open an Excel file I guess it’d work. Knowing both of course would be optimal and is what I’d prefer to do, but it pays to start somewhere first. I did have some programming experience in C back in the pre-OOP days, so I’m not a total noob (e.g. I know what a pointer is) but its been YEARS. Any suggestions would be appreciated.

Imho, go for Java. It’s a subset of c++ and widely available for all sort of computers and the syntax is like that of mql. It’s easier to learn than c++ and if you just want to learn to code, c++ is not needed.

If you know how to code in Java, you can jump to every other language without big obstacles, because all oo language syntax core rules are more or less equal.

I hope that helps.

I take it you want to test a system?

Easiest way is with an expert adviser.
Mt4 is basically c++. I would forget about mt5.

If you are going to write an Expert advisor, I would suggest start by using a template or another EA. That way you dont have to know much about the ins and outs of the ea. You can just replace indicators etc.
download the mql4 manual. It will help you with indicators, syntax, etc.

Thanks. I want to test ideas, and I want to have inputs for data mining purposes basically…

How different is MT5 from MT4? Is MT5 more or less like C++ as opposed to MT4?

Also, is it possible to include non-FX market data in Metatrader?

Thanks again…