So, I just started with MQL4 and am writing my first EA. It's an extremely simply
EA for USD/JPY. On initiliazation it's supposed to generate a random number, normalize
it so the number is either 1 or 0, and depending on the number it will place a
buy or sell order. Then on each tick it checks for an open order; if one is open
it does nothing, if no orders are open then it generates a random number, normalizes
it so the number is either 1 or 0, and depending on the number places a buy or
sell order. Now my problem is, the MathRand() function doesn't seem to be generating
random numbers, it keeps generating the same number so the EA keeps placing buy
orders. Below is the code and any help is appreciated. Thank you.
- Issues with Random MQL4 EA
- MQL4 Help moving stop loss
- Help in coding.
void MathSrand( | int seed) |
lolinternets -- I am also just writing my first EA and will be watching your thread
with interest. If you need a guina pig, please let me know. I just posted a thread
asking if anybody had any free EA that actually runs on demo ... I need to observe,
etc. But am not finding ones that actually run ... even the "sample"
on the platform. Am not getting much help from MT4 so far ... they have not answered
my last two emails So I hope you get it going ... let me know if i can be of any
value to you, or if you care to suggest anything for me. I will be reading the
MT4 info in this thread and in the F1 from the "Create an EA" on the
client terminal

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