Multiple symbols in one EA
-
I am trying to build an EA that works differently on multiple symbols. I am testing it to see if it works how I want it to work and even tho in my second area, I only have the buy now conditions set up, when running the tester it takes sells. I want to know if anyone can tell me why. I typed the symbol into the "check trades count" block at the top of each area tree as well as in the "buy now" and "sell now" blocks.
-
@dgoodwin418 It's not in the buy/sell block, on mt4 will only work if testing on symbol.
-
@jstap I'm not sure I understand what you're saying. If you're saying I didn't insert the symbol in the buy/sell block, i went in and changed that. Now, I'm not getting any orders being placed in the tester when I test it on AUDUSD (my second area) and I'm getting less trades when I test it on EURUSD (my first area)
-
@dgoodwin418 In back testing this will only work on eurusd, when you back test this is symbol needed to use, on live/demo will work on any symbol but place trade on eurusd, don't know why your getting less trades.
-
@jstap to make sure I understand.... you are telling me that the way I am going about it is right but I won't be able to test it on the different symbols? So if I attach it to EURUSD, it will also execute trades for the other symbols but I have to open it on only on EURUSD. Correct?
-
@dgoodwin418 You are doing it right, will work on any symbol chart, but only place on EURUSD, back test will only work on symbol selected.
-
@jstap hello and thank you for your help. I am back to working on this project and i am having the same issue as I was having before. I have one set of conditions to take trades on EU and I have them set in an area of their own. In a separate area, I have the conditions to take trades for AU. The EU trades produce results in the tester but the AU trades don't generate anything. Please help if you can
-
@dgoodwin418 Are you sure the AUDUSD symbol is visible on the Market Watch Windiw? If not, not trade will be open there.
-
@dgoodwin418 said in Multiple symbols in one EA:
@jstap hello and thank you for your help. I am back to working on this project and i am having the same issue as I was having before. I have one set of conditions to take trades on EU and I have them set in an area of their own. In a separate area, I have the conditions to take trades for AU. The EU trades produce results in the tester but the AU trades don't generate anything. Please help if you can
the answer is this: you can't backtest multiple pairs in mt4, if you want to backtest multiple pairs you have to migrate to mt5
-
@ambrogio thank you for your response. I do, based on your response, have a couple questions. The first question is, what determines which pair the tester will test? Is it only allowing me to test EU because that pair was set up in my first area? And my second question is, am I to assume that it will work in a live trading environment as long as everything is setup how I want it setup? And I guess a third question will be when I do put this on a live chart, do I have to put it on every chart or just EU and it will trade the other pairs? Thank you in advance for your response.
-
@l-andorrà thank you for your response. The answer to your question is yes it is available in the Market Watch Window
-
@dgoodwin418 no matter the area, that is just for your convenience.
Example:
MT4 : this way you can backtest only on EURUSD chart, if you leave the "symbol" empty you can backtest on any chart you choose on tester.
Example :

MT4: you can't backtest it because MT4 doesn't allow multipair backtest, but you can place the expert on demo on a singol chart (EURUSD or USDJPY) and you can see it opens both trades on both symbol
-
@ambrogio ok. I'm with you now. I appreciate you showing the examples. Thank you for your time and help.
-
@dgoodwin418 you're welcome!