OrderSend - Using multiple symbols - "unknown symbol name EURUSD for OrderSend function"

 

Hi, I coded an EA that can open positions on multiple symbols. So if I backtest it on GBPUSD I'm expecting it to open positions on other symbols as well, like EURUSD, but this gives an error. Here's the code that returns an error when I backtest in a different symbol than EURUSD. The error is error 4106 - "unknown symbol name EURUSD for OrderSend function"

      euticketbuy = OrderSend("EURUSD",OP_BUY,0.1,Ask,3,0 ,0,NULL,0,0,Green);
      if (euticketbuy == -1)
         Print("Error buying - ", GetLastError());


Is this even possible? If not I don't understand why OrderSend allows to put any symbol in it...

 

You can't backtest multi currency EA.

There is a creative workaround.

See my thread from a few moments ago:

https://www.mql5.com/en/forum/127550