dan90 Posted December 11, 2010 Report Posted December 11, 2010 if (TurboMode) { gd_348 = MathFloor(100.0 * (AccountFreeMargin() * AccountLeverage() * RiskPercent * Point) / (Ask * MarketInfo(Symbol(), MODE_LOTSIZE) * MarketInfo(Symbol(), MODE_MINLOT))) * MarketInfo(Symbol(), MODE_MINLOT); if (gd_348 < 0.01) gd_348 = 0.01; if (gd_348 > 50.0) gd_348 = 50; g_lots_356 = gd_348; } I found this code in the ea I am using. I guess it makes the mm percent based on the free margin and used margin. Could someone modify it? I want the risk to be based on the account balance size and the sl size. So if I set 5% risk, and i have a $600 account the sl is 30 pip it wil open a 0.1 lot trade. And if an another trade is opened, while this is still open, it will open a 0.1 lot trade too, not 0.08 or kinda. Thanks
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now