MQL4 - automated forex trading   /  

Documentation

MQL4 Reference  Math & Trig  MathSrand

 
Use the opportunities of
MQL5 in MetaTrader 5
Study the new MQL5 language
Study the new MQL5 language.
Reference is already available
void MathSrand( int seed)
The MathSrand() function sets the starting point for generating a series of pseudorandom integers. To reinitialize the generator, use 1 as the seed argument. Any other value for seed sets the generator to a random starting point. MathRand retrieves the pseudorandom numbers that are generated. Calling MathRand before any call to MathSrand generates the same sequence as calling MathSrand with seed passed as 1.
Parameters:
seed   -   Seed for random-number generation.
Sample:
  MathSrand(TimeLocal());
  // Display 10 numbers.
  for(int i=0;i<10;i++ )
    Print("random value ", MathRand());