int Random(int min, int max){ return( MathRand()/32768.0*(max-min+1)+min ); }
harold:
i tried to use that but i don't know...what should I do?
when i compile the code, it give me error : Function "Random" is not referenced and will be removed from exp-file
If you don't CALL the function it is not used and will not be compiled . . . . call the function. You need to take the time to read what has been offered to you for free . . . understand it then use it. If you can't or won't do that then use the Jobs facility instead: Jobs
i tried to use that but i don't know...what should I do?
when i compile the code, it give me error : Function "Random" is not referenced and will be removed from exp-file
RaptorUK:
If you don't CALL the function it is not used and will not be compiled . . . . call the function. You need to take the time to read what has been offered to you for free . . . understand it then use it. If you can't or won't do that then use the Jobs facility instead: Jobs
If you don't CALL the function it is not used and will not be compiled . . . . call the function. You need to take the time to read what has been offered to you for free . . . understand it then use it. If you can't or won't do that then use the Jobs facility instead: Jobs
as I could not, I do like this and it looks okay to me
int min=1,max=10,Random; // at the top
Random=(MathRand()/32768.0*(max-min+1)+min ); // at init start
Comment("Random = ",Random);
In any case, thank you, really! bye
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
I can not use a function or mathsrand mathrand,
I want the variable "int aléa" gives me a number between 1 and 10
and if i want to change the "32767" by "2"
MathSrand(TimeLocal()); // Display 10 numbers.
for(int aléa=0;aléa<10;aléa++ ) Print("random value ", MathRand());