Download MetaTrader 5

OrderSend sl=NULL

To add comments, please log in or register
cryptex23
268
cryptex23  
What would happen if send NULL under sl in an ordersend command?
Keith Watford
Moderator
9983
Keith Watford  
cryptex:
What would happen if send NULL under sl in an ordersend command?


Try it and see.

Why would you want to if you wanted to use 0

It is easier and quicker to type 0 instead of NULL

whroeder1
15015
whroeder1  
cryptex: What would happen if send NULL under sl in an ordersend command?
Probably a compile error, since NULL is not an int. Use 0 or define your own:
#define  NO_SL          0
#define  NO_TP          0
#define  NO_EXPIRATION  0
qjol
3243
qjol  
i tried it and there is no error and it's working (B616) but, you don't use AccountBalance() for SL or TP (even it's possible) so you are not supposed to use NULL even there is no error
To add comments, please log in or register