Create and Test Forex Strategies
When you open a strategy in the Editor, you can export it as an Expert Advisor. To do it, click the Expert Advisor button in the toolbar, and a drop-down menu will give you options to export Expert Advisor for MetaTrader 4 and MetaTrader 5.
There are several Export options:
The exported Expert Advisor is 100% native MQL code and doesn't require any third-party libraries or indicators to run.
Using different Magic Numbers
When trading several Experts on the same symbol, they must differentiate between each others' positions. MetaTrader allows us to use a unique Magic Number for each Expert. EA studio will export Expert Advisors with a random Magic Number built-in in the Expert to differentiate its positions from other Experts when trading. However, it is up to you to ensure each Expert you trade on the same symbol has a different Magic Number. Should you have duplicate Magic Numbers, you can change the Magic Number in the Expert's code or from the Inputs options of the Expert.
You cannot trade multiple Experts simultaneously on the same symbol in MT5.
The solution would be an MT5 Hedging account, which can trade several experts per symbol. If using this feature, set a different Magic Number for each Expert Advisor.
A dialogue window will open when you drag and drop the Expert onto the chart. You can review the Expert Advisor options in the Inputs tab.
You can test the Experts in the MetaTrader Strategy tester (View > Strategy Tester).
You should get the same result in the MetaTrader test as in EA Studio. If there is a discrepancy, check if you are using the same data, spreads and commissions. If there is still a discrepancy, please open a topic in the support forum.