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>
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.

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
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.