symbol() within EA's

 
In my EA I tried to use a symbol diffrent from the chart symbol and got an error - 4106 that maens - unknown symbol.
my question is how do I iuse more than 1 symbol() in an ordersend cmnd in an EA ?
 
mtene10:
In my EA I tried to use a symbol diffrent from the chart symbol and got an error - 4106 that maens - unknown symbol.
my question is how do I iuse more than 1 symbol() in an ordersend cmnd in an EA ?
extern string Pair1="EURUSD";
extern string Pair2="GBPUSD";

ticket=OrderSend(Pair1,OP_SELL,lots,MarketInfo(Pair1,MODE_BID),1,0,0,"My Comment",MagicNr,0,Coral);

ticket=OrderSend(Pair2,OP_BUY,lots,MarketInfo(Pair2,MODE_ASK),1,0,0,"My Comment",MagicNr,0,LawnGreen);

Cheers
 
mtene10 wrote >>
In my EA I tried to use a symbol diffrent from the chart symbol and got an error - 4106 that maens - unknown symbol.
my question is how do I iuse more than 1 symbol() in an ordersend cmnd in an EA ?

ggekko,

thanks for your reply, however I get errors when using a pair diffrent form the chart pair.

 
mtene10 wrote >>

ggekko,

thanks for your reply, however I get errors when using a pair diffrent form the chart pair.

The Strategy Tester is limited to one pair at a time. It will work in real-time, but you can't back test it.

 
tovan wrote >>

The Strategy Tester is limited to one pair at a time. It will work in real-time, but you can't back test it.

Tovan,

Thanks for your reply. Sad that it's not possible to examine EA's properly.

Reason: