fxDreema

    • Register
    • Login
    • Search
    • Back to the main page
    • Categories
    • Recent
    • Tags
    • Popular
    • Search

    How to construct a universal lot size calculation in fxDreema?

    Questions & Answers
    2
    3
    153
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      mark692 last edited by

      Hi, I’m trying to build a universal lot size calculator in fxDreema and need help setting it up correctly.

      What I want:

      The EA should risk a fixed percent of account balance per trade (example: 2%).

      Risk is based on the distance between entry price and a stop loss line that I draw on the chart.

      From this risk and SL distance, I want the EA to calculate the correct lot size and store it into my variable LotSize.

      It should work on all markets: Forex pairs (including JPY), Gold, Crypto, and Indices.

      The issue:

      On Gold it looks close to correct,

      On Forex pairs sometimes it gives 0.00 or doesn’t match the expected risk,

      On Crypto (like XRPUSD) the risk is way off (much larger than intended).

      My question:
      👉 How should I construct this calculation in fxDreema so it works universally across symbols and always updates my LotSize variable correctly?

      Any examples of the exact blocks or formulas would be greatly appreciated.

      Thanks in advance 🙏

      1 Reply Last reply Reply Quote 0
      • l'andorrà
        l'andorrà last edited by

        I'm afraid no fxDreema bloak can do that as a whole. Some parts could definitely be done, but not everything. You will need a programmer to do the calculation part for all charts and then you can embed it into your fxDreema project. The SL line distance calculation can be done with fxDreema, though.

        (English) I will try to help everyone in these fxDreema forums. But if you want to learn how to use the platform in depth or more quickly, I can help you with my introductory fxDreema course in English at https://www.theandorraninvestor.eu.

        (Català) Miraré d’ajudar tothom en aquests fòrums d’fxDreema. Tanmateix, si vols aprendre a fer servir la plataforma amb més profunditat o més de pressa, t’hi puc ajudar amb el meu curs d’introducció a fxDeema en català a https://www.theandorraninvestor.eu/ca.

        (Español) Intentaré ayudar a todo el mundo en estos foros de fxDreema. Sin embargo, si quieres aprender a usar la plataforma en profundidad o más deprisa, te puedo ayudar con mi curso de introducción a fxDreema en español en https://www.theandorraninvestor.eu/es.

        M 1 Reply Last reply Reply Quote 0
        • M
          mark692 @l'andorrà last edited by

          @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.

          1 Reply Last reply Reply Quote 0
          • 1 / 1
          • First post
            Last post

          Online Users

          H
          A
          S
          M
          A
          L
          G

          17
          Online

          146.7k
          Users

          22.4k
          Topics

          122.6k
          Posts

          Powered by NodeBB Forums | Contributors