fxDreema

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

    Simple Custom Block to detect Hedging or Netting Accounts

    Tutorials by Users
    3
    5
    1221
    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

      It is known to all developers that running the logic of the EA for netting accounts is usually different from hedging accounts, and sometimes, not even desirable to run on certain types of accounts.
      To resolve this, I have created the simplest custom block that will detect if the account being used is hedging or not. With this block, developers can even decide to terminate the EA, in case it is not running on the right type of account, or the developers can also choose other logical paths, depending on the type of account.

      0_1642701419332_d72f6a36-6d8c-48dd-85ca-994cd00bc399-image.png

      In this simple 1 step tutorial, we will create a custom block that looks like the above image.

      0_1642701517729_a0650659-e7d2-42d7-a660-b495a419c254-image.png

      This Tutorial is ideal for someone just starting out on creating their own custom blocks, because it only uses 1 area of FX Dreema Studio. Just open up your FX Dreema Studio, create a new block and copy paste this code into the main area:

      if ( AccountInfoInteger( ACCOUNT_MARGIN_MODE ) == ACCOUNT_MARGIN_MODE_RETAIL_HEDGING )
      {~next~}
      else
      {~inext~}

      Once this is done, just click Save changes, and that's it.

      Your custom block will show up on the appropriate region of your FX Dreema Builder.

      Allright, this was the easiest tutorial on the Studio, about building useful blocks! Hope you all enjoy it!
      I wish you all the best!

      Quant Engineer
      www.abfs.tech

      R 1 Reply Last reply Reply Quote 4
      • W
        walterwhite last edited by

        thanks bro.

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

          You are welcome

          Quant Engineer
          www.abfs.tech

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

            @QuantEngineer
            Hello @QuantEngineer , can you help me to write a customer block that calculates the "break even" and outputs it for further use? I am currently solving this task with such a constellation.

            6ba7a4c0-d15c-4622-966c-443bb8749000-image.png

            RGoo

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

              Currently, I am not accepting work requests via forums. in case this is important enough to have a budget associated with it, you are welcome to let me know via Inbox and I will be happy to help.

              Quant Engineer
              www.abfs.tech

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

              Online Users

              S
              A
              B
              A
              J
              D

              13
              Online

              146.7k
              Users

              22.4k
              Topics

              122.6k
              Posts

              Powered by NodeBB Forums | Contributors