Invalid price in Strategy Analyzer

 

I run an EA through the Strategy Analyzer and I keep getting this error:

failed buy stop 1.00 EURUSD at 1.18958 tp: 1.18988 [Invalid price]

The Ask at this moment is 1.18970, and the Bid is 1.18938

Is there a minimum distance required to place orders? I don't understand why this BuyStop keeps getting rejected.

Any help would be greatly appreciated.

 

You try to place a buy stop below the Ask, that wont work. A buy order below the ask is a buy limit.

 
  1. You can't move stops (or set pending prices) closer to the market than the minimum (MODE_STOPLEVEL * _Point.)
              Requirements and Limitations in Making Trades - Appendixes - MQL4&Tutorial
    For a buy stop the market is the Ask.

  2. The price must be normalized to tick size
    Print out your values to the precision you want. Do NOT use NormalizeDouble, EVER. For ANY Reason. It's a kludge, don't use it. It's use is always wrong