limit OrderSend problem

 

i'm sending this code

ticket=OrderSend("EURUSD", OP_BUYLIMIT, 1, NormalizeDouble(MarketInfo(symbol_,MODE_ASK),digits_),0,0,0,"",magic_,0,ordercolor_);

and i get error 130 invalid stops, why is that?

 
  1. OrderSend with symbol = "EURUSD" BUYLimit But price is current ask for symbol_. If symbol_ isn't "EURUSD" then your price is bogus.
  2. But you round the price to digits_ amount. WHY? Never use NormalizeDouble Bid/Ask: (No Need) to use NormalizeDouble in OrderSend - MQL4 forum Can price != price ? - MQL4 forum
  3. You can't open a BUY Limit unless the open price is below current Ask by at least MarketInfo(analyze.pair, MODE_STOPLEVEL)*Point
 

WHRoeder

thanks

Reason: