Maximum Percentage of Equity Risk – library MetaTrader 5
This code allows you to set a maximum percentage of equity risk. It checks if asked buy/sell lots are fitting the risk. If not, lots are automatically adjusted to fit the risk that was set. Code: bool UseMaximumPercentageRisk=true; double MaximumPercentageRisk=25; #include <Trade\SymbolInfo.mqh> //+——————————————————————+ //| GetLotSize RPTrade | //+——————————————————————+ double GetLotSize(double lotsize) { //— Gets pair specs … Read more