OrderSend error 10016 invalid stops

 

Hello,

get this error, don't know why: 

2012.08.10 17:43:22 Core 1 2012.07.05 23:05:00   Invalid stops reply code=10016 symbol=EURUSD action=1 volume=0.1600000 price=0.0000000 sl=0.0000000 tp=0.0000000 filling=0

The string above dumps a MqlTradeRequest structure. As you can see, stops are not invalid. 

 

Thank you for help  


Documentation on MQL5: Standard Constants, Enumerations and Structures / Data Structures / Trade Request Structure
Documentation on MQL5: Standard Constants, Enumerations and Structures / Data Structures / Trade Request Structure
  • www.mql5.com
Standard Constants, Enumerations and Structures / Data Structures / Trade Request Structure - Documentation on MQL5
 
Can you write to ServiceDesk and provide all details?
Get in touch with developers using Service Desk!
Get in touch with developers using Service Desk!
  • www.mql5.com
We therefore attach great importance to all user reports about issues in our programs and try to answer each one of them.
 

Hello Rosh,

so far never got answer from desk. Need a quick solution. This happens only within backtest.

When placing same order from function init of EA and attach EA to same symbol, no error.

 Invalid stops -> but stop =0.0. This is not invalid...

 

Hello,

i made a mistake in MqlTradeRequest as i set MqlTradeRequest.action = TRADE_ACTION_PENDING without a given price. 

I guess this could be the reason for error. 

Documentation on MQL5: Standard Constants, Enumerations and Structures / Trade Constants / Trade Operation Types
Documentation on MQL5: Standard Constants, Enumerations and Structures / Trade Constants / Trade Operation Types
  • www.mql5.com
Standard Constants, Enumerations and Structures / Trade Constants / Trade Operation Types - Documentation on MQL5
 

Try using the built in Trade class instead of MqlTradeRequest.

https://www.mql5.com/en/docs/standardlibrary/tradeclasses/ctrade

Documentation on MQL5: Standard Library / Trade Classes / CTrade
Documentation on MQL5: Standard Library / Trade Classes / CTrade
  • www.mql5.com
Standard Library / Trade Classes / CTrade - Documentation on MQL5
 

i am using ctrade and i receive the same error... the SL is quite high... still is not executed. error: 10016

sometimes is executed - sometimes is not... and the script gets stuck (as coded, in a while loop).

please advise. 

 
Calin Trainer:

i am using ctrade and i receive the same error... the SL is quite high... still is not executed. error: 10016

sometimes is executed - sometimes is not... and the script gets stuck (as coded, in a while loop).

please advise. 

To get a coding advice, you have to post your code.
 
Alain Verleyen:
To get a coding advice, you have to post your code.

it seems that you answer my comments after you banned my physical ip.

highly ethical and professional sir ! let me put it like this: your help is completely useless. being polite here.

 
Calin Trainer:

it seems that you answer my comments after you banned my physical ip.

highly ethical and professional sir ! let me put it like this: your help is completely useless. being polite here.

Hi Calin, you don't appear to be banned, you wouldn't be able to post in the forum if you were. What makes you think you are banned mate?
 
Calin Trainer:

Stuart: i cannot open the mql5.com from my browser anymore, unless i use a special VPN connection to spoof my IP.


Calin

I say again, you have NOT been banned (yet!). If you were banned, no amount of "IP Spoofing" would let you post under your name on this forum. Plus your name would appear with a strike through it to show you have been banned (which it doesn't). It sounds to me like your settings need to be adjusted. Go into your profile, click settings->privacy and unclick all of the "Binding to IP" checkboxes. That should fix that problem.

Now as for your threatening and abusive language in your last post, that will NOT BE TOLERATED against ANY user, be they a moderator or not. Please consider this you first and final warning.

Thank you for your cooperation. 
 

Mate, I still receive the message from browser on https://www.mql5.com/en/ (if I do not use the TOR - which still seems to be a great idea):

This webpage is not available

ERR_CONNECTION_TIMED_OUT
Automated Trading and Strategy Testing
Automated Trading and Strategy Testing
  • www.mql5.com
MQL5: language of trade strategies built-in the MetaTrader 5 Trading Platform, allows writing your own trading robots, technical indicators, scripts and libraries of functions
Reason: