ERR_UNKNOWN_SYMBOL

 

Hi,

I made an EA whose decisional structure can succeed managing several symbols (pairs). But it seems no allowed to open position with pairs different from that of the current chart (Symbol()).

If my line is, e.g.:

OrderSend("EURUSD", OP_BUY, 0.1, ask, 3, bid-15*point, bid+15*point, NULL, 9999, 0, Gray);

where:

double bid =MarketInfo("EURUSD", MODE_BID); // Request for the value of Bid
double ask =MarketInfo("EURUSD", MODE_ASK); // Request for the value of Ask
double point =MarketInfo("EURUSD", MODE_POINT);

Why does it return the error in subject?

Is it truly possible to open positions through different symbols?

Thanks.

SA

 
Check the symbol you need by printing out Symbol() for the current chart. Some brokers use other symbols for mini accounts and so on.