Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Didi Index - Help

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Didi Index - Help

    My Friends,

    I was looking to find this indicator to the NinjaTrader Platform, but I not found. So I would like to know if someone you guys could do this for me, the formula is very, very simple:

    It is 3 Simple moving averages, applied to close price.

    "The first SMA is 3 period, the Second is 8 periods, and the last (The Horizontal Line) is the SMA 20 period."

    *Like the image atached.

    This indicator is called "Didi Index", it was created by Odir Aguiar, a Brazilian Trader.

    Could someone you make this script to NinjaTrader platform please?

    Thank you boys !
    Attached Files

    #2
    As far as I have found out the midline which is displayed as zeroline is not the SMA(20) but the SMA(8).

    To build the indicator you can take two Awesome Oscillators and display both plots as a line. You need to set one to (3,8,X) and the other one to (20,8,X). Below is a chart that I have built with anaMACDUniversal. The green line is the fast Awesome Oscillator (3,8). The yellow line is the inverted slow Awesome Oscillator (8,20).
    Attached Files

    Comment


      #3
      Harry

      Originally posted by Harry View Post
      As far as I have found out the midline which is displayed as zeroline is not the SMA(20) but the SMA(8).

      To build the indicator you can take two Awesome Oscillators and display both plots as a line. You need to set one to (3,8,X) and the other one to (20,8,X). Below is a chart that I have built with anaMACDUniversal. The green line is the fast Awesome Oscillator (3,8). The yellow line is the inverted slow Awesome Oscillator (8,20).



      Harry, I don't know how to do this, i have no idea. I'm attaching the Didi Index in MQL5 language here, may be could you read the code and get some Idea?
      Attached Files

      Comment


        #4
        Originally posted by fabio77punkrock View Post
        Harry, I don't know how to do this, i have no idea. I'm attaching the Didi Index in MQL5 language here, may be could you read the code and get some Idea?
        The code is simple. A standard MACD is the difference between two exponential moving averages. The Didi index uses the ratio of two simple moving averages. The ratio approach is not so good, as it may create a division of zero problem, which would not occur with the original approach. Therefore the best solution is to create the index by calculating MACDs from simple moving averages. Take two of them - one of them inverted - and the (modified) Didi index is ready.

        I am not really excited to do it. How would you use that indicator for your trading?
        Last edited by Harry; 11-15-2015, 04:56 AM.

        Comment


          #5
          Originally posted by fabio77punkrock View Post
          My Friends,

          I was looking to find this indicator to the NinjaTrader Platform, but I not found. So I would like to know if someone you guys could do this for me, the formula is very, very simple:

          It is 3 Simple moving averages, applied to close price.

          "The first SMA is 3 period, the Second is 8 periods, and the last (The Horizontal Line) is the SMA 20 period."

          *Like the image atached.

          This indicator is called "Didi Index", it was created by Odir Aguiar, a Brazilian Trader.

          Could someone you make this script to NinjaTrader platform please?

          Thank you boys !
          What is the actual formula? I have seen it quoted using differences and I have seen it quoted using ratios.

          Comment


            #6
            Originally posted by koganam View Post
            What is the actual formula? I have seen it quoted using differences and I have seen it quoted using ratios.
            The MetaTrader versions that I have seen use ratios. But I would clearly prefer differences. The needle signals would be about the same, as the crosses would be identical for a ratio-based and a differential indicator.

            Comment


              #7
              Originally posted by Harry View Post
              The MetaTrader versions that I have seen use ratios. But I would clearly prefer differences. The needle signals would be about the same, as the crosses would be identical for a ratio-based and a differential indicator.
              I must be mathematically challenged after all these years, so I am going to need some enlightenment.

              I have looked at both formulae as as I can find on the net, and I do not see the point. Given the formulae that I have seen, when reduced mathematically, all that this is measuring is the spread between the MA(20) and the MA(3), as MA(8) is identical in the calculation of each plot. In the "difference" case, this spread is not even normalized to anything, whereas in the "ratio" case, the spread is normalized to MA(8).

              So what exactly is the point of the calculations at all? Why not just directly use the spread between MA(3) and MA(20)? Apparently detrending the spread by using the MA(8) as an axis adds nothing to the mix, IMNSHO.

              Am I just too mathematically stupid to undertsand?

              Comment


                #8
                Originally posted by koganam View Post
                I must be mathematically challenged after all these years, so I am going to need some enlightenment.

                I have looked at both formulae as as I can find on the net, and I do not see the point. Given the formulae that I have seen, when reduced mathematically, all that this is measuring is the spread between the MA(20) and the MA(3), as MA(8) is identical in the calculation of each plot. In the "difference" case, this spread is not even normalized to anything, whereas in the "ratio" case, the spread is normalized to MA(8).

                So what exactly is the point of the calculations at all? Why not just directly use the spread between MA(3) and MA(20)? Apparently detrending the spread by using the MA(8) as an axis adds nothing to the mix, IMNSHO.

                Am I just too mathematically stupid to undertsand?
                A few remarks:

                (1) Neither the differential version nor the ratio version is normalized. None of them would comply with the coherency test developed by William Eckhardt.
                (2) The SMA(8) adds the zeroline. So you are looking for a SMA cross which near to the two other crosses (needle). In fact you look for points where the 3 moving average crosses are close to each other.

                The chart below shows a few signals. I have added a non-standard situation where there is indicator divergence near the zeroline without a cross.

                If anyone wants the MACDUniversal to build the Didi index, please send me a private message. You would just need to add 2 of those MACDs to your chart, adjust the plot settings and select the parameter settings which are shown in the upper left corner of the chart. The outcome is an index based on the difference, not the ratio. The MetaTrader version uses the ratio approach.
                Attached Files

                Comment


                  #9
                  Originally posted by Harry View Post
                  A few remarks:

                  (1) Neither the differential version nor the ratio version is normalized. None of them would comply with the coherency test developed by William Eckhardt.
                  The ratio version may not pass the coherency test, but it is still normalized.

                  double spread = MA(3)/MA(8) - MA(20)/MA(8);
                  implies spread = (MA(3) - MA(20))/MA(8); which is a dimensionless quantity, measured as a multiple of MA(8).
                  (2) The SMA(8) adds the zeroline.
                  Yes, which is the same as what I said: "... using the MA(8) as an axis..."
                  So you are looking for a SMA cross which near to the two other crosses (needle). In fact you look for points where the 3 moving average crosses are close to each other.
                  Which, as your chart demonstrates, can be seen directly on the chart where the 3 MA's cross in proximity.

                  What other information does this indicator provide, which cannot be seen directly in the chart with the 3 MA's drawn on it?
                  Last edited by koganam; 11-16-2015, 08:23 AM. Reason: Corrected punctuation.

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by love2code2trade, Yesterday, 01:45 PM
                  4 responses
                  28 views
                  0 likes
                  Last Post love2code2trade  
                  Started by funk10101, Today, 09:43 PM
                  0 responses
                  7 views
                  0 likes
                  Last Post funk10101  
                  Started by pkefal, 04-11-2024, 07:39 AM
                  11 responses
                  37 views
                  0 likes
                  Last Post jeronymite  
                  Started by bill2023, Yesterday, 08:51 AM
                  8 responses
                  45 views
                  0 likes
                  Last Post bill2023  
                  Started by yertle, Today, 08:38 AM
                  6 responses
                  26 views
                  0 likes
                  Last Post ryjoga
                  by ryjoga
                   
                  Working...
                  X