This page is deprecated. Check out here.
Expert Advisor testing is usually done with MetaTrader’s own Strategy Tester tool.
Due to Metatrader’s license, testing any EA as executable without violating MT license is virtually impossible.
Smart Forex Tester uses C++ for strategy definition. Which makes it possible to test Expert Advisors as a source code. Because MQL is very similar to the C++.
We started from implementing our trading strategies as Expert Advisors, but soon dropped this idea. We got disappointed by drawbacks of MT4 strategy tester and se decided to develop our own strategy tester software.
In our software, we didn’t have to stick with EA formalism, so we implemented trading strategies as state machines. Which best suits our purposes. Also in our approach the logic of the strategy is more clear – compared to the case when strategy is fully defined by a piece of software.
However, due to overall popularity of Expert Advisors, we also provided in our software a partial support to the strategies as EA – on the source code level. This became possible when we added trading strategies as C++ code in our all-new Smart Forex Tester. C++ is very much compatible with MQ, the language the Expert Advisors are written in.
To test an Expert Advisor in our Tester, you need to make some straightforward changes into its source code. There are language changes and trading functions replacement.
First of all, you need to load the EA source code into our Tester and compile it. At this phase there might be some errors, as MQ is not fully compatible with C++. You need to fix that by making small changes in the syntax.
Next, we need to replace the market data and trading functions, like onTick() or orderSend(), with the corresponding interfaces to the Tester engine that are available to the trading strategy.
Note that the primary reason we added C++ support to our Tester was not to enable Expert Advisor testing. Programming environment is needed to give more power to the users to define their strategy.
You can check out our tester here.
Go on and develop it!