@l-andorrà Thanks for the explanation. That makes sense.
So just to clarify what I’m trying to achieve:
I already use fxDreema blocks to get my Entry Line, Stop Loss Line, and my chosen risk percent.
What I need is a way to correctly calculate the lot size for different markets (Forex pairs, Gold, maybe Crypto later).
Right now, my calculation works for Gold (small difference) but for Forex pairs like EURUSD or GBPJPY the difference between my intended risk and the actual risk is still too big.
I understand this needs a proper MQL calculation and then embedding into my fxDreema project. Does anyone here already have a working MQL snippet that:
Calculates lot size based on SL distance, risk percent, and account balance.
Works both for Forex pairs and Gold (XAUUSD / GOLD) without big differences in risk.
Outputs the final value into a variable (like LotSize) so I can use it in fxDreema blocks afterwards.
If someone can share a solid example (even simplified for Forex + Gold only), it would help me and probably others a lot.
How should I construct this calculation in fxDreema so it works universally across symbols and always updates my LotSize variable correctly?


