fxDreema

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

    Assigning values to Global Variables with Custom Code in FX Dreema Studio

    Questions & Answers
    4
    8
    1623
    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.
    • Q
      QuantEngineer last edited by

      I have been creating some custom blocks using FX Dreema Studio, and it has been great and really helpful to create my own blocks for the EAs, and this week I got to a situation that seems simple, but I still couldn't figure how to do, I want to assign values to Global Variables, on my custom blocks made with FX Dreema Studio.
      Something like what the original "Modify Variables" Block is doing, when we place a variable to receive the values in it. In the example below, the original block is assigning a value to the User Variable called "pip_converter".

      The question is how to mimic this behavior using FX Dreema Studio?

      0_1636820998099_fbf677bb-a9db-4a1a-8dc3-cbb21f0f74eb-image.png

      Quant Engineer
      www.abfs.tech

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

        0_1636866931452_363eb405-e4b6-42d9-b95e-c26f5469c1fc-image.png

        maybe this is what you need instead for the selection underneath?

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

          @quantengineer I'm afraid I cannot help with your query but could you please share the created blocks? That would be a very good help to anyone using fxDreema Studio.

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

            I did not start the creation of this block yet, because it would require this specific knowledge, on how to assign values to a user variable from the class V:: using FX Dreema studio.

            Quant Engineer
            www.abfs.tech

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

              Hello @tipsywisdom , thanks for interacting. I am not quite sure i understood what you mean... The block on your description seems to be the original block that assigns values to the user created variables, in the class v::
              I am working to make 1 of my custom blocks do the same thing as this block does... I have created a custom formula to calculate trade volumes, and i want to save the calculated volume to any user defined variable , like the "modify variables" block does.

              Quant Engineer
              www.abfs.tech

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

                @quantengineer said in Assigning values to Global Variables with Custom Code in FX Dreema Studio:

                Hello @tipsywisdom , thanks for interacting. I am not quite sure i understood what you mean... The block on your description seems to be the original block that assigns values to the user created variables, in the class v::
                I am working to make 1 of my custom blocks do the same thing as this block does... I have created a custom formula to calculate trade volumes, and i want to save the calculated volume to any user defined variable , like the "modify variables" block does.

                sry friend, not sure how to help...why not just use the block as is? As far as I am aware it will still use global variables.
                I dont program to the level that you do obviously, but from what I understand people who are at that level, come to dreema for the ease of not having to code every bit of it. just custom stuff that cant be accomplished in dreema.

                1 Reply Last reply Reply Quote 0
                • T
                  Thombo last edited by

                  @QuantEngineer. did you ever resolve how to do this? I have the same issue. I am unable to update a variable in fxdreema from a custom block directly. I can however call a custom function from fxdreema and pass an array declared thus - double someFunction(int somevar, double &SomeArray[10][10]){}, then called somevar = someFunction(somevar, SomeArray);
                  This will return your augmented somevar and will also return the array that can be refered to that can have numerous values in it of course. But all of this isn't as simple as getting a value from a custom block. It would be nice if the fxdreema developer could let us know how to do it.

                  1 Reply Last reply Reply Quote 0
                  • Q
                    QuantEngineer last edited by

                    I haven't found yet the "FXDreema way" to do that... The solution I am using is to declare global variables, classes, arrays, etc... on FXDreema Studio, these objects are public on global level... and can be read from anywhere else in the code... not ideal, because the developer has to know in advance the names of these variables... but it works well also... I would love to know the method officially used by FX Dreema... if someone bumps into it, please make it public...

                    Quant Engineer
                    www.abfs.tech

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

                    Online Users

                    J
                    T
                    J
                    B

                    23
                    Online

                    146.7k
                    Users

                    22.4k
                    Topics

                    122.6k
                    Posts

                    Powered by NodeBB Forums | Contributors