Hello
I just started MQL4 recently and being the complete newbie that I am, I would like to ask some help on the code below.
Basically I am trying to have my EA randomly choose buy/sell on every tick and enter an order until it reaches the max number of orders.
However after running the code on Strategy Tester and checking the journal, it seems to be always sending consecutive buys, then consecutive sells, then consecutive buys again and so on.
Can someone pls help check what needs to be changed to have the random generator to run for every order?
Thank you
John
Remove the
MathSrand(GetTickCount());
from the function, and put it into the initialization part.
Remove the
from the function, and put it into the initialization part.
Hi linux80s
What you did worked!
Appreciate the help, thank you.
Best regards
Akira
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello
I just started MQL4 recently and being the complete newbie that I am, I would like to ask some help on the code below.
Basically I am trying to have my EA randomly choose buy/sell on every tick and enter an order until it reaches the max number of orders.
However after running the code on Strategy Tester and checking the journal, it seems to be always sending consecutive buys, then consecutive sells, then consecutive buys again and so on.
Can someone pls help check what needs to be changed to have the random generator to run for every order?
Thank you
John