remember if everything works correctly so your order is opened, you are expecting OrderSend() to return a ticket number it is not likely to be a ticket number of zero
I was assuming your Fehler() function was to proceed after a successful OrderSend() but now after thinking about it, my limited German has me suspecting Fehler translates to fail ?
either way you should change your code to reflect the following:
if the OrderSend() is successful NewLongMagicSent will be assigned the value of the ticket number which will be >0
if OrderSend() fails NewLongMagic will be recieve the value of -1
I have to thank you very much. Nearly all works now. It seems, that it was a wrong call of the ordersend, but sometimes it opened and opened buys over and over, but sometimes not.. i get wired ^^
Fehler means mistake or fail or in this case error, right ;) But this problem too, has been solved. :)
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Please use this to post code . . . it makes it easier to read.
You need to show the code that produces the -1 return value . .
you need to add to that to get the error code.
{ Fehler(); } else { Print("Ticketnumber = " + NewLongMagicSent); Alert("OrderSend Error = ", GetLastError()); } }you probably also should change this line
to
remember if everything works correctly so your order is opened, you are expecting OrderSend() to return a ticket number it is not likely to be a ticket number of zero
actually before you do that let me ask you, which did you want to do if the OrderSend() is successful ?
The Fehler() function or Print ticket number ?
I was assuming your Fehler() function was to proceed after a successful OrderSend() but now after thinking about it, my limited German has me suspecting Fehler translates to fail ?
either way you should change your code to reflect the following:
if the OrderSend() is successful NewLongMagicSent will be assigned the value of the ticket number which will be >0
if OrderSend() fails NewLongMagic will be recieve the value of -1
Hey people,
I have to thank you very much. Nearly all works now. It seems, that it was a wrong call of the ordersend, but sometimes it opened and opened buys over and over, but sometimes not.. i get wired ^^
Fehler means mistake or fail or in this case error, right ;) But this problem too, has been solved. :)
Thank you all so much :)