fxDreema

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

    Lotsize Calculation keeps returning 0

    Questions & Answers
    2
    5
    553
    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.
    • H
      holygrailfx last edited by

      I have a problem with the lotsize settings, these are my settings
      lotszie.png

      It always returns 0, so I keep trading 0.01lots

      any suggestions why it gives a answer of 0 every time

      ......
      lotszie.png

      1 Reply Last reply Reply Quote 0
      • H
        holygrailfx last edited by

        Okay so I checked a bit more

        my marginrequired is 500
        so in your calculation

        you take (% of balance* balance)/marginrequired
        which would be 10% of 10000=1000/500 =2 lots

        Now if your balance is smaller lets say 1500 and your % 1%
        1% of 1500 = 15/500 =0.03
        which would be an acceptable lotsize as my broker accepts 0.01 as the minimum
        but instead it trades 0.01 as it interprets 0.03 as ZERO

        My guess is that you use MathRound a bit to early
        I might be (probably am) wrong, but just trying to help

        😉

        1 Reply Last reply Reply Quote 0
        • fxDreema
          fxDreema last edited by

          This option means that if you have balance of 1000, then 100% of the lot size will be 0.01 lots when 1 lot = 100000 (0.01 lot = 1000). This was my idea of money management back then in the early days when I wanted to grow the lot size as the profit grows.

          If you have some MM model that I am missing, give me link where someone is talking about it, where this MM is defined and maybe has name. Because everyone can create some formula by himself, but look what happens when there is no name to describe it - options that people don't understand or misunderstand.

          1 Reply Last reply Reply Quote 0
          • H
            holygrailfx last edited by

            Non no you are not missing anything, I like the simplest options best 😉

            when I am using it it returns 0, while I apply your calculation it should retrun 0.03

            1% of 1500 = 15/500 =0.03
            which would be an acceptable lotsize as my broker accepts 0.01 as the minimum
            but instead it trades 0.01 as it interprets 0.03 as ZERO

            when I look at the source code it seems you use MathRound, whihc would transform the 0.03 in ZERO
            while I would have used Normalizedouble with 2 digits after the comma so it retruns the 0.03 lotsize

            Do I make sense? Do I misuse the intented use? Or should I change my parameters?
            Thanks for your help

            1 Reply Last reply Reply Quote 0
            • fxDreema
              fxDreema last edited by

              Again, the option that you have on the screeshot above does the calculations like this:

              You have 10,000, then with the setting of 10(%) the lot size will be exactly 0.01, not 0.03, not 2. 10% of 10,000 is 1000, which turned into lots equals to 0.01, at least on EURUSD and similar There is no margin stuff here. Yes, if the calculated value is too low, the lowest possible is taken, and if it's too high, the highest possible is taken.

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

              Online Users

              S
              B
              M
              E
              R
              K
              E

              15
              Online

              146.7k
              Users

              22.4k
              Topics

              122.6k
              Posts

              Powered by NodeBB Forums | Contributors