fxDreema

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

    Help with MQL block and variables please

    Questions & Answers
    6
    23
    3838
    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.
    • AlphaOmega
      AlphaOmega last edited by

      Hi guys I need a hand please

      This is my shared copy: https://fxdreema.com/shared/EAhTv3Bic ..It is based on an averaging code of roar:
      This is the original code: ..https://fxdreema.com/shared/VeKz6Pg7d

      The problem is with the MQL code, Modify Stops and my variables is mess-up. ![0_1628028921617_474801e4-3253-4e35-ad94-fa03df89506c-image.png](Uploading 100%)
      Can someone please get boat to sail.

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

        @alphaomega The image link is not visible. Can you please reupload 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.

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

          @l-andorrà here you go ... The only thing I am trying to do is to distinguish between Buy and Sells averages. Because as now the averaging orders collide with each others TP
          0_1628083909203_bab6b17e-742d-4606-a745-04ab64637190-image.png

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

            @alphaomega Oh, man. This is advanced code for me. 😞 I'm afraid this is not my field of expertise, sorry. Maybe a coder will be able to help.

            (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
            • TipsyWisdom
              TipsyWisdom last edited by

              i would omit using the word "sell" or "buy" as names of variables and constants.

              Other than that though, my experience with custom code is that if there is a word thats in a different color in the rest, thats the identification of a problem.

              AlphaOmega 1 Reply Last reply Reply Quote 0
              • AlphaOmega
                AlphaOmega @TipsyWisdom last edited by AlphaOmega

                @tipsywisdom I hear you but I do not understand why the name will make a difference? Its what,s going on inside the variable... I know what the problem is, I am just to dumb to rectify it. I am no programmer and this an algo problem, so I am stuck here. If I leave the names as is then the Buys TP collide with the sells TP and visa versa. In other words when the sells take profit it also deletes my buy orders and visa versa. This means I am in negative again. Look at this and try understand what I am saying.. maybe I am asking the wrong question... not sure how to ask for help in another way.
                0_1628269232168_8de1a307-38dd-4644-9f06-3ec8fd2f7a8e-image.png

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

                  @alphaomega Ill reply for tipsy, although the names used shouldn't make a difference, they quite often will and you will get undesirable results, this can also happen if you name a comment the same as a variable/constant, normally takes quite a few before this happens, so getting an unexpected result is not what you would expect.

                  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! 😊

                  1 Reply Last reply Reply Quote 2
                  • bk7
                    bk7 @AlphaOmega last edited by

                    @alphaomega
                    whats missing for me after a quick check is a logic that starts and ends where you have many loose blocks and loop many times first i would think what could i take from one, better use more variables and make calculation after the loop then looping that often and custom code double is just inside the block, so if you want to use the value of a variable you better make it as variable on variables tab not just within a single custom block.
                    Another thing i could recommend you, is null your variables before the loop, so sure they have no value, just after the loop...

                    AlphaOmega 1 Reply Last reply Reply Quote 1
                    • AlphaOmega
                      AlphaOmega @bk7 last edited by AlphaOmega

                      @bk7 Thank you for your advice... I started with a algo from roar.. which I have added in my first post and then made a complete expert. Everything is working fine but the Buy and Sell Tp,s average delete each other as soon as one of the Buys or Sells take profit. The expert I posted is the sells part of the expert. I was wondering if somebody could take the original algo written for buys:
                      here: https://fxdreema.com/shared/VeKz6Pg7d
                      and change the names of the variables to sells so it will still work as the original. I will then take it and change it to form the sells part of the complete expert This is my problem, I tried all kinds of ways but somehow the compiling makes an error when I change it. I am sure it got something to do with that MQL block and Modify stops block. Somewhere in there is still mention of buys average
                      Regards

                      TipsyWisdom 1 Reply Last reply Reply Quote 0
                      • TipsyWisdom
                        TipsyWisdom @AlphaOmega last edited by

                        @alphaomega something from Roar, it probably has quite a bit of custom code since that dude is a whiz.

                        You never know what is going to interfere with something else. Or what is supposed to interfere with something else.

                        AlphaOmega 1 Reply Last reply Reply Quote 1
                        • AlphaOmega
                          AlphaOmega @TipsyWisdom last edited by

                          @tipsywisdom So true.. and he has disapeared!! what a loss to Fxdreema

                          TipsyWisdom 1 Reply Last reply Reply Quote 1
                          • TipsyWisdom
                            TipsyWisdom @AlphaOmega last edited by

                            @alphaomega disappearances from Dreema usually means a quitter or a winner.

                            I bet he went on to be a winner. Good for you @roar

                            AlphaOmega 1 Reply Last reply Reply Quote 0
                            • AlphaOmega
                              AlphaOmega @TipsyWisdom last edited by

                              @tipsywisdom Lol... or maybe he got himself in trouble with that magic and the FBI is looking for him... There are others here that is also wizz kids... Like @miro1360 but he seldom writes anything these days

                              M 1 Reply Last reply Reply Quote 2
                              • AlphaOmega
                                AlphaOmega last edited by

                                This expert works great,, check the results with the problems still existing
                                1_1628369986975_Capture2.PNG 0_1628369986975_Capture1.PNG

                                TipsyWisdom 1 Reply Last reply Reply Quote 0
                                • TipsyWisdom
                                  TipsyWisdom @AlphaOmega last edited by

                                  @alphaomega not having looked at anything. I wonder, is this something like SPX or Gold? It looks like an EA created with a heavy 1 sided market. More long opportunities that win based on history. Not saying thats wrong, but when I am building EA's for markets like that, I try to focus on the direction that the market has NOT been going in first and if I can prove something, then I will move on to trading in the same direction.

                                  AlphaOmega 1 Reply Last reply Reply Quote 1
                                  • AlphaOmega
                                    AlphaOmega @TipsyWisdom last edited by

                                    @tipsywisdom EURUSD Jan 2020 - present .. Does not matter really because I will not use it as is, till the algo problem is sorted and I can trust the expert. This is just to show the mechanics of the expert is working well under the circumstance.

                                    bk7 1 Reply Last reply Reply Quote 1
                                    • bk7
                                      bk7 @AlphaOmega last edited by

                                      @alphaomega
                                      so you still have a problem or solved it, sry i am a bit confused, if yes the same or different one?

                                      AlphaOmega 1 Reply Last reply Reply Quote 0
                                      • M
                                        miro1360 @AlphaOmega last edited by

                                        @alphaomega said in Help with MQL block and variables please:

                                        @tipsywisdom Lol... or maybe he got himself in trouble with that magic and the FBI is looking for him... There are others here that is also wizz kids... Like @miro1360 but he seldom writes anything these days

                                        This kid comes here from time to time and watches the creativity of other people 😉

                                        Between trading and gambling is a very small gap, be careful.

                                        AlphaOmega 1 Reply Last reply Reply Quote 4
                                        • AlphaOmega
                                          AlphaOmega @miro1360 last edited by

                                          @miro1360 Ahh!! Miro welcome back!! Please use your magic wand and change this algorithm to sells please.
                                          https://fxdreema.com/shared/VeKz6Pg7d
                                          If I use this on the sell order side of my expert it works correctly but when the sell orders close at average take profit also close the negative buy orders that is open. I tried change the names of the variables in the algorithm of the sell side but then I get a lot of errors when compiling.
                                          I have started this project from scratch as I am confused with all the variables and why I use them.
                                          Here is the new fresh start: https://fxdreema.com/shared/ppq3D5WAb

                                          1 Reply Last reply Reply Quote 0
                                          • AlphaOmega
                                            AlphaOmega @bk7 last edited by AlphaOmega

                                            @bk7 Hallo ... Thank you for your interest. I started afresh because I am confused myself as to, why I have some of the variables. As I went along I left some variables which was used in finding the correct blocks, when I deleted the wrong blocks their variables was not deleted and is obsolete now..

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

                                            Online Users

                                            A
                                            A
                                            E
                                            B
                                            M
                                            J
                                            B

                                            19
                                            Online

                                            146.7k
                                            Users

                                            22.4k
                                            Topics

                                            122.6k
                                            Posts

                                            Powered by NodeBB Forums | Contributors