help:In the strategy tester mode,can i open placing orders(buylimit/buystop/selllimit/sellstop)?

 
In the strategy tester mode,can i open placing orders(buylimit/buystop/selllimit/sellstop)?
I test my EA include opening placing order,MT4 return error 130,but after I modify placing order to market order,order opened success.
//ticket=OrderSend(Symbol(),OP_BUYLIMIT,lots,Ask,slippage_3,NormalizeDouble(Bid-0.0100,Digits),takeProfit,comment,0,0,Green); error 130
ticket=OrderSend(Symbol(),OP_BUY,lots,Ask,slippage_3,NormalizeDouble(Bid-0.0100,Digits),takeProfit,comment,0,0,Green); success
 

Hi

Pending orders work in tester but your example tries to place a buy pending order at the market price and that makes it an instant order. You must take the limit away from the market price for buys.


ticket=OrderSend(Symbol(),OP_BUYLIMIT,lots,Ask-LIMIT*Point, --- etc ---

Reason: