Download MetaTrader 5

Gold EA error?

To add comments, please log in or register
Deposit to your account via Visa QIWI Wallet
hanchian0503
21
hanchian0503 2015.06.23 16:35 

I wrote a code for Gold pair, but it didn't work.

if((Symbol() == "XAUUSD")|| (Symbol()== "XAUUSD-") ) pips = 0.1;
int buystop= OrderSend(Symbol(),OP_BUYSTOP,0.1,Ask+50*pips,5,Ask+40*pips,Ask+70*pips,NULL,0,0,clrNONE );

 Anyone knows the reason?

Marco vd Heijden
Moderator
4685
Marco vd Heijden 2015.06.23 16:45  

and what is

if((Symbol() == "XAUUSD")|| (Symbol()== "XAUUSD-") ) pips = 0.1;
if(Symbol() == "XAUUSD"|| Symbol()== "XAUUSD-") 
 {
  pips = 0.1;
 }
Alain Verleyen
Moderator
30711
Alain Verleyen 2015.06.23 18:58  
hanchian0503:

I wrote a code for Gold pair, but it didn't work.

 Anyone knows the reason?

What didn't work ?
Alain Verleyen
Moderator
30711
Alain Verleyen 2015.06.23 18:58  
Marco vd Heijden:

and what is

What's the difference ?
Marco vd Heijden
Moderator
4685
Marco vd Heijden 2015.06.23 19:30  
style and readability ?
Alain Verleyen
Moderator
30711
Alain Verleyen 2015.06.23 19:39  
Marco vd Heijden:
style and readability ?
Ok sure.
To add comments, please log in or register