Lot size on Gold (XAUUSD), forex, indices or crypto comes from two numbers you type on the chart: the risk, as a percent of balance, a percent of equity or a fixed amount, and the stop loss in points. The loss of 1.00 lot at that stop is taken from OrderCalcProfit, so the figure is right on gold, indices and cross pairs, not only on EURUSD.
The lot is rounded down to the broker volume step and capped by the broker maximum and your own maximum. The BUY and SELL buttons open the trade at market with the stop and the take profit already attached, after a free margin check and a check of the broker minimum stop distance.
Rounding down means the money really at risk can be a little below your number, and the panel shows both. If the risk is too small for the broker minimum lot, it refuses the trade unless you allow the minimum. Try it on a demo account first.
Hedging or netting account, any symbol, any broker. It only opens a trade when you press BUY or SELL. It never closes or modifies positions.
Put it on XAUUSD, EURUSD, GBPUSD, US30, NAS100 or BTCUSD and watch how the loss per lot changes from one symbol to another for the same stop. XP_LossPerLot and the rounding in XP_Recalc are ready to copy into any EA that needs risk based lots, and the panel is plain on purpose so you can add your own buttons, a breakeven or a partial close.
Open source. Use it as it is, adapt it, build your own version on top of it.
New versions and new tools are announced first on my MQL5 channel: https://www.mql5.com/en/channels/xander
Questions, suggestions and your own backtests are welcome in the Xander Lab group: https://www.mql5.com/en/messages/02eec85e4364dd01
More tools on my profile: https://www.mql5.com/en/users/09151993a
Provided as is, use at your own risk.
Liquidity Sweep Equal Highs Lows
Liquidity indicator for MT5 on Gold (XAUUSD), forex and indices: equal highs and equal lows from swings, marked as swept when a wick runs the level and the candle closes back. Open source code.
Fair Value Gap Zones Tracker
Fair value gap (FVG) indicator for MT5 on Gold (XAUUSD), forex and indices: three candle gaps on closed bars, ATR size filter, the open part shrinks as price fills it, mitigation by touch, midline or full fill. Open source code.
Accelerator Oscillator (AC)
The Acceleration/Deceleration Indicator (AC) measures acceleration and deceleration of the current driving force.
MACD Signals
Indicator edition for new platform.