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 V,
Above should be clearer now,
I specify $2,000 per 0.1 lot with an external double variable...
Regards, M
My instinct is telling me the problem is with the error block function or specifically what you do with the output... I think to confirm, try commenting out the function call and just put an alert with an error code and see if that solves the problem... when you return 1 what happens next? the comments suggest you go on to re send the order somewhere. I would also make sure to call get last error as a variable directly after the order send just to make sure we are picking up the correct order... I admit I am perplexed though as if the oder is succesful it should skip the else part... maybe try this and see how it works for you...
My instinct is telling me the problem is with the error block function or specifically what you do with the output... I think to confirm, try commenting out the function call and just put an alert with an error code and see if that solves the problem... when you return 1 what happens next? the comments suggest you go on to re send the order somewhere. I would also make sure to call get last error as a variable directly after the order send just to make sure we are picking up the correct order... I admit I am perplexed though as if the oder is succesful it should skip the else part... maybe try this and see how it works for you...
Hi V,
Thanks once again for your time and input,
The code below is what I have at the moment and I ran it overnight and for the day and it seems to be working now, I havent had any "alien" orders since my adjustements.... holding thumbs
You'll notice that my main change was the longcount & ticketlong condition at the start of the loop.
I have noted your comments on using the if function on the error loop, as well as your earlier comments on the sleep function after ordersend not being necessary, I'll save a revision and try those suggestions.
Regards, Mike