Jump to content

Money management settings change


dan90

Recommended Posts

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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...