Error 130 (invalid stops) on OrderSend

 

Hello all,

I'm trying to set order with EA and get an error invalid stops
Order type: OP_SELLSTOP
Price: 1.066960
SL: 1.068760
TP: 0.000000

Bid = Ask at the moment of the operation and they are 1.067200
Stop Level of the pair is 0.00000

Can some one help me to understand what's going wrong with it?

Thanks ahead!

Documentation on MQL5: Constants, Enumerations and Structures / Codes of Errors and Warnings / Trade Server Return Codes
Documentation on MQL5: Constants, Enumerations and Structures / Codes of Errors and Warnings / Trade Server Return Codes
  • www.mql5.com
Trade Server Return Codes - Codes of Errors and Warnings - Constants, Enumerations and Structures - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
 
NormalizeDouble(...)try with this
 
Artiom Orlov: I'm trying to set order with EA and get an error invalid stops
Please search before you post. This question has been asked and answered so many times on the forum and even in articles.