SymbolSelect()

 
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
 

What are you trying to do?

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

 Places a symbol in the Market Watch window if it is not already there.

Alert (symbol());

 gives a pop-up alert showing the chart symbol

The symbol in the 2 pieces of code are not related to each other 

 
GumRai:

What are you trying to do?

 Places a symbol in the Market Watch window if it is not already there.

 gives a pop-up alert showing the chart symbol

The symbol in the 2 pieces of code are not related to each other 

 

 

Thanks for responding...
My ea doesn't care about charts it just read trading signals from a txt file and open the trades...
For example the txt file says open a EURUSD buy...
So here my ea should select eurusd symbol in order to run orderSend function on that pair

All symbols i need are already exist on market watch, i need to select a specified one to make an order on
 
String pair="EURUSD";
Then you use the variable "pair" in your OrderSend etc.
 
GumRai:
Then you use the variable "pair" in your OrderSend etc.

May I ask your email? Or whatsapp number..
 
GumRai:
Then you use the variable "pair" in your OrderSend etc.

Didn't work
Each time i run my EA a default pair (usdchf) will appears and get active on chart
 
Mahmood000:

May I ask your email? Or whatsapp number..
Sorry, I'm not going to post my email here.
 
Mahmood000:

Didn't work
Each time i run my EA a default pair (usdchf) will appears and get active on chart

Then there is something wrong with your code.

Post your code and somebody may be able to help you. 

 
GumRai:

Then there is something wrong with your code.

Post your code and somebody may be able to help you. 


What you mean is:
OrderSend(eurusd,OP_buy,....); 
Right?
Didn't work

 
Mahmood000:

What you mean is:
OrderSend(eurusd,OP_buy,....); 
Right?
Didn't work

No, unless eurusd is the name of a string variable.

Symbol must be a string ie "eurusd "

 
Mahmood000:
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
Help...