Sell stop under the Bid but getting invalid price - page 2

 
Sidnei Vladisauskis:

I found the problem.

There is a SYMBOL_TRADE_STOPS_LEVEL, my price is below 32 pips but the STOP LEVEL is 40, so it will never enter because the price has a minimum price beyond the ask and bid to be respect.

Now it is working.

Thanks

That doesn't make sense.

Stops level is in points and your 32 pips is 320 points, so well above 40.

 
  1. Sidnei Vladisauskis: Look, the bid is 1.19275 and the order was sent at 1.19243 - 32 pips below the bid price, in my mind I believe that is correct, right?

    Wrong — that is 32 points 3.2 PIPs. PIP, Point, or Tick are all different in general.
              What is a TICK? - MQL4 programming forum 2014.08.03

  2. You can't move stops (or pending prices) closer to the market than the minimum: MODE_STOPLEVEL * _Point or SymbolInfoInteger(SYMBOL_TRADE_STOPS_LEVEL).
              Requirements and Limitations in Making Trades - Appendixes - MQL4 Tutorial

    On some ECN type brokers the value might be zero (the broker doesn't know). Use a minimum of two (2) PIPs.

    The checks a trading robot must pass before publication in the Market - MQL5 Articles 1 August 2016

  3. The problem could be № 2. It could be your stops. It could be your lotsize.

    You were asked to post your code, you haven't.