Money Management Code

 

I want to ask you to help a noob to get a ready programmed code for money management feature.

I want the difference between the possible Open price and the StopLoss to be not more than 5% of my whole balance. In the case when it's more than 5% the order must not be opened. I'm sure some of you have this part in your EAs. Any tips and suggestions are appreciated.

 

take a number and wait in line

 

If you search for my posts in these forums I have uploaded this code a couple of times. Both as a script as well as an include file.

 

The best thing you can do for yourself it to read the MQL4 language reference from start to finish and then do it again.