Download MetaTrader 5
To add comments, please log in or register
Have you found a good programmer? Make a targeted order!
Mahmoud Farajpour
220
Mahmoud Farajpour 2015.12.17 22:33 
How do i exactly use symbolselect function?
I used it this way it doesn't work

String pair="EURUSD";
SymbolSelect(Pair,true);
Alert (symbol());

 i use alert to see if the symbol is selected but i see it always alerts usdchf by default,
Please me with,  write the exactly code which select EURUSD symbol
Alain Verleyen
Moderator
30635
Alain Verleyen 2015.12.18 00:20  
Please don't double or triple post.
Sergei Vladimirov
8764
Sergei Vladimirov 2015.12.18 07:46  
mahmood0:
How do i exactly use symbolselect function?
I used it this way it doesn't work

String pair="EURUSD";
SymbolSelect(Pair,true);
Alert (symbol());

 i use alert to see if the symbol is selected but i see it always alerts usdchf by default,
Please me with,  write the exactly code which select EURUSD symbol
string pair = "EURUSD";

if(SymbolSelect(pair, true) == true)
   Alert ("EURUSD is selected successfully");
else
   Alert("EURUSD is not selected");
Mahmoud Farajpour
220
Mahmoud Farajpour 2015.12.18 10:12  
Sergei Vladimirov:
The code you wrote returns true(either mine),
But if really eurusd is selected why does alert() still show eurusd?
I mean if you use Alert (Symbol());  instead of what you wrote, ot shows USDCHF
Mahmoud Farajpour
220
Mahmoud Farajpour 2015.12.18 10:14  
Alain Verleyen:
Please don't double or triple post.
Ok sorry
Marco vd Heijden
Moderator
4680
Marco vd Heijden 2015.12.18 10:24  
mahmood0:
The code you wrote returns true(either mine),
But if really eurusd is selected why does alert() still show eurusd?
I mean if you use Alert (Symbol());  instead of what you wrote, ot shows USDCHF

that is impossible.

there is no USDCHF to be found in the print commands.

   Alert ("EURUSD is selected successfully");
else
   Alert("EURUSD is not selected");


however if you mean

Alert(Symbol());

it will simply only alert the chart symbol.

so you use,

if(OrderSymbol()=="EURUSD")
 {
  Alert("EURUSD Selected");
 }


With OrderSelect() so not with SymbolSelect() it depends on what you are trying to do which is a mystery to me as of yet but it seems you are trying to select an order.

Jose Miguel Soriano
4957
Jose Miguel Soriano 2015.12.18 10:45  
mahmood0:
How do i exactly use symbolselect function?
I used it this way it doesn't work

String pair="EURUSD";
SymbolSelect(Pair,true);
Alert (symbol());

 i use alert to see if the symbol is selected but i see it always alerts usdchf by default,
Please me with,  write the exactly code which select EURUSD symbol
SymbolSelect () selects a symbol in Market Watch, but Symbol() and other generic functions always are refers to the graphic symbol.
If symbolselect ("symbNom") == false you can not get price information of "symbNom"
/
To add comments, please log in or register