fxDreema

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

    Storing the risk taken on a pair's individual currencies as a variable?

    Questions & Answers
    2
    4
    40
    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.
    • G
      gaberen last edited by

      I'm currently working on a multi-symbol MT5 EA to help me backtest my algorithms. I want to store the risk of each currency from the fx pairs I trade to make sure that I don't risk too much on correlated symbols.

      Here is a snippet of my project:
      https://fxdreema.com/shared/yIfuGVLNc

      I'm currently trying to use Global Variables but it hasn't been working like I want it to. The way I have it right now, it only stores the risks of the 2 currencies from the pair selected in the strategy tester settings (see Pictures below). I want it to store the risks of all the currencies that the EA is trading.

      818587dd-a74f-4a09-9f5b-bb00ca1536d7-image.png
      4b39cb7d-0b05-4ce9-b5a9-eb7aa39a0d24-image.png

      I'm not really sure if Global Variables are the way to do it, does anyone have any better ideas?

      Thank you in advance!

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

        This is definitely not my field of expertise. I hope jstap can give you a hand.

        (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 1
        • G
          gaberen last edited by gaberen

          I have managed to do it by using a CHashMap as a dictionary and also by using the function CurrentSymbol()
          I can't explain it well but here's what I have for my code

          image.png
          image.png

          Next I need to find out how to cut off the next block from running (disabling a trade from being placed) if the risk on a symbol is too high, I've tried using " return; " but it doesn't seem to be working as I want it to, but I'll go ask that on another thread if I really can't figure that out.

          EDIT: Turns out I can use ~next~ and ~inext~ to allow and disallow the next block from running

          1 Reply Last reply Reply Quote 1
          • 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 1
            • 1 / 1
            • First post
              Last post

            Online Users

            M
            M
            T
            S
            R

            21
            Online

            146.9k
            Users

            22.4k
            Topics

            122.6k
            Posts

            Powered by NodeBB Forums | Contributors