Random ea
-
I want ea to open daily 15 trades the enter point is randomly generated , any help please
@roar -
@Omar323232 this one is pretty random
https://fxdreema.com/shared/MfoxIhiac -
Just curious. What is the custom code block on top doing?
-
@l-andorrà computers are actually pretty bad at making "random" decisions, so they need a little help.
MathSrand() is a function that sets the starting point for random numbers generation. It takes a seed number as argument. I made a seed number by taking the tick count of current chart, and making some maths with it: take the modulo 13, multiply by 123456.
Once the random number generator has initialized, we can ask for random numbers by running MathRand().
It returns a number between 1 and 32767, so dividing the random number by 32767 will result in a random fraction between 0-1. Now we can multiply 60 minutes by that random fraction to get random minute. -
Interesting. Thank you.
-
@roar
can you make the same project to mt5 instead of mt4 please