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
All,
I am looking to get a random number between 3000 and 5000 that will be passed into the Sleep().
here is what I am came up with, while it works, I wanted to ask if there was a better way to get the same result.
the issue I am coming across is when I send multiple alerts to telegram and not all of them arrive, I understand that telegram will prevent 20 messages per second or per minute. therefor I need the EA to sleep for a random number of seconds between 3-5 before sending the alert. After trying just the sleep and getting blocked, I determined I need for the alert to be sent out at random within 3-5 will allow for all alerts to be delivered. I suppose the time it takes for the EA to get a number between 3000-5000 out 32767 also take into account when the alert will be sent. I suppose what I have below will work, but I did want to get a different perspective.