fxDreema

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

    Buy/Sell block money management 100% of balance

    Questions & Answers
    2
    19
    5276
    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.
    • J
      james last edited by

      Dear fxDreema

      As always, thanks for a great piece of software. I'd be completely lost without it. 🙂

      I'm having a little difficulty understanding the money management side of the buy/sell blocks.

      When I specify that I want to trade with 100% of my balance (which I normally wouldn't do!), fxDreema only uses a tiny fraction of this. When I was at school ( 🙂 ! ) 100% of $10000.00 was $10000.00!

      I've had a look around the web site but don't see any explicit information to cover this.

      I may be missing something which is quite obvious, for which I apologise in advance!

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

        Yes, that option "% of Balance" should open 0.1 lots (10.000 dollars) when you have balance of 10.000 dollars. What lot size do you see as a result?

        1 Reply Last reply Reply Quote 0
        • J
          james last edited by

          This is the screen shot for what I did:

          Clipboard02.jpg

          This is what I get in the tester:

          __2013.06.04 17:15:15 Core 1 initial deposit 10000.00 USD, leverage 1:500
          [/quote:g6ahd3de]

          __2013.06.04 17:15:15 Core 1 2000.01.03 00:01:00 instant buy 0.10 USDJPY at 102.190 sl: 101.190 tp: 103.190 (102.140 / 102.190 / 102.140)
          [/quote:g6ahd3de]

          I don't think this is 100%! 🙂 Maybe I'm not understanding something, though.

          ......
          Clipboard02.jpg

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

            Well, it is really 100% in EURUSD 🙂 This is very simple formula that I used and I never thought about JPY 🙂 This needs some conversions. But why don't you tell me that you use USDJPY, how can I know that? When there is a problem it's better to give as many details as you can, otherwise we are just chatting.

            1 Reply Last reply Reply Quote 0
            • J
              james last edited by

              Yes. OK. Sorry. But that said, I assumed that 100% of balance meant just that, irrespective of currency pair. After all, my account at the broker will be in my local currency, GBP, and I'd be expecting the 100% to be 100% of my balance in GBP. Also USDJPY will merely be one of a number of pairs I'll use.

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

                Ok, I stuck with these lot calculations. My base currency is USD, so when I buy 0.1 lots in USDJPY (now USDJPY is somewhere around 100), am I giving 10.000 USD or 10.000 JPY? I think I'm giving 10.000 USD. If that's true, then 100% of Balance when you have balance of 10.000 USD is exactly 0.1 lot in USDJPY.

                In case of EURUSD I think I'm giving 10.000 EUR, which is 13.080 USD when the price is 1.308. So in this case "% of Balance" option is a little bit wrong, because it will calculate exactly 0.1 lots when you have 10.000 dollars, but this is actually transaction of 13.080 dollars.

                If I'm wrong, let me know.

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

                  __Yes. OK. Sorry. But that said, I assumed that 100% of balance meant just that, irrespective of currency pair. After all, my account at the broker will be in my local currency, GBP, and I'd be expecting the 100% to be 100% of my balance in GBP. Also USDJPY will merely be one of a number of pairs I'll use.[/quote:2kr6qsvk]
                  Yes, it must be like that, but obviously it's not. I have difficulties to build the formula to calculate the right value, so if you or someone has some idea... 😄

                  1 Reply Last reply Reply Quote 0
                  • J
                    james last edited by

                    The only way around it that I have come up with is to create 2 variables, one called "PlayCash" and the other "Balance", then place a piece of code in a "Custom MQL4 code" block which then picks up the actual current balance of my account, calculates the percentage I wish to use, and puts this figure in "PlayCash" just ahead of placing the Buy / Sell.

                    Then, in my Buy now/Sell now blocks, I use the fixed volume choice, and right-click the field to drop "PlayCash" into it. This works for me, but isn't very elegant, and being a non-programmer took me ages to figure out!! 🙂

                    I haven't tested so don't know if the "Custom MQL4 code" block will work in MT5 - will it?

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

                      The final lot size is not exactly the same as the calculated one. For example, let's say that you have balance that results in lot size of 0.103 lots, but for MetaTrader such a value is unacceptable, so the lot size is rounded to 0.1. Even if your account is in USD the lot size will be not 100% accurate.

                      But how big is the difference when you are in GBP account? If you got 0.1 lots now, what should be the right value and is it so different? I mean, you can tune % of Balance parameter to be 90% or 110% if needed.

                      Well, I will take a look at what can be done, because % of Balance option seems to be not correct in most cases.

                      1 Reply Last reply Reply Quote 0
                      • J
                        james last edited by

                        I did try different levels, and from memory if I specify some silly figure like 100000% (might not have been this, but similar!) my whole balance (GBP 10000) would be placed.

                        Also, will the "Custom MQL4 code" block work OK in MQL5?

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

                          Wow, it's named MQL4 in MQL5! I should rename it of course, but nevermind, it's the same block and it can be used in MQL5. But why are you asking, test it.

                          Ok, let's say you have 10000 GBP and you use 100% of Balance option. What lot size do you expect to be opened?

                          1 Reply Last reply Reply Quote 0
                          • J
                            james last edited by

                            When I do my not very good method inside a custom code block, I get a sum of money order. So if I have 10000 GBP, I end up with that amount in my order. On the spread bet platform the lot size seems irrelevant as its sums of money that the broker goes by. If I were trading CFDs or something other than spreads, then I think lot size comes into play, but I've only looked at spread bets. So on the spreads, my minimum cash allowable is 0.1 GBP.

                            I hope I've got that right!

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

                              The idea behind "100% of Balance" is that the lot size increases when profits increase. For EURUSD, let's say you have 10.000 initial capital, 100% of this will be 0.1 lot (which is 10.000). So, when your profits become 15.000 the lot size will be 0.15 and so on. It's linear. There is no leverage here, and yes, with 100% of Balance it should open something that is on the lower limits side - basically the amount of money for leverage = 1.

                              1 Reply Last reply Reply Quote 0
                              • J
                                james last edited by

                                Yes, I understood that as profits increase or losses decrease the balance, then 100% will represent a different figure, and that's what I was expecting. So when I do my inelegant custom code block, that's what happens. But unfortunately not if I use the buy/sell block's % of balance.

                                If I've decided to risk 3% of my current balance of GBP 10000 on a position, then I'd be placing GBP 300. As you say, if I have any leverage active on the account - and I may not - then I can take that into consideration separately.

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

                                  Now I added one more parameter to these options - MarketInfo(sumbol,MODE_TICKVALUE). The result will be divided by this parameter, but I think this only makes difference if the account is in JPY or other currency with price far away from USD,EUR,GBP.

                                  3% is too small, there is always a limit from the broker, which is at least 0.01 lots I think. And if the requested lot size is lower than this minimum size - the minimum is taken.

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

                                    I think I got the idea. What you want is to block % of Balance, so for example if you have 10000 USD and decide to block 50% of balance (or 5000 USD), to open such a lot size that will result in "Margin: 5000 Free margin: 5000". Well, not exactly 5000 for the free margin, but close to. Is that true?

                                    And what I mean by "% of Balance" is something else - to open such a lot size that converted to money value to be equal to % of the balance. For example I have 10000 USD and I want to open 100% of that number, which is 0.1 lot because we know that 0.1 lot is 10000 in money value.

                                    Obviously there are 2 different methods that both can be described as "% of Balance". I wonder how to differentiate them...

                                    1 Reply Last reply Reply Quote 0
                                    • J
                                      james last edited by

                                      Yes! 🙂 Exactly right!

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

                                        3 new options added starting with "Block % of..."

                                        1 Reply Last reply Reply Quote 0
                                        • J
                                          james last edited by

                                          Superb!

                                          Any idea on when a new local version download will be available with these?

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

                                          Online Users

                                          J
                                          2
                                          C
                                          R
                                          Q
                                          N
                                          E
                                          S

                                          14
                                          Online

                                          146.7k
                                          Users

                                          22.4k
                                          Topics

                                          122.6k
                                          Posts

                                          Powered by NodeBB Forums | Contributors