fxDreema

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

    Library Studio

    Questions & Answers
    6
    43
    7594
    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
      jjegtrader79 last edited by

      Good morning, I would like to know how whether the Studio has a tutorial or something. I find it quite useful since I need to check the day a certain trade was closed in order to avoid opening another trade on that same day... Do you have any tutorials on that?

      l'andorrΓ  1 Reply Last reply Reply Quote 0
      • H
        hilavoku last edited by

        Hi,

        i'am new to fxDreema and i did make my progress with it but now i need a simple function.
        How do i convert the difference between to currency values into pips? I thought i write a library and using the 'PipValue' function. But i searched for a help/tutoial on how using the Studio. But i found not really some usefull things or an example.

        So; did i miss a corner of the webpage or where can i find a tutorial in writing my own functions 7 libraries...

        thx in advance
        hila

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

          I'm using this part of fxDreema to build system blocks and it works for me, but for average people... I don't know, it's really not very well documented. At some level I prefer to be like that, because sometimes I'm changing my own API functions or other rules. And you are maybe 2nd or 3rd (of almost 2000 people now) who ask for it.

          By "library" I mean the code of the block. I think I will retire this word and will use just "block".

          What you can do in Studio is to create a new block, write code for it (this code will be inserted in a generated funtion later) and define input parameters for it (right-top panel). Those parameters will be automatically inserted at the top of the code. You can also define your own functions (right-bottom panel) and use them inside the code, but what is important here - if you defined some function and it is not used by any block, it will not be included to the final EA code.

          And all of this should work if there are no bugs πŸ™‚ The last time I made updates on Library Studio was probably more than 6 months ago...

          1 Reply Last reply Reply Quote 0
          • H
            hilavoku last edited by

            Oh. I'am really the 2nd or 3rd oen? Mmmh. But i think i will need it more than once to include some own functions into fxDreema. Just a simple example would be nice. I have no clue how to write a new custom block (by the way. I think block is much better than library πŸ™‚ )

            Would be nice if you could write this currency value to pip function. I should learn from it...

            thx in advance
            hila

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

              You checked this and this?

              I tried to create a block named "MyCustomBlock" in your account. But today my internet is broken and I can't do many things.

              But try it, there is nothing you can broke there. I'm pretty sure that with very little trial and error you will get it. Library Studio is not very complex actually.

              1 Reply Last reply Reply Quote 0
              • H
                hilavoku last edited by

                Thanks for teh feedback. The example helps a lot. Could be that i thought the thing would be much more complex. I will try it and if i fail than i will call ya πŸ™‚

                thx again!

                1 Reply Last reply Reply Quote 0
                • H
                  hilavoku last edited by

                  So i gave it a try and totally failed. No clue how to program a block which simply gets an input parameter, multiplies it with another input parameter and somehow gives the result back to the EA. The handling of the variables isn't that obvious...

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

                    You can define global variable(s) into the smaller field below the block's code. Then, this variable can be used with it's name in other blocks. I'm using this method for a very few system blocks, because I want global variables to be free to be used as Formula Results, Constants and Variables.

                    I prefer to store data in functions with static variable inside.

                    The block itself is also a function, but that function is not meant to return a value.

                    What do you expect to see? Block with 2 input parameters, who makes calculations internally and returns the value.... where? And where you want to use that value?

                    1 Reply Last reply Reply Quote 0
                    • H
                      hilavoku last edited by

                      I think it would be fine when i see how i could do such a simple task as i mentioned before. Then i can grasp how your idea looks like πŸ™‚
                      For a block i define a global variable within LibraryStudio. But when i change to fxdreema i won't see this variable in the list of defined variables nor when i right-click another block...
                      At the moment i really have a problem in understanding the consistency of the variable handling...
                      (I'am no dummy when it comes to programming. I've studied computer science and saw more then one programming language...)

                      sincerely
                      hila

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

                        Well, this is not a new programming language. What is different is that different parts of the code are written in different places πŸ™‚

                        Unfortunately Library Studio is still not capable to return compilation errors, I'm still skipping this...

                        Have a look at it now. Global variables are defined in the same way you define it in MQL4, something like "double Varname=0;".

                        1 Reply Last reply Reply Quote 0
                        • H
                          hilavoku last edited by

                          __Well, this is not a new programming language. What is different is that different parts of the code are written in different places πŸ™‚ [/quote:21gc99yf]
                          Yepp. That was one of the problems i had πŸ™‚

                          __ Unfortunately Library Studio is still not capable to return compilation errors, I'm still skipping this... [/quote:21gc99yf]
                          No prob at first glance.

                          __Have a look at it now. Global variables are defined in the same way you define it in MQL4, something like "double Varname=0;".[/quote:21gc99yf]
                          Okay i see. Can you now tell me how can i use the variable 'ResultPipValue' defined within LibraryStudio in a block in fxdreema.? Than i think i have all i need to know ⚑
                          I thought i should see the variable as soon as i drag the block into the EA...
                          You can modify my EA 'DrawCZs' if you wan't...

                          thx in advance
                          hila

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

                            Global variable defined in block is automatically included in the final EA, but it is not included to Constants or Variables. You can see where it is placed if you open the .mq4 file, it's somewhere on the top where all global variables are πŸ™‚

                            1 Reply Last reply Reply Quote 0
                            • H
                              hilavoku last edited by

                              Okay. I see the variable defined in the MQ4 file. But what can i do with this value within the other blocks? I can't work with this value within the condition or formula block. The EA blocks can't 'see' this variable...

                              Sorry to bother you again. I feel a little bit stupid.

                              thx again !
                              hila

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

                                Global variables can be used in every MQL function. Well, there is a small problem when a local variable with the same name is defined inside the function - in this case you work with the local one, global variable remains untouched.

                                Any MQL global variable name can be used in Condition, in "Value (Numeric)" if it is "double" or "int" or "bool", for example.

                                I understand that working with variables is easy thing in MQL and not so easy in fxDreema, so I'm still searching for better ways to do it. In one hand, those who don't understand programming must be able to get it, and in the other hand programmers must have good and flexible control. In one hand a variable is something so small that does not deserve a whole block dedicated only for it, and in the other hand it can be one of the most important things in the project.

                                I'm a little bit stuck in this zone, so I'm probably not able to get a good idea of how to work with variables anymore. That's why I asked you what is your expectation of how things should be. What do you want to define, where do you want to define it, and then how do you want to use it in the same block or in others? I mean, visually.

                                1 Reply Last reply Reply Quote 0
                                • H
                                  hilavoku last edited by

                                  Okay thanks for the explanation and i understand your problem. I will summarize my thoughts and try to post them in a understandable view. Priority is the visual style of creating an EA. I hope we can combine both worlds...

                                  1 Reply Last reply Reply Quote 0
                                  • H
                                    hilavoku last edited by

                                    So. Here are my first thoughts. The simplest way would be like this:

                                    When i open Library Studio:

                                    In the lower windows labeled: 'Global variables, includes' i whish to see all allready defined (global) variables in the EA. So i can use those variables like the self defined one on the upper right window.

                                    Also when i create a new global variable in Library Studio it should be shown back in the fxdreema GUI as a defined variable and use it directly in the blocks.

                                    This would be a great step forward in intuitively using variables across Library Studio and fxDreema GUI. Without killing the nice visual programming style.


                                    I've got another idea/addition: In LibraryStudio: We could use a new keyword like ~output~. After the keyword you write a local defined variable and say fxdreema that this is the returnvalue.

                                    In fxDreema the block GUI will then show a field where you can select a defined (global) variable and give it the value of the returnparamter from the manually written block. ( global variable = return variable )

                                    The programming of this should be straight and simple. The advantage of this is the possibility of changing the name of a global variable without killing the manually written block! I think this is even better then the first solution i thought of..

                                    When i continue this idea we also could use this kind of variable exchange to use this for an input parameter πŸ™‚
                                    Keyword: ~input~'InputVariableName'
                                    Then in the fxdreemaGUI you got one label which says: 'input variable' = 'some global defined variable to select'

                                    This would be the complete encapsulation of in- and output parameters for manually written blocks but doesn't touch the fxdreema GUI for standard blocks!

                                    What do you think?

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

                                      I think I must rewrite many things πŸ˜„
                                      I got your idea, it is to make possible for the custom block to induct something into the project. I actually started something like this, but I don't like the way I made it, so it is still not included πŸ˜• I just don't feel "That's it!" sensation.
                                      I must say that I can't promise you some time to make new things in Library Studio, basically because it really needs to be rewritten and some things to be optimized. But if there are 3 things I think about all the time, they are:

                                      • Damn, I must update this documentation...
                                      • How to make debugging process faster and easier in MT
                                      • How to increase flexibiliy of blocks - working with variables, custom code, strong and good API...
                                      1 Reply Last reply Reply Quote 0
                                      • H
                                        hilavoku last edited by

                                        fxDreema is a big project. There will allways be something to do. Take your time πŸ˜‰

                                        So if you have a question or problem mail me.

                                        Back to my problem: Is there a workaround for me to get the value of ResultPipValue from the manually written block into the block in the GUI without manually modifying the MQ4 code? At the moment i'am really stuck with this problem on how to get this pip value back into the GUI.

                                        PS: I think the way i posted above should be clean and 'simple' to program so that it will satisfy the needs of most people.

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

                                          If you define global variable for some block, it will be included at the top of the EA automatically, and it will be available for all the blocks, similar to Constants and Variables. But you have to remember it's name. Just write it's name somewhere, like it is a number. Instead of "10" -> "ResultPipValue". If this is what you ask for...

                                          1 Reply Last reply Reply Quote 0
                                          • H
                                            hilavoku last edited by

                                            Ah. Cool. Now i understand πŸ˜†

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

                                            Online Users

                                            H
                                            E
                                            A
                                            G
                                            Q
                                            C

                                            36
                                            Online

                                            146.7k
                                            Users

                                            22.4k
                                            Topics

                                            122.6k
                                            Posts

                                            Powered by NodeBB Forums | Contributors