fxDreema

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

    Transformation of profit/loss into price level

    Questions & Answers
    5
    13
    1352
    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.
    • l'andorrà
      l'andorrà last edited by

      I always ignored the repeated requests of transformation from money to price level in order to find a TP/SL level. However, I finally find myself needing it for a project. Sadly, I don't find the formula doing that.

      My project is having several open trades at the same time (buys and sells) and I need to find the dynamic price level that would hit a specific TP/SL in money. So far I selected the corresponding 'check profit/loss' block and then close them all. However now I'm explicitly requested to find the corresponding price level where that will happen. Could someone please tell me the formula used to transform money into price?

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

      1 Reply Last reply Reply Quote 1
      • S
        sktsec last edited by sktsec

        Idea:
        x = Money/lot size
        a = Money per tick
        b = tick size

        amount = b(x/a)

        1 Reply Last reply Reply Quote 1
        • S
          sktsec last edited by sktsec

          @l'andorrà
          https://fxdreema.com/shared/037xpdHFb

          capture_001_25072023_023553.jpg

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

            On every source code downloaded from fxdreema, there is a function called DynamicLots. Inside that function is an equation that calculates the lot size using a price distance (the SL) and a money value (% of equity).

            With some high school math, you can reverse that equation to calculate a price distance using the lot size and money value.
            @sktsec 's example appears to be about right 👍

            image.png

            Need small help? Tag me in your post
            Need big help? https://www.fiverr.com/big_algo/automate-your-winning-strategy-in-mql4-or-mql5

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

              Thank you to all. I will check all options. All of you are great! 😉

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

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

                @sktsec I tried it but it doesn't work. The final result is only modified by the value of 'TP_money' constant only. I tried the same value for 'TP money' with different lot size values and the result on 'tp_fraction' doesn't change. I'm testing on EURUSD with a 5 digits chart.

                Now I will try to work on roar's suggestion.

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

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

                  @roar I began to review it and I would appreciate some confirmation here on the variables of that formula:

                  1. 'Size' and 'value' variables mean current lot size.
                  2. SL means stop loss distance in pips. In effect this is the number I'm looking for.
                  3. 'AccountEquity' mean equity right now.
                  4. Both 'TickValue' and ' PipValue' numbers can be found as per sktsec's suggestion, right?

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

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

                    @l-andorrà

                    1. Size is lot size, but "value" is a percentage of equity, the user input in in the "risk % of equity" setting. You can replace the whole ((value/100)/AccountEquity()) part with your own money variable.
                    2. Yes
                    3. Yes
                    4. You can see how TickValue is fetched with SymbolInfoDouble() function a bit higher up in my screenshot. You can use that method or the fxdreema dropdown, its the same thing.
                      I think you need to always use PipValue(symbol) as a custom function, there is no drop-down selection for that.

                    Need small help? Tag me in your post
                    Need big help? https://www.fiverr.com/big_algo/automate-your-winning-strategy-in-mql4-or-mql5

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

                      please am a beginner, just finished a simple project but it cannot run on the strategy tester , what should i do thanks

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

                        @roar Thanks, I will try to build a new formula with it.

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

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

                          @nwabu Could you please open a new thred for your question instead of kidnapping this one?

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

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

                            Hello @roar
                            I want to know the amount of tp and sl in currency (not in price or pip).

                            I read your post and created a project based on it.
                            But unfortunately, it does not work properly in different markets.
                            I am sending the picture of the result in Eurusd and Nasdaq market as an example.

                            alidavoodi 1 Reply Last reply Reply Quote 0
                            • alidavoodi
                              alidavoodi @alidavoodi last edited by

                              @alidavoodi
                              https://fxdreema.com/shared/1gX0Gs4zc

                              Nasdaq:
                              nq.png

                              EURUSD:
                              eur.png

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

                              Online Users

                              T
                              F
                              I
                              S
                              S
                              G
                              I
                              B
                              D
                              T
                              T
                              G

                              27
                              Online

                              146.6k
                              Users

                              22.4k
                              Topics

                              122.6k
                              Posts

                              Powered by NodeBB Forums | Contributors