OrderSend fail to open trade but return no error

 

Hi All

When I do backtesting, OrderSend sometimes failed to open trade, but I got no error (e.g. error 0) when I use GetLastError() to check.

Why is this the case? what could possibly wrong in here and fail to open trade?

Many thanks

 
luckyvictor:

Hi All

When I do backtesting, OrderSend sometimes failed to open trade, but I got no error (e.g. error 0) when I use GetLastError() to check.

Why is this the case? what could possibly wrong in here and fail to open trade?

Many thanks

Hi,

Check your entry conditions again.

Perhaps considering the terms of your entry, it must not open trade.

 
Arash Lakzadeh:

Hi,

Check your entry conditions again.

Perhaps considering the terms of your entry, it must not open trade.

Thanks for you reply.


Can you give me some possible example please? I do have some if statement before executing the ordersend, and I do use 'Ask' to open the trade, so it should open at whatever price at that point of time, and anything to do with SL TP or trade size will generate error code, so I can't give of anything