Nathan Hennigh:
I have been trying to place a sell order through my EA and have run into several issues.
Here is my current code, I get failed market sell 100.00 EURUSD sl: 1.12718 tp: 1.12743 [Invalid request] and retcode of 10013.
I changed my volume to 1000 and then got an invalid volume error, so i changed to .01 and then i got an invalid stops error.
Thanks in advance for any help.
for lots
double lots=0.01; request.volume = NormalizeDouble(lots,2);
for SL and TP
double SL = 300; request.sl =NormalizeDouble (price + SL *_Point,_Digits); //for sell
You also need to zero your request like this:
ZeroMemory(request);
And then you have set the price to 0 before sending the order. Leave it as is (at the bid).
// request.price = 0;

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
I have been trying to place a sell order through my EA and have run into several issues.
Here is my current code, I get failed market sell 100.00 EURUSD sl: 1.12718 tp: 1.12743 [Invalid request] and retcode of 10013.
I changed my volume to 1000 and then got an invalid volume error, so i changed to .01 and then i got an invalid stops error.
Thanks in advance for any help.