https://www.mql5.com/en/docs/math/mathsrand and https://www.mql5.com/en/docs/math/mathrand
at init:
MathSrand(GetTickCount());
in the "loop":
int index= MathRand()%30;
so you change the access to the array, not the values at its positions.
Best wishes Uwe
Documentation on MQL5: Math Functions / MathSrand
- www.mql5.com
Math Functions / MathSrand - Documentation on MQL5
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 have an array containing 30 elements ?
How to interchange their positions in array randomly everytime i call a function ?