help with break out of while statement

To add comments, please log in or register
Desmond Wright
3221
Desmond Wright  

sometimes my trades don't always go through , so I run it in a while loop , but if I get error 134 (no enough money , it must break out the while loop , cant seem to get it right , can someone help me please.

Simon Gniadkowski
17644
Simon Gniadkowski  
buju:

sometimes my trades don't always go through , so I run it in a while loop , but if I get error 134 (no enough money , it must break out the while loop , cant seem to get it right , can someone help me please.

<CODE REMOVED>

Please edit your post . . .    please use the   SRC   button to post code: How to use the   SRC   button.
Simon Gniadkowski
17644
Simon Gniadkowski  
buju:

sometimes my trades don't always go through , so I run it in a while loop , but if I get error 134 (no enough money , it must break out the while loop , cant seem to get it right , can someone help me please.

Test the return value from your OrderSend() and find out why it failed . . .  :   What are Function return values ? How do I use them ?

Don't call GetLastError() unless there is actually an error,  otherwise you may be seeing an error from a different part of your code.

To add comments, please log in or register