Why will OrderSend work when I send for a Buy trade and not for a Sell trade ?

 

I have this code

if (orders==0)

{

OrderSend(Symbol(),OP_BUY,0.01,Ask,3,Bid-30*Point,Ask+30*Point,"ORDER_BUY",11111,0,DarkBlue);

}

-------------------------------------

if (orders==0)

{

OrderSend(Symbol(),OP_SELL,0.01,Bid,3,Bid-40*Point,Bid+30*Point,"ORDER_SELL",22222,0,Red);

}

-------------------------------------

The OrderSend code to BUY works fine, the OrderSend code to SELL does not do anything. I run either one or the other

Why will the OrderSend to SELL not work ?

 

You need to start to use a bit with alerts for GetLastError()

Alert(GetLastError()) ;

or Print(GetLastError())'

 
qjol:

You need to start to use a bit with alerts got GetLastError()

Alert(GetLastError()) ;

or Print(GetLastError())'


error 130, just looking it up
 
MickGlancy:

error 130, just looking it up

invalid stops
 
the stop loss and the take profit are absolute values ? they are not automatically translated by the server / program depending on BUY or SELL intention ? Looks like it.