fxDreema

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

    How to get data from object (horizontal line) then store at variable

    Questions & Answers
    4
    18
    1325
    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.
    • S
      Steven_ last edited by

      i need someone help , i dont know how to get data value from a horizontal line then store to variable. i need to use the existing data (horizontal line), then store to varriable method, because customer want, if accidentally close the MT4 app, then there is a horizontal able to trace back for variable.

      https://fxdreema.com/shared/gJQx3YBEb
      can help me done a workable function?

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

        I'm not sure exactly what you're trying to do for your particular project linked, it's a little confusing to me. But generally when I personally want to store something from a object. I'll grab a For Each Object node and input the name of it. Then modify variable and get the value/property I need. Here is an example. The lines will redraw each new trade placed so the name is always the same and the variable is updated automatically each new trade. This will only work if one trade is open at a time though. If there is more than one, it can be more complicated. I hope this helps you at least a little bit.

        https://fxdreema.com/shared/vsW0yVaTd

        1 Reply Last reply Reply Quote 0
        • S
          Steven_ last edited by

          thank u very much from yr idea and time, i appreciate it

          i also not that familiar on draw object block.
          my desire function is to get data value from "horizontal line", then assign to a variable. This is to create No matter how i suddenly close MT4 then open again, i wish able to remain the data for variable, because in fact when we close MT4, all variable become 0 as initial. we need a draw object help
          Such as GOLD buy order placed 1900, SL 1895, TP 1910, horizontal line is drawn at 1895 and 1910. The horizontal line is to trace back the SL and TP, this customer want.

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

            I see, so if closed the whole chart window for example, yes the variable is back to 0. I believe what you're looking for is probably storing the value into a GlobalVariable, which stays stored in MetaTrader for a certain amount of time. So even if the chart window closed and EA shutdown, etc, it will remain the same. There is a block in FXDreema called Terminal Variables, which does this under the Output section.

            Unfortunately, I'm not super knowledgeable on the topic but it's what you're probably looking for. You'll likely need to utilize the OnDeinit and OnInit function with your global variable. I can look into it when I have some more time unless you figure it out or someone else can help out!

            1 Reply Last reply Reply Quote 0
            • S
              Steven_ last edited by

              wow, now i only know about terminal variable, will try and play it

              1 Reply Last reply Reply Quote 0
              • S
                Steven_ last edited by

                wow this really help me a lot!!!, terminal variable can store value when close the MT4 apps, open back, then can see the important data, great thank you. i no need to use drawn object get value which much troublesome.

                willramsey 1 Reply Last reply Reply Quote 0
                • willramsey
                  willramsey @Steven_ last edited by

                  @Steven_ This seems to work and what you want. Instead of modify variables, I am using the Terminal Variables block instead. Then on OnInit, you want to pass and Draw Line at the price "Terminal Variable Name".

                  So it will draw the lines again on initiation and it should update properly automatically.

                  Screenshot 2023-11-23 042530.png Screenshot 2023-11-23 042508.png

                  1 Reply Last reply Reply Quote 0
                  • S
                    Steven_ last edited by

                    aiya is not working nicely, terminal variable very hard to use it

                    willramsey 1 Reply Last reply Reply Quote 0
                    • willramsey
                      willramsey @Steven_ last edited by

                      @Steven_ Hm, I'm not sure then. The way I did it always redrew the lines back even when exiting the expert at the last opened trade SL/TP level. May be more complicated in a larger project.

                      1 Reply Last reply Reply Quote 0
                      • S
                        Steven_ last edited by

                        if fail to use terminal variable, then if able to get data from horizontal line, or text appear, then is ok as long as get data from chart object. The main purpose is to get data from object then store to variable.

                        else using terminal variable.

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

                          I don't know what your whole project looks like on exactly what your doing so I can't really help further.

                          You could use a normal variable on the OnTick tab. Then, maybe on DeInit incase of MetaTrader closure, store into a Terminal Variable. Then OnInit, draw the lines back with terminal variable like I showed, but add an additional block Modify Variables, to modify the original variable back from your OnTick tab using the terminal variable. Seems like a headache.

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

                            @willramsey If you need the bot to find that horizontal line as soon as the terminal is reopen you will need a standard variable (never a terminal variable) and store the price value in the 'on init' tab like this:

                            01.png

                            Please notice that the line should have a name that needs to be correct. Otherwise it will not find 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.

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

                              @l-andorrà Yes, but I was saying terminal variable if the chart the EA on was completely closed and was shutdown. If the chart window closed, the line is also gone. But, maybe I was misunderstanding him.

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

                                I don't know if terminal variables can do it. What I'm saying s that you don't know them if you are using standard variables like I said.

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

                                  Terminal variables can be used in place of nearly any numeric variable, but they do not lose value when the terminal is closed.

                                  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 0
                                  • S
                                    Steven_ last edited by

                                    the horizontal line created by EA will not delete after shutdown, it still appear when open it again.
                                    it is much better to use chart & object, hence better use the horizontal line value to pass to variable again once we open MT4, because variable will clear after shutdown.

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

                                      When something happens set the global variable value to something like 0, then it cannot be used until needed.

                                      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 0
                                      • S
                                        Steven_ last edited by

                                        great! using simple chart & object can trace and store value into variable, no need terminal variable, will later future improve the function. Thank u to everyone spend time and share the idea, great.

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

                                        Online Users

                                        A
                                        F

                                        6
                                        Online

                                        146.7k
                                        Users

                                        22.4k
                                        Topics

                                        122.6k
                                        Posts

                                        Powered by NodeBB Forums | Contributors