Sometimes it hard to analyse why ERR_INVALID_STOPS is happened

 

I have develop a EA, there are error code 130 ERR_INVALID_STOPS, I have log the ordersend

symbol : XAUUSD.r lotsize : 0.67 order : OP_SELLSTOP opening price : 1863.00 slippage : 24 stoploss : 1869.00 takeprofit : 1855.00 bid : 1863.08 stopLevel : 0.00

I also consider the stoplevel, in this case stoplevel is 0, does it have to do with the enter price? is too close to bid price?

this is I got from Journal windows

order sell stop 0.67 XAUUSD.r opening at 1863.00 sl: 1869.00 tp: 1855.00 failed [Invalid S/L or T/P]

 
  1. Do you really expect an answer? There are no mind readers here and our crystal balls are cracked, so we can't see your machine.
         How To Ask Questions The Smart Way. (2004)
              Be precise and informative about your problem

    We can't see your broken code.

    Always post all relevant code (using Code button) or attach the source file.

  2. SL/TP (stops) need to be normalized to tick size (not Point) — NormalizeDouble fails on non-currencies.
              On 5Digit Broker Stops are only allowed to be placed on full pip values. How to find out in mql? - MQL4 programming forum #10 (2011)

 
Yong Zheng: I have develop a EA, there are error code 130 ERR_INVALID_STOPS, I have log the ordersend ...

Also, in case you have still not done so, please read the following ...Requirements and Limitations in Making Trades

Requirements and Limitations in Making Trades - Appendixes - MQL4 Tutorial
Requirements and Limitations in Making Trades - Appendixes - MQL4 Tutorial
  • book.mql4.com
Requirements and Limitations in Making Trades - Appendixes - MQL4 Tutorial