You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Reason I ask about error numbers is that in your moving average and MACD samples, you do not refer to different error messages and do some specific action.
For example, if i get error "trade server is busy", why do i have to wait several minutes before i try to send order again. Why do i have to wait several minutes? why can't i keep on trying to send order until trade server is not busy. This is what you have done in your samples. I do not see you using sleep function in your samples, you just use return(0) after ordersend().
The way i see it is that no matter what the error you just keep on trying to send same order until it gets filled. this is the easiest way. i mean apart from getting a "too frequent requests" error, what is problem with this method?
Thank you
Regards
RJF