Problem Opening Sell Trades With Stop Loss

 

I hope someone can help me.

I am trying to open buy and sell orders with an EA that I am working on. When I open buy orders it works fine, but sell orders only open if my Stop Loss is "0".

Example...

double StopLoss = 25;

OrderSend(Symbol1,Symbol1OP,Lots,MarketInfo(Symbol1,Symbol1Mode),Slippage,StopLoss,0,comment,Magic,0,Arrow);

Opens correctly for buy trades. Doesn't open sell trades.

If I change the stop loss to 0 they both work.

It's got me stumped. Can someone please help?

Thanks,

Steve

 

Stoploss needs to be a valid price, so for a buy you need to subtract 0.0025 from bid price and for a sell you need to add 0.0025 to the ask

 
kkb:
Stoploss needs to be a valid price, so for a buy you need to subtract 0.0025 from bid price and for a sell you need to add 0.0025 to the ask

25*Point is more correct.