fxDreema

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

    Need Help With Currency Exposure Control

    Questions & Answers
    6
    18
    798
    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.
    • F
      FaulknerTrading1 last edited by

      Hello. I have been struggling to implement the type of currency exposure I have used in manual trading:

      This is what I currently have in place, and it stops trades from being entered if there is a trade involving one of the currencies, but this is not exactly what I'm trying to do: https://fxdreema.com/shared/QbCAvggdc

      What I am looking for:

      Lets say EA has two trades open on EURUSD (BUY) and has detected a buy opportunity on EURCHF (Buy).

      A pre-check whereby EA will look for trades containing Buy exposure on the EURO and Sell exposure on the DOLLAR

      then, the check will count the number of open trades (needs to be <=1 trade on the related pair),

      the final check is such that if there exists one trade or less, that the Stop Loss is at or above breakeven

      This is a diagram of the desired logic: https://fxdreema.com/shared/zuKoRd83b

      This is the FINAL piece to my 5 year project so if ANYONE can help, I would very much appreciate it!

      I hope I made sense and thank you in advance to any experts that can help me.

      Faulknertrading1

      1 Reply Last reply Reply Quote 0
      • F
        FaulknerTrading1 last edited by

        I also want to add that I have been looking through the forums for a while on this particular issue, but either the solution makes no sense to me or the solution was not for exactly what I was looking for

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

          @faulknertrading1 The problem is that part where you need to know the exposure on two different currencies (euro and dollar, for example). Are you planning to do it with many duifferent currencies at the same time?

          (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
          • F
            FaulknerTrading1 last edited by

            Hello @l-andorrà and thanks for the response!

            Yeah I plan to trade with the 8 Major Currencies + SGD.
            I think the solution may have something to do with SymbolSelect() and SymbolName() but I wouldn't know where to start with implementing it

            jstap 1 Reply Last reply Reply Quote 0
            • jstap
              jstap @FaulknerTrading1 last edited by

              @faulknertrading1 This would be quite difficult but, in a loop return symbol, cut to first or last 3, then add to variable, use this variable to confirm weather or not to continue. Set this up on a simple project and let me know if something's not working. (think if you search string cut MQL4 you'll find what you need)

              Learn fxDreema Without the Wait!

              My comprehensive book, available on Amazon, is packed with examples and invaluable insights to help you fast-track your learning journey.

              The paperback and hardback editions include MT4 & MT5 QR codes for easy access to all prebuilt projects and robots, including my latest gold trading robot!

              Don’t miss out

              Click here➡️ https://mybook.to/fxDreema to get your copy today!

              Enjoy! 😊

              1 Reply Last reply Reply Quote 0
              • F
                FaulknerTrading1 last edited by

                @jstap said in Need Help With Currency Exposure Control:

                string cut MQL4
                @jstap
                Thanks for responding.

                I'm a bit confused but I'm going to try what you have suggested, will post my attempt asap, thank you.

                1 Reply Last reply Reply Quote 0
                • F
                  FaulknerTrading1 last edited by

                  @jstap hello again, I have tried a few things but nothing is working for me.

                  I have tried this code on crypto pairs as it is weekend, but still I am unable to get the EA to perform as needed:

                  TradeFound = false; // reset

                  string name1 = StringSubstr(TradeSymbolName, 0, 3);
                  string name2 = StringSubstr(TradeSymbolName, 3, 3);

                  // for each trade...
                  for (int i = 0; i < OrdersTotal(); i++)
                  {
                  // select the trade
                  if (OrderSelect(i, SELECT_BY_POS, MODE_TRADES))
                  {
                  // search
                  string tradeName1 = StringSubstr(OrderSymbol(), 0, 3);
                  string tradeName2 = StringSubstr(OrderSymbol(), 3, 3);

                  	if (tradeName1 == name1 || tradeName1 == name2 || tradeName2 == name1 || tradeName2 == name2)
                  	{
                  		TradeFound = true;
                  	}
                  }
                  

                  }
                  I found this on a forum, and have a basic understanding of it, but could use some help on understanding what to do

                  F 1 Reply Last reply Reply Quote 0
                  • F
                    FaulknerTrading1 @FaulknerTrading1 last edited by FaulknerTrading1

                    this is a link to what i have done so far https://fxdreema.com/shared/MIuAzaWee

                    roar 1 Reply Last reply Reply Quote 0
                    • roar
                      roar @FaulknerTrading1 last edited by roar

                      @faulknertrading1 I had made a system exactly like this, but our hacker friend has destroyed it. Bummer.

                      The tricky part is always checking whether the currency is long or short. EURUSD buy trade has USD short component, USDJPY buy trade has USD long component.

                      What I did is, create some string arrays: one array for short currencies, one array for long currencies, and also arrays for trade counts.

                      Need small help? Tag me in your post
                      Need big help? https://www.fiverr.com/big_algo/automate-your-winning-strategy-in-mql4-or-mql5

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

                        @roar said in Need Help With Currency Exposure Control:

                        @faulknertrading1 I had made a system exactly like this, but our hacker friend has destroyed it. Bummer.

                        The tricky part is always checking whether the currency is long or short. EURUSD buy trade has USD short component, USDJPY buy trade has USD long component.

                        What I did is, create some string arrays: one array for short currencies, one array for long currencies, and also arrays for trade counts.

                        I just got all my projects back, at least it seems.

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

                          @tipsywisdom I have all shared projects, and own projects before July 2022

                          Need small help? Tag me in your post
                          Need big help? https://www.fiverr.com/big_algo/automate-your-winning-strategy-in-mql4-or-mql5

                          1 Reply Last reply Reply Quote 1
                          • F
                            FaulknerTrading1 last edited by

                            @roar @TipsyWisdom thank you for the responses and happy new year.

                            "What I did is, create some string arrays: one array for short currencies, one array for long currencies, and also arrays for trade counts." - This seems like the type of logic I'm looking for in my EA, and it and that hacker really messed things up for a lot of people, hopefully you are able to replicate/ recover your work. You probably know already, but the import function on fxD might help you?

                            I will the array angle my best shot when I get home from work. Any advice with creating arrays on fxDreema? I'm sure I can crack it with the forums but any help is appreciated.

                            roar 1 Reply Last reply Reply Quote 0
                            • roar
                              roar @FaulknerTrading1 last edited by

                              @faulknertrading1 arrays can be created like this:

                              0_1672579887921_c33bbf5e-4af8-494e-aaaf-6af2f54960ae-image.png

                              Then you can use all the basic array functions: https://www.mql5.com/en/docs/array

                              Need small help? Tag me in your post
                              Need big help? https://www.fiverr.com/big_algo/automate-your-winning-strategy-in-mql4-or-mql5

                              P 1 Reply Last reply Reply Quote 3
                              • F
                                FaulknerTrading1 last edited by

                                Hey again experts, I would like to share my progress so far and thank you for all the input so far. https://fxdreema.com/shared/9JGPwe8kd

                                I still could use some help with the following:

                                Isolating the Conflicting Trade Symbol somehow
                                loop the symbol of open trades and split them into their respective arrays.

                                1 Reply Last reply Reply Quote 0
                                • P
                                  purelife173 @roar last edited by

                                  @roar "invalid array access"

                                  lets say i load my ea on a symbol and it opens a trade then i change charts and it opens another trade on a symbol

                                  how would i add each symbol to an array on trade?

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

                                    @purelife173 What do you exactly mean by 'changing chart'? Are you removing the bot from chart 1 to activate it then on chart 2?

                                    (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.

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

                                      @l-andorrà no same chart window just changing the current symbol on the page

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

                                        Then I'm afraid that goes beyond my capabilities, sorry. Maybe jstap can be more helpful here.

                                        (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

                                        S
                                        B
                                        M
                                        E
                                        R
                                        K
                                        E
                                        F
                                        N
                                        S

                                        20
                                        Online

                                        146.7k
                                        Users

                                        22.4k
                                        Topics

                                        122.6k
                                        Posts

                                        Powered by NodeBB Forums | Contributors