EA not placing correct orders all the time. - page 2

 

Just a few pointers on OrderSend that should, apart from the error generation for the current code, help you develop EAs -

1) Only one trade context is available i.e. simultaneous sending of two orders will return with trade context is busy for one.

2) Better to set SL and TP separately using OrderModify as some brokers/MMs dont accept it in Ordersend.

3) Some brokers will not allow you to have position in two directions! they will adjust the lot size and give you one combined position in one direction! 

Hope this helps in your future development and reduce hiccups :)