What is the code to enter the maximum risk nell'ea and then use rules of money management without entering lots set ??
exemple..
maximumrisk 2.0
2% for trade...
exemple..
maximumrisk 2.0
2% for trade...
Alternative Trade Management/Money Management Methods 3 replies
Money Management / Risk Management 24 replies
I need some MQ4 help from a real MQ4 programmer 2 replies
Successful Trade Management / Risk Management 0 replies
moutaki Mq4+fibo grid Mq4=profit+ease 39 replies
//-- external input extern double LotPercent = 2.0 // mean 2.0% //-- pass variable double LotSize; void LotsCalc() { if(MarketInfo(Symbol(),MODE_MINLOT) == 0.1) int LotsDigit = 1; else if(MarketInfo(Symbol(),MODE_MINLOT) == 0.01) LotsDigit = 2; double MinLots = NormalizeDouble(MarketInfo(Symbol(),MODE_MINLOT),LotsDigit); double MaxLots = NormalizeDouble(MarketInfo(Symbol(),MODE_MAXLOT),LotsDigit); double AcFrMar = NormalizeDouble(AccountFreeMargin(),2); LotSize = (AcFrMar*(LotsPercent/100))/1000; if(LotSize > MaxLots) LotSize = MaxLots; if(LotSize < MinLots) LotSize = MinLots; }