OrderSend fail to open trade but return no error

To add comments, please log in or register
luckyvictor
146
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

Arash Lakzadeh
3566
Arash Lakzadeh  
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.

luckyvictor
146
luckyvictor  
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

To add comments, please log in or register