Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 1693
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
it is better to use IsVisualMode instead of IsTesting
You can do it without IsVisualMode and without IsTesting
The question was about something else
about magic=rand()
It's strange that the local tervers didn't exclaim "Yobtv"...
Since you study programming here, check how long it takes to fake it. What are the chances of getting a magic duplicate in more or less real conditions ? and is it worth stepping on such a rake
This is also possible. The chances of a match are slim.
There's also an extra check for a match, so it's OK docks.
about magic=rand()
It's strange that the local tervers didn't exclaim "Yobtv"...
Since you study programming here, check how long it takes to fackup. What are the chances of getting a magic duplicate under more or less real conditions ? and is it worth stepping on such a rake
From reference:
"To ensure that you get a non-repeating sequence, use MathSrand(GetTickCount()), since GetTickCount() has been incrementing since the operating system started and will not be repeated for 49 days"
did so
it's strange that the local terver experts didn't exclaim with a chorus: "Yobtv"...
no one wants to persuade, no one wants to argue, let the man learn... he'll figure it out on his own
about magic=rand()
it's strange that local tervers didn't exclaim with a chorus "Yobtv"...
///
Duck, how many times?
oh that works, thanks... ahahh, only now the button has me opening 150 orders every tick without stopping...
did so
Do this
The script is from this thread.
I don't understand this line.
if(!GetRepeat(arr,ret,cou))
Why with "!" ? Why is the enumerated type selected?
I don't know why this is done, but it is essentially a boolean function.
The author must have thought of something like this:
The enum elements start with zero: Ok=0, AllocError=1
that is, GetRepeat returns either 0 or 1,
and in cp: 0 is false, 1 is true,
respectively ! GetRepeat is a negation of the return value
It's a head-scratcher, because it's so easy not to mess with your head and people's head: