PORTFOLIO Proper true future balance money management risk & Consecutive Wins Exploit money management ---------Task 1. Proper true future balance money management risk----- Software generates mql4 strategies, I have to inject proper money management & consecutive wins exploit into it Add #include script Minimum interference with the code, preferably code injector Intercept pending orders, update pending orders every minute? Make sure pending orders LOT SIZE is recalculated with new MM lot size Add here params each new trade calculates/recalculates all strategies' open trades and pending orders that became open market live orders: true_future_balance = current balance – (all swaps+ all taxes+ all commissions + all MAX defined STOP LOSSES + all Trailing Stops/Profits + all margins + any other expense) and only then calculates risk % from true_future_balance this is how MM currently looks like, keep it that way // Money Management variables //+------------------------------------------------------------------+ extern string smm = "----------- Money Management - Risk Fixed % Of Account -----------"; extern double mmRiskPercent = 5.0; extern int mmDecimals = 1; extern int mmStopLossPips = 100; extern double mmLotsIfNoMM = 1.0; extern double mmMaxLots = 5.0; ------------------------------ Task 2. Consecutive Wins Exploit -------------------------- add consecutive wins exploit to Money Management Look at this simulator please https://mt4-forex-ea.com/online-tools-apps-for-traders/money-management-simulator/index.php#form add to mm segment extern int consecutive_winning_trades = 5; extern Boolean Reset_risk_after_loss = false; extern integer winning_trade_rise = 30% for example in portfolio there are 5 strategies script adjusts lot size according to consecutive wins settings of entire portfolio if winning trade happened then next lot size = current lot size increased by winning_trade_rise once consecutive_winning_trades >= 5 then do not increase lot size if lost trade then drop to original lot size