Error when placing two pending CFD orders - page 2

 
Alain Verleyen:

You are right, I should have said : TP is a stop value (like SL and so subject to error 130). It's MT4 terminology.

hello ,

 

 I have question about pending orders

 for forex pending order works  but for DAX it doesn't work

 

 why doesn't work   

ticket1=OrderSend(Symbol(),OP_BUYLIMIT,Lots,Ask-distance,5,Bid-stoploss,Bid+takeprofit,"rudi",0,0,clrBlue); 

 

 thank you ,

 

Rudi 

 
ticket1=OrderSend(Symbol(),OP_BUYLIMIT,Lots,Ask-distance,5,Bid-stoploss,Bid+takeprofit,"rudi",0,0,clrBlue); 
Why are you calculating your SL and TP relative to the current price. They should be relative to the entry price.