dan90 Posted December 11, 2010 Report Share 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.