fxDreema

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

    Let user select Money Manager in EA properties

    Tutorials by Users
    select money management properties
    2
    2
    405
    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.
    • P
      padletut last edited by

      Just a small tutorial on how to let user select Money Manager

      First create a custom block in fxdreema studio

      How to create the custom block:

      I named the block Select Money Management but you can choose the name you ever want to.

      Select the created block, add the following code in Global variables, includes window:

      // Define an enum for money management options
      enum MoneyManagement
      {
          equityRisk, // Risk % of Equity
          balanceRisk, // Risk % of Balance
          freemarginRisk // Risk % of Free Margin
      };
      

      Save Changes

      5ff3f5da-0f68-4750-a638-e279e33fc08d-image.png

      In your fxdreema project

      Create a constant following

      Type: MoneyManagement <- The enumeration we created in fxdreema studio
      Name: selectMoneyManager or what name you want...
      Value: one of the values we defined in MoneyManagement enumeration, example: equityRisk
      Description: Money Manager or whats on your mind....

      ea71ecda-a97d-4ec3-84ee-9605dfd3fcb2-image.png

      Next step is to create a variable where we later is storing the selected money management string name

      Variable
      Type: string
      Name: selectedMoneyManager or whatever you choose...

      95b6c45a-a971-4430-9a0d-b195ce8dde23-image.png

      Next step is to add the blocks:

      402ea0f7-b166-43d7-95a1-9430551f5d45-image.png

      Add the custom block you created "Select Money Management"
      Add "custom MQL block"

      Code for the custom MQL block:

      switch(selectMoneyManager)  // <- Name of the constant you created
      				 {
      					  case equityRisk: selectedMoneyManager = "equityRisk"; break; // Save to variable
      					  case balanceRisk: selectedMoneyManager = "balanceRisk"; break; // Save to variable
      					  case freemarginRisk: selectedMoneyManager = "freemarginRisk"; break; // Save to variable
      				 }
      

      In the Buy/Sell block:
      870e6599-469f-4ab7-ab25-feea936cae8a-image.png

      In this case I have choosed Risk % managements as you can see in enum MoneyManagement

      First select one of the Risk % management

      b2d4c2c4-37d3-4c3e-88f3-e5115586e840-image.png

      Example Risk % of Equity selected:

      02db158d-5362-4720-b4e3-c51c7803602b-image.png

      Now rightclick at the Money management field and select the string variable you created (selectedMoneyManager)

      cef6c6ea-e9c3-4660-8f01-020e4758f677-image.png

      That's all!
      It should now be possible to change the EA Money Management in MT4

      1a6817cd-2c5a-4c62-be63-ca33a1b73f5b-image.png

      Example project: Select Money Manager

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

        Thank you very much for sharing.

        (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
        • 1 / 1
        • First post
          Last post

        Online Users

        M
        L
        F
        F
        M
        E
        K
        M
        T
        A
        P

        25
        Online

        146.6k
        Users

        22.4k
        Topics

        122.6k
        Posts

        Powered by NodeBB Forums | Contributors