MT5 Forex Scalping EA Upgrade

Заказчик: AI | Опубликовано: 01.02.2026

I already have an trading view source code that calls the exact entry, stop-loss and take-profit levels for my scalping strategy on Forex pairs. What is missing is robust money management: the stop-loss distance is dynamic, so I need the lot size to be auto-calculated on every trade to risk the same fixed amount—by default US$100, but I want that value to stay editable from the EA inputs. Here is what I need you to add or refine: • Position-sizing formula that reads the current SL distance in points/pips and calculates the proper lot size to match the chosen risk per trade, taking into account account currency, leverage and broker contract specifications. • Clean, user-friendly input panel where I can type the dollar risk figure (and optionally a percentage) and keep it saved between sessions. • Full compatibility with prop-firm rules for MT5 real and evaluation accounts: no martingale, hedging, or other disallowed tactics—just straight position sizing on my existing buy/sell signals. • Code written in MQL5, well-commented so I can tweak the logic later if required. • A quick test demonstrating that, no matter where the SL prints, the trade always risks the set amount when executed on a Forex pair. Acceptance: I’ll compile the EA, run it in the MT5 Strategy Tester on a few random trades and confirm that the risk per trade is within ±1 % of the target value. Once that is solid, the job is done. If you’re comfortable with MQL5 math functions, lot-size rounding rules and have prior experience with prop-firm constraints, I look forward to working with you right away.