Please use this to post code . . . it makes it easier to read.
What is the error number returned ? You are passing ErrorDescription a string, should it take a string or an int ?
stone35:
How did you get those cute chinese characters into Editor? First time seeing this, interesting.
HI, all
int ticket=OrderSend(Symbol(),OP_BUY,1.0,Ask,5,0,0,"macd sample",1,0,Green);
string tktstring = ticket;
MessageBox(tktstring,"错误",1);
string errstr = GetLastError();
MessageBox(ErrorDescription(errstr),"错误",1);
TICKET = -1
ERROR Description = no error
please help me, thanks!
int ticket=OrderSend(Symbol(),OP_BUY,1.0,Ask,5,0,0,"macd sample",1,0,Green); string tktstring = ticket; MessageBox(tktstring,"错误",1); string errstr = GetLastError();Capture the last error BEFORE you loose it with messageBox.
int ticket=OrderSend(Symbol(),OP_BUY,1.0,Ask,5,0,0,"macd sample",1,0,Green); string errstr = GetLastError(); // Capture immediately string tktstring = ticket; MessageBox(tktstring,"错误",1);Why use a message box when alert is just as convenient?
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
HI, all
int ticket=OrderSend(Symbol(),OP_BUY,1.0,Ask,5,0,0,"macd sample",1,0,Green);
string tktstring = ticket;
MessageBox(tktstring,"错误",1);
string errstr = GetLastError();
MessageBox(ErrorDescription(errstr),"错误",1);
TICKET = -1
ERROR Description = no error
please help me, thanks!