Forums Trading Systems Discussion A Flexible And Compact Currency Strength Indicator

Tagged: 

Viewing 25 posts - 176 through 200 (of 272 total)
  • Author
    Posts
  • #8609
    gg53
    Participant

      USDx: In my indicator the USD is calculated the same as the other currencies, and it’s a bit different from the USDx.

      Hello G.! I checked it, my code looks correct to me. This is the formula you provided:

      Usdx=50.14348112 * MathPow(iClose(“EURUSD”,0,i),-0.576) * MathPow(iClose(“USDJPY”,0,i),0.136) * MathPow(iClose(“GBPUSD”,0,i),-0.119) * MathPow(iClose(“USDCAD”,0,i),0.091) * MathPow(iClose(“USDSEK”,0,i),0.042) * MathPow(iClose(“USDCHF”,0,i),0.036);

      When extracting EURx from this one, we simply multiply by iClose(“EURUSD”,0,i), when extracting CADx we would divide by iClose(“USDCAD”,0,i). At least, this is the arithmetics I’m using at the moment, and it looks ok. For USDx, there’s nothing to do: USDx = USDx, see function getCurrencyIndexValue(const int _tf, const int sh, const int currIndex) in my code. So looking at the pure math, for a USD centered index the pure index exactly represents the USD indicator value, and the same is true for the EUR centered index vs. EUR indicator value. Both have to be the same, otherwise there would be an issue to care for. Or maybe your indicator uses a different formula to extract YYYx value from USDx – I simply don’t know. Yet at the moment I can’t imagine why a different extraction of currency crosses should be used. s.

      I think that there is some misunderstanig.

      USDx is an index, containing a standard “basket” of other currencies. The formula is Ok.

      USD should be calculated against the USDx the same way as all other currencis.

      It simply not possible that USD is the same as USDx – since USD is “pure” USD, and USDx is a “basket” containing other currencies and their relevant “weights”.

       

      G.

      #8610
      simplex
      Moderator

        USDx is an index, containing a standard “basket” of other currencies. The formula is Ok.

        That’s correct.

        USD should be calculated against the USDx the same way as all other currencis. It simply not possible that USD is the same as USDx – since USD is “pure” USD, and USDx is a “basket” containing other currencies and their relevant “weights”.

        I don’t calculate ‘USD’, and I don’t calculate ‘EUR’ or ‘CAD’ either: it’s USDx, EURx, CADx, all of them based on the above mentioned basket.

        See pic for the simple math. Maybe yours is different.

        Attachments:
        You must be logged in to view attached files.

        A good trader is a realist who wants to grab a chunk from the body of a trend, leaving top- and bottom-fishing to people on an ego trip. (Dr. Alexander Elder)

        #8612
        gg53
        Participant

          “USD/x : where x is the ‘basket’ ”   –  How do you calculate USD ?

          Does USDx = USD/USDx  ?!?!?!

           

          G.

          #8613
          wjaz.fx
          Participant

            It simply not possible that USD is the same as USDx – since USD is “pure” USD, and USDx is a “basket” containing other currencies and their relevant “weights”.

            Agree… but …

            I don’t calculate ‘USD’, and I don’t calculate ‘EUR’ or ‘CAD’ either: it’s USDx, EURx, CADx, all of them based on the above mentioned basket.

            … maybe simplex is doing something else…. if I understood his code (and I’m not so sure…), something like an external reference, something like gg53 is trying to do in other thread.
            So, for absurd, instead of US dollar index basket you can use everything else, dow, sp500, apple… or another dollar index with different weights and currencies. For example the Dow Jones FXCM Dollar Index has 4 currencies, eur gbp aud jpy, 25% each.

            http://www.djindexes.com/mdsidx/downloads/meth_info/Dow_Jones_FXCM_Indices_Methodology.pdf

            But anyway USD must be calculated, cannot be equal to the USD index basket.  :unsure:

             

             

             

            #8614
            simplex
            Moderator

              instead of US dollar index basket you can use everything else, dow, sp500, apple… or another dollar index with different weights and currencies

              I agree: absolutely correct. That’s why I implemented the Euro Index, just as an example.

              simplex wrote: It simply not possible that USD is the same as USDx – since USD is “pure” USD, and USDx is a “basket” containing other currencies and their relevant “weights”


              @wjaz-fx
              : This is NOT correct – this quote should be G’s, not mine.

              Dow Jones FXCM Dollar Index has 4 currencies, eur gbp aud jpy, 25% each

              Thanks for pointing to this one, a good example for an evenly weighed index. Running this one alongside USDx and EURx, it becomes obvious that we can start to build our own tailor-made indexes for any specific purpose – and it’s so simple: rule of three and you’re done.


              @wjaz-fx
              : :good: just take it as a little coding exercise, implement Dow Jones FXCM Dollar Index in my CIX and post the mod. Ok? I could do it in 5 Minutes, but when you’re done with it, you can be sure you’ve understood how the indicator works – and how to implement any tailor-made index.

              s.

              A good trader is a realist who wants to grab a chunk from the body of a trend, leaving top- and bottom-fishing to people on an ego trip. (Dr. Alexander Elder)

              #8615
              simplex
              Moderator

                Does USDx = USD/USDx ?!?!?!

                No, certainly not: USD/USDx = USD/(USD/x) = x.

                I consider ‘x’ the artificial quote currency of the artificial pair USDx, i.e. the relative value of USD compared to the currency basket ‘x’.

                “USD/x : where x is the ‘basket’ ” – How do you calculate USD ?

                Well, like I wrote in an earlier post: I don’t calculate USD, I only calculate normalized USDx. So my understanding is: the green line in my indicator may be named ‘USD’, but we should be aware of the fact that it represents a normalized USDx, which is highly correlated to USD prices compared to real currencies.

                Maybe we’re talking about slightly different things. My algorithm is open, see earlier posts and source code. If you like me to compare it with your algorithm, I need a bit more detail.

                What is the value of this ‘USD’ you’re asking for anyway? Is it a pound of bread, or a coffee to go, or a certain share of a currency basket ‘x’? We need a denominator to get the value, and this is ‘x’, if we made a decision to work with this specific index basket. (Addendum: after a nice German beer on Saturday evening, I think the idea of a coffee-to-go-index could be interesting, yet hard to implement in mq4! :yahoo:   2nd addendum: the part of this post outside this pair of brackets is considered to be taken seriously!  B-) )

                Just my point of view. Maybe yours is different, I’d be interested to learn about it. I’m sure my indicator has some more potential to enhance it, it’s far from ‘perfect’.

                s.

                Attachments:
                You must be logged in to view attached files.

                A good trader is a realist who wants to grab a chunk from the body of a trend, leaving top- and bottom-fishing to people on an ego trip. (Dr. Alexander Elder)

                #8618
                gg53
                Participant

                  The term “USDx” in all my posts is short for “USD index“, not USD as base currency in currency-pair, or artificial currency-pair.

                  In any case I’d rather stick to conventional index (which is also used by Banks in some of their calculations) than “invent” my own index – which relates to nothing.

                  For me the USDx (or USD index) is a trading tool.

                  If your indicator is showing my meaning of USDx (i.e. the Dollar Index) than I miss the USD currency strength.

                   

                  G.

                  #8619
                  simplex
                  Moderator

                    The term “USDx” in all my posts is short for “USD index“

                    Obviously: Comparing your algorithm and mine, this is the part we seem to agree upon …

                    not USD as base currency in currency-pair, or artificial currency-pair.

                    … and this is the part we do not.

                    In any case I’d rather stick to conventional index

                    Sure, that’s fine! And I’ll take the freedom to switch between different indexes for different tasks. Both is ok. I’m not a bank, so maybe a different index is suitable for me, one that ‘relates’ to my trading goals.

                    And what about that Dow Jones FXCM Dollar Index @wjaz-fx mentioned: would you consider using it?

                    For me the USDx (or USD index) is a trading tool.

                    We also agree upon this detail.

                    If your indicator is showing my meaning of USDx (i.e. the Dollar Index) than I miss the USD currency strength.

                    You obviously noticed a difference between ‘your’ meaning of USDx and ‘mine’. I assume we’re having different interpretations of similar or identical math. You’ve got both source codes, yours and mine, I only have got mine. That’s ok for me, but it means that only you can compare the details, while I can’t.

                    I’m pretty confident about this simple core algorithm in my indicator right now, and I’m grateful to you because you pointed my thread in this direction. Yet without more specific detail about ‘your’ algorithm provided, this discussion about comparing both implementations will hardly lead anywhere except possible misunderstandings. Aside from that, I’ll be happy to discuss any possible detail or further enhancement of the indicator with you (and with everybody else).

                    Please don’t take this as some ‘hidden’ request to release your code: I’m confident I don’t need it.

                    If you’re having specific questions about my source feel free to post here or pm me – I’ll be happy to answer and assist you in comparing both versions. I would consider this a chargeback for your valuable input to this thread.

                    s.

                    A good trader is a realist who wants to grab a chunk from the body of a trend, leaving top- and bottom-fishing to people on an ego trip. (Dr. Alexander Elder)

                    #8620
                    simplex
                    Moderator

                      just take it as a little coding exercise, implement Dow Jones FXCM Dollar Index in my CIX and post the mod. Ok? I could do it in 5 Minutes, but when you’re done with it, you can be sure you’ve understood how the indicator works – and how to implement any tailor-made index.

                      Oh and one more remark about those ‘5 minutes’: meanwhile I’ve read that DOW paper, and have to say that implementing ‘every’ detail might take me considerably longer than 5 minutes.

                      But if you’re getting clear about which part of the index details you need and which parts don’t add any vital information to our little trading tool, then it can easily be realised within 5 minutes. This is due to one of my permanent coding goals: flexibility. Just refer to the thread title!

                      A good trader is a realist who wants to grab a chunk from the body of a trend, leaving top- and bottom-fishing to people on an ego trip. (Dr. Alexander Elder)

                      #8621
                      gg53
                      Participant

                        The term “USDx” in all my posts is short for “USD index“

                        Obviously: Comparing your algorithm and mine, this is the part we seem to agree upon …

                        not USD as base currency in currency-pair, or artificial currency-pair.

                        … and this is the part we do not.

                        In any case I’d rather stick to conventional index

                        Sure, that’s fine! And I’ll take the freedom to switch between different indexes for different tasks. Both is ok. I’m not a bank, so maybe a different index is suitable for me, one that ‘relates’ to my trading goals. And what about that Dow Jones FXCM Dollar Index @wjaz-fx mentioned: would you consider using it?

                        For me the USDx (or USD index) is a trading tool.

                        We also agree upon this detail.

                        If your indicator is showing my meaning of USDx (i.e. the Dollar Index) than I miss the USD currency strength.

                        You obviously noticed a difference between ‘your’ meaning of USDx and ‘mine’. I assume we’re having different interpretations of similar or identical math. You’ve got both source codes, yours and mine, I only have got mine. That’s ok for me, but it means that only you can compare the details, while I can’t. I’m pretty confident about this simple core algorithm in my indicator right now, and I’m grateful to you because you pointed my thread in this direction. Yet without more specific detail about ‘your’ algorithm provided, this discussion about comparing both implementations will hardly lead anywhere except possible misunderstandings. Aside from that, I’ll be happy to discuss any possible detail or further enhancement of the indicator with you (and with everybody else). Please don’t take this as some ‘hidden’ request to release your code: I’m confident I don’t need it. If you’re having specific questions about my source feel free to post here or pm me – I’ll be happy to answer and assist you in comparing both versions. I would consider this a chargeback for your valuable input to this thread. s.

                        1. USD & USDx – I already explained that I use the USDx as a common denominator. Each currency-pair movement is compared to that index. So in my case USD is not equal USDx.

                        2. USDx as trading tool – Many (or most) financial institutions are using the USDx (as per my first post on the subject) – and almost never trade against it. I do the same.

                        In all my years in big trading rooms, I never saw the FXCM “index”…But ofcourse everyone is free to trade whatever makes him succeed.

                        3. Didn’t have time to explore your source code, just watched the results on screen. Didn’t have time to D/L the second version.

                         

                        G.

                         

                        #8622
                        wjaz.fx
                        Participant

                          1. USD & USDx – I already explained that I use the USDx as a common denominator. Each currency-pair movement is compared to that index. So in my case USD is not equal USDx.

                          Agree and ..

                          2. USDx as trading tool – Many (or most) financial institutions are using the USDx (as per my first post on the subject) – and almost never trade against it. I do the same.

                          ..agree again.
                          The ICE USD index is the most popular and the benchmark for US dollar. The DJ FXCM index is another index like many, my intention was not to use it as a reference, but to point out that ICE USD index and DJFXCM USD index are arbitrary in their composition and do not represent the true strength of USD but an arbitrary weighted index, like the DJ30 .


                          @simplex
                          ,
                          as I said in the previous post if instead of using sAlgo= USDX in the code if we use sAlgo = SP500 the value of the USD as a single currency is not show, is missing the code to calculate it, the code that was in the Ass_Correlator (vUSD = ((- vEUR_USD - vGBP_USD - vAUD_USD + + vUSD_CHF vUSD_JPY - vNZD_USD vUSD_CAD +) / 7.0) * wtf;  derived from the prices of all major pairs.

                          Unfortunately I’m not a coder, I’m not able to intervene in the code except on very basic issues. I hope I was clear in exposing my doubts

                          #8623
                          simplex
                          Moderator

                            1. USD & USDx – I already explained that I use the USDx as a common denominator. Each currency-pair movement is compared to that index. So in my case USD is not equal USDx.

                            Ok, you’ve explained what ‘in your case’ USD is ‘not’. But what ‘is’ USD in your algorithm? If you would describe this, we maybe could proceed with this detail of our discussion.

                            s.

                            A good trader is a realist who wants to grab a chunk from the body of a trend, leaving top- and bottom-fishing to people on an ego trip. (Dr. Alexander Elder)

                            #8624
                            simplex
                            Moderator

                              Unfortunately I’m not a coder, I’m not able to intervene in the code except on very basic issues.

                              Ok, got that!

                              I hope I was clear in exposing my doubts

                              I’m afraid I didn’t get your point! Since coding is not one of your core skills, maybe try to explain it in your words / math / logic / whatever :good: .

                              And the current discussion between G. and me is not about ASS_Correlator anymore, that one is totally different, except it will show 8 lines, too! Better refer to CIX (Currency Index Crosses), my latest source in this thread.

                              the value of the USD as a single currency is not show

                              Ok again: ‘value of the USD’? What exactly do you mean by that? What is that value? Please describe this detail as precisely as you possibly can!

                              Please refer to the following post of mine for my point of view about this detail: http://penguintraders.com/forums/topic/a-flexible-and-compact-currency-strength-indicator/page/8/#post-8615

                              s.

                              A good trader is a realist who wants to grab a chunk from the body of a trend, leaving top- and bottom-fishing to people on an ego trip. (Dr. Alexander Elder)

                              #8625
                              gg53
                              Participant

                                simplex,

                                How would you calculate the “8 lines” if we had some constant value that every currency can relate to?

                                Something like GOLD with static, internationaly agreed, value.

                                I treat the USDx the same way, but in this case the USDx “have a life of it’s own”…

                                 

                                G.

                                #8626
                                simplex
                                Moderator

                                  How would you calculate the “8 lines” if we had some constant value that every currency can relate to? Something like GOLD with static, internationaly agreed, value.

                                  Do you mean replacing our currency basket by gold?

                                  Edit: I’m not sure if I got your question right, just let me try. How about the following:

                                  USDm = F * MathPow(iClose(“XAUUSD”,0,i), -SAU) * MathPow(iClose(“XAGUSD”,0,i), -SAG);

                                  This would be a most simple metal basket, where SAU := share of gold and SAG := share of silver.

                                  Or do you mean calculating a gold value based on our currency basket?

                                  s.

                                  A good trader is a realist who wants to grab a chunk from the body of a trend, leaving top- and bottom-fishing to people on an ego trip. (Dr. Alexander Elder)

                                  #8627
                                  wjaz.fx
                                  Participant

                                    I’m afraid I didn’t get your point! Since coding is not one of your core skills, maybe try to explain it in your words / math / logic / whatever

                                    I thought I already explained and I think the same thing is saying @gg53

                                    In a previous post I think that we agreed that we could put in the code any index or similar to evaluate the strength of currencies.
                                    Ok now imagine that USDx do not exist, if instead of putting USDX,  as algorithm, put Apple, or DJ30, or US T-note , or SP500 index or Crude oil, or Copper or everything else, how do you calculate USD currency given that other currencies (eur, gbp aud, nzd cad chf, jpy), everything you put in the sAlgo section (// preparation of currency index algorithm START)  are there anyway? 

                                    #8628
                                    simplex
                                    Moderator

                                      Apple, or DJ30, or US T-note , or SP500 index or Crude oil, or Copper or everything else

                                      Can you provide links to detailed descriptions of these indexes? Depending on details, I doubt that this can be done in MT4 due to lacking data. And what should these indexes be good for in FX trading?

                                      how do you calculate USD currency

                                      Sorry, I’ve got to repeat my previous question: ‘USD currency’ relative to what?

                                      Imagine you’re having a one dollar bill in your hand. In your economy, you might take a walk to town and change your dollar bill for a coffee to go, a pound of bread, or a certain share of an index. These goods represent the local value of your dollar bill.

                                      Now imagine you’re on the moon, holding the same dollar bill in your hand. Today, moon economy is not prepared to accept USD, you won’t get your coffee to go. What’s the local value of your dollar bill on the moon?

                                      One liter of fresh water has an absolute value for every human being: you can drink it. And if you don’t get your daily dose, you’ve got a problem. Yet, depending on local circumstances, the economic value of your water may change, while its biological value will remain ‘more or less’ constant. The absolute value of a one dollar bill is in most cases neglectable.

                                      A one dollar bill only has got that value which is commonly, and locally agreed upon. You could describe its value by asking how many liters of fresh water you can buy for your one dollar bill. So this would be kind of a ‘fresh water index’ of USD.

                                      What I want to say: you need a certain good, or commodity, or index value (our basket) to compare a currency to: this comparison will describe the value of your one dollar bill.

                                      Ok: in CIX I named my index lines USD, EUR, etc. for the sake of simplicity. But we should be aware of the fact that behind EUR is a formula that describes the value of 1 EUR compared to our index basket, etc. Maybe my variable naming shorthand is a bit misleading.

                                      s.

                                      A good trader is a realist who wants to grab a chunk from the body of a trend, leaving top- and bottom-fishing to people on an ego trip. (Dr. Alexander Elder)

                                      #8629
                                      gg53
                                      Participant

                                        simplex,

                                        I think that wjaz and me mean one thing and you are correct in your explanations, but refer to another.

                                        In your indicator all currencies are shown correctly (in theory, didn’t check source code) against the USDx basket – except one: the USD itself.

                                        USDx is a “basket” of different currencies with different weight for each one. Based on this – the “pure” USD currency cannot equals its index or “basket”.

                                        If you watch the charts and sum up the relative movement of the USD, you will notice that sometimes its moves are not in perfect correlation to its index.

                                        The indicator should show those relative movements.

                                         

                                        G.

                                         

                                        #8632
                                        simplex
                                        Moderator

                                          In your indicator all currencies are shown correctly (in theory, didn’t check source code) against the USDx basket – except one: the USD itself. USDx is a “basket” of different currencies with different weight for each one. Based on this – the “pure” USD currency cannot equals its index or “basket”. If you watch the charts and sum up the relative movement of the USD, you will notice that sometimes its moves are not in perfect correlation to its index. The indicator should show those relative movements.

                                          Ok! This can only mean that the very basic math of your ‘Spaghetti’ indicator is a little or more than just a little different than the simple formulas I described in http://penguintraders.com/forums/topic/a-flexible-and-compact-currency-strength-indicator/page/8/#post-8610. As I stated before: I can’t tell and I can’t check, because I simply don’t have any detailed knowledge about your indicator. I can only ‘guess’ that another variable is involved in your formula, maybe some delta(volume) or ROC(volume), or whatever.

                                          I repost my simple formula scan here for convenience. This is what my indicator shows, basically. Would you say that these simple formulas are correct?

                                          s.

                                          Attachments:
                                          You must be logged in to view attached files.

                                          A good trader is a realist who wants to grab a chunk from the body of a trend, leaving top- and bottom-fishing to people on an ego trip. (Dr. Alexander Elder)

                                          #8634
                                          gg53
                                          Participant

                                            In your indicator all currencies are shown correctly (in theory, didn’t check source code) against the USDx basket – except one: the USD itself. USDx is a “basket” of different currencies with different weight for each one. Based on this – the “pure” USD currency cannot equals its index or “basket”. If you watch the charts and sum up the relative movement of the USD, you will notice that sometimes its moves are not in perfect correlation to its index. The indicator should show those relative movements.

                                            Ok! This can only mean that the very basic math of your ‘Spaghetti’ indicator is a little or more than just a little different than the simple formulas I described in http://penguintraders.com/forums/topic/a-flexible-and-compact-currency-strength-indicator/page/8/#post-8610. As I stated before: I can’t tell and I can’t check, because I simply don’t have any detailed knowledge about your indicator. I can only ‘guess’ that another variable is involved in your formula, maybe some delta(volume) or ROC(volume), or whatever. I repost my simple formula scan here for convenience. This is what my indicator shows, basically. Would you say that these simple formulas are correct? s.

                                            Your first entry in your handwritten pic is:

                                            “USDx = USD/x” where “x” is the “basket”. Assuming we calculated the USDx according to the known formula.

                                            If the basket is USDx, then “USDx=USD/USDx” then USD = USDx*USDx. that’s look strange…

                                            If not, what is the USD in your formula?

                                            If USD is the unknown variable, what is the “x”?

                                             

                                            G.

                                            #8635
                                            simplex
                                            Moderator

                                              If the basket is USDx

                                              This is not what I wrote.

                                              USDx does not represent ‘the basket’, only ‘x’ does. USDx is the value of USD relative to the basket ‘x’.

                                              This is my current understanding for my CIX indicator, doesn’t necessarily match your ‘spaghetti’.

                                              A good trader is a realist who wants to grab a chunk from the body of a trend, leaving top- and bottom-fishing to people on an ego trip. (Dr. Alexander Elder)

                                              #8636
                                              gg53
                                              Participant

                                                If the basket is USDx

                                                This is not what I wrote. USDx does not represent ‘the basket’, only ‘x’ does. USDx is the value of USD relative to the basket ‘x’. This is my current understanding for my CIX indicator, doesn’t necessarily match your ‘spaghetti’.

                                                No, it doesn’t, but never mind…  The thread is not about comparison or competition.

                                                If you are happy with the results – all is Ok.

                                                 

                                                G.

                                                #8637
                                                simplex
                                                Moderator

                                                  If you are happy with the results – all is Ok.

                                                  We will see … this is just the beginning, and thorough tests are still to be done!

                                                  s.

                                                  A good trader is a realist who wants to grab a chunk from the body of a trend, leaving top- and bottom-fishing to people on an ego trip. (Dr. Alexander Elder)

                                                  #8640
                                                  Innate
                                                  Participant

                                                    Ok! .

                                                    Im lost by one thing in your handwritten calcs.

                                                    you have written:

                                                    Basis: USDx = USD/x

                                                    then at the bottom you have written:

                                                    Crosses: USDx = USDx

                                                    Something is not right here. In the top line you are dividing USD by x, whereas in the bottom line you are multiplying USD by x.

                                                    How can USDx equal the same value when in one equation you are multiplying and the other you are dividing?

                                                    (I have not read the code yet to understand this better).

                                                     

                                                    What's it all about? It's all about money.

                                                    #8641
                                                    simplex
                                                    Moderator

                                                      Basis: USDx = USD/x then at the bottom you have written: Crosses: USDx = USDx Something is not right here. In the top line you are dividing USD by x, whereas in the bottom line you are multiplying USD by x.

                                                      Please understand ‘USDx’ as a variable name, not as a formula. In that sense, ‘USDx’ is not equal to ‘USD * x’, it is ‘USD / x’ only.

                                                      s.

                                                      A good trader is a realist who wants to grab a chunk from the body of a trend, leaving top- and bottom-fishing to people on an ego trip. (Dr. Alexander Elder)

                                                    Viewing 25 posts - 176 through 200 (of 272 total)
                                                    • You must be logged in to reply to this topic.
                                                    Scroll to Top