fxDreema

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

    Hedging Grid Mix Lots @ Boxxocode

    Questions & Answers
    4
    38
    3871
    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.
    • B
      bigfoot last edited by

      This is a really interesting one from Boxxocode, strangely it seemed to work first time and then I added a TP in to close the widening gap it creates from the buy/sell.

      Since doing that it now seems to be bugged (even though I've rebuilt from new again. Does metatrader store code on the strategy tester?

      The fault in this is it works as intended for the first sell and buy close profit and then does the opposite on the 2nd batch and forever, instead of close at £2 profit it closes £2 at loss??

      If someone could test it? Or has already coded it to check?
      I've watched the video several times and checked my code and all seems to be as instructed.

      Shared copy is:

      https://fxdreema.com/shared/pgt52et4

      4d1942ec-7670-4e85-ab88-b1221db6ace4-image.png

      eb6f0a51-4edd-4361-9821-96aaf8cd8ecf-image.png

      1 Reply Last reply Reply Quote 1
      • B
        bigfoot last edited by

        Watching it again it takes the losses when the equity is positive but there is an opposing buy/sell so if the sells are negative and buy is positive it continues to close the sells, so i think the code may be correct and I've not fully understood the logic... so it might be able to be improved when in positive equity. Or it might be not designed to run continuously on strategy tester..

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

          Blocks 15 and 21 are redundant. You can remove them.

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

          B 1 Reply Last reply Reply Quote 2
          • B
            bigfoot @l'andorrà last edited by

            @l-andorrà thank you I will remove them 👍

            1 Reply Last reply Reply Quote 0
            • B
              bigfoot last edited by

              https://fxdreema.com/shared/gCSoXW6ge

              This still closes basket trades at a loss, i think the logic only works when it is in negative equity so must be the boxes ObNb and OsNs formula (34 and 40). So when it has a positive balance the trades will close out on trade 3 at the close out money value, it reverses itself... weird but probably a simple fix somewhere?

              1 Reply Last reply Reply Quote 0
              • B
                bigfoot last edited by

                What i thought this should do is:

                Buy1
                Buy2
                Buy 3
                Buy4
                Buy5
                Buy6
                Buy7

                Lets say these are at 10 pip grids when buy7, buy6, buy5, buy4 reach +£ including the oldest Buy1 then it closes 1,7,6,5, leaving 2,3,4 running which then in turn become Buy1, Buy2, Buy3 and so on...

                1 Reply Last reply Reply Quote 0
                • B
                  bigfoot last edited by

                  Right I think I've identified the problem, it is when it is in positive equity boxes 9 to 18 reverse the constant "Close_newest_at_order" 2. I'm not sure why it does this? Would a Pass or reset Counter make it work? And where would I put it so code resets the current balance/equity to run again.

                  I've added a close all trades at + unrealized profit but this hasn't worked.

                  https://fxdreema.com/shared/09qW8cqzc

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

                    I never use 'basket of trades' blocks. I always use 'for each trade' structures instead. They are 100% effective. You should substitute them IMHO.

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

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

                      @l-andorrà thanks I'll see if I can figure it out but for each trade block I would need multiples to count the buys and sells?

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

                        @bigfoot Correct.

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

                        B 2 Replies Last reply Reply Quote 0
                        • B
                          bigfoot @l'andorrà last edited by

                          @l-andorrà Thanks for pointing me in the right direction, I've figured it out now 👍

                          1 Reply Last reply Reply Quote 1
                          • B
                            bigfoot last edited by

                            Just one more question if I stop trading and turn my PC off, then the next day turn on again will the old trades still be counted or doI need to input more code? This would be leaving the ea on screen and not on Init?

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

                              @bigfoot No, once you turn off your PC all information regarding previous trades is lost. The only two ways to do that is by using 'terminal variables' (not the 'normal' variables) or by using a specific 'for each trade' structure in the 'on init' tab with this block:

                              01.png

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

                              B 2 Replies Last reply Reply Quote 0
                              • B
                                bigfoot @l'andorrà last edited by

                                @l-andorrà ah ok I'll have a look at that, thank you.

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

                                  @l-andorrà would you mind having a look at this please? I've added the for each trade as loops and created variables to hold the values however I'm struggling with the formula. Currently it is just closing all trades at once when the oldest comes back into profit?

                                  I want to take the oldest losing trade and close that trade along with the in profit trades when those values reach a value in money. The next oldest trade in loss is left running and becomes the oldest and then it continues in the loop taking in profit trades to close them and the oldest loser.

                                  Boxes 25 to 36 close the buy trades and boxes 37 to 48 close the sell trades.

                                  Feels like I am close to solving this but not quite close enough!

                                  Thanks

                                  Bigfoot.

                                  B 2 Replies Last reply Reply Quote 0
                                  • B
                                    bigfoot @bigfoot last edited by

                                    shared:

                                    https://fxdreema.com/shared/plnTQJbod

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

                                      Trade information is stored on the terminal, which means even after closing and restarting you can access the data.

                                      Learn fxDreema Without the Wait!

                                      My comprehensive book, available on Amazon, is packed with examples and invaluable insights to help you fast-track your learning journey.

                                      The paperback and hardback editions include MT4 & MT5 QR codes for easy access to all prebuilt projects and robots, including my latest gold trading robot!

                                      Don’t miss out

                                      Click here➡️ https://mybook.to/fxDreema to get your copy today!

                                      Enjoy! 😊

                                      B 1 Reply Last reply Reply Quote 0
                                      • B
                                        bigfoot @jstap last edited by

                                        @jstap thanks jstap good to know. I'll do this after i've sorted the close trades bit out 🙂

                                        1 Reply Last reply Reply Quote 0
                                        • B
                                          bigfoot @bigfoot last edited by bigfoot

                                          @bigfoot I've now changed boxes 28,29,40 and 41 to the pink loop check profit and check loss. This is better but still closing all trades when profit (all) reaches the TP. Still can't figure out how to only (close the oldest loser) and (all in profit) at the TP, even though my logic seems pretty good...

                                          https://fxdreema.com/shared/KPcGmgaqc

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

                                            Do you want to check the combined value before closing the oldest least profitable one?

                                            Learn fxDreema Without the Wait!

                                            My comprehensive book, available on Amazon, is packed with examples and invaluable insights to help you fast-track your learning journey.

                                            The paperback and hardback editions include MT4 & MT5 QR codes for easy access to all prebuilt projects and robots, including my latest gold trading robot!

                                            Don’t miss out

                                            Click here➡️ https://mybook.to/fxDreema to get your copy today!

                                            Enjoy! 😊

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

                                            Online Users

                                            R
                                            S
                                            D
                                            V
                                            O

                                            15
                                            Online

                                            146.7k
                                            Users

                                            22.4k
                                            Topics

                                            122.6k
                                            Posts

                                            Powered by NodeBB Forums | Contributors