Hi, there. MathSrand(TimeCurrent()) produces the same random numbers every time I run an EA for backtesting. Could anyone give me some suggestions?
Many thanks!
Many thanks!
TimeCurrent() in strategy tester 15 replies
Is random really random? 231 replies
CurTime() vs. TimeCurrent() 2 replies
Dislikeduse TimeLocal() or Time[1] instead. TimeCurrent() will only return the last known server time.Ignored
DislikedUsing
MathSrand(TimeCurrent());
for(int i=0;i<10;i++ )
Print("random value ", MathRand());
produces exactly the same random numbers as LocalTime() or TimeLocal(). Using Time[1] produces different random numbers, but running the code with Time[1] twice, the random numbers are still the same.Ignored