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

Simple SMA indicator (Didi Index)

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

    Simple SMA indicator (Didi Index)

    Hello guys,

    I am new on NinjaTrader and I don't know how to make an indicator but I need to programming a new one. It is very simple.

    The indicator is composed by 3 simple moving averages. The SMA are 3, 8 and 20 but all of them are divided by the SMA 8. So the SMA8 will be plotted as horizontal line and the others two SMA will be the SMA(3)/SMA(8) and SMA(20)/SMA(8), all 3 SMAs are plotted on the same panel. Could someone help me with this indicator.

    The SMA(3)/SMA(8) is blue, the SMA(20)/SMA(8) is red and the SMA(8)/SMA(8) will be an horizontal white line.

    I have this indicator on my Tradingview website and the code that works perfectly is:

    study("Didi Index")
    sma1=sma(close, 3)/sma(close,8)
    sma2=sma(close, 8)/sma(close,8)
    sma3=sma(close, 20)/sma(close,8)
    plot(sma1, style=line)
    plot(sma2, style=line)
    plot(sma3, style=line)

    The problem is that I don't have an idea of how can I do it on NinjaTrader 8.

    This is how it is appear:

    Click image for larger version

Name:	Didi_Index.png
Views:	1070
Size:	10.4 KB
ID:	1042938

    Someone can help me?
    Attached Files

    #2
    Hello AChammas,

    Below is a public link to a forum post with helpful information about getting started with NinjaScript.
    https://ninjatrader.com/support/foru...040#post786040

    I would recommend starting with the Strategy Builder and copying the logic and variables only over to a new generated indicator as demonstrated in the NinjaScript Editor 401 course.

    Below are public links to the help guide on AddPlot() and Values.
    https://ninjatrader.com/support/help...us/addplot.htm
    https://ninjatrader.com/support/help...-us/values.htm

    As well as Series<T> to give you a better idea of how series work.
    https://ninjatrader.com/support/help...s/iseriest.htm

    You can also contact a professional NinjaScript Consultant who would be eager to create or modify this script at your request or assist you with your script. The NinjaTrader Ecosystem has affiliate contacts who provide educational as well as consulting services. Please let me know if you would like our business development follow up with you with a list of affiliate consultants who would be happy to create this script or any others at your request.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Yes, I would like to know how much will cost to have someone build this indicator for me. I know that is a work for 10 min because it is very simple to someone that knows the language. So please give some information on how can I quote this indicator job?

      Thank you,

      Comment


        #4
        Hello AChammas,

        Thank you for your reply.

        You can search our extensive library of NinjaScript consultants through the link below. Simply enter a consultant name or search by using our filter categories. Once you have identified your consultants of choice, please visit each consultant's site for more information or contact them directly to learn more:You can locate the contact information for the consultants on their direct websites for any additional questions you may have. Since these consultants are third-party services for NinjaTrader, all pricing and support information will need to be obtained through the consultant.

        The NinjaTrader Ecosystem website is for educational and informational purposes only and should not be considered a solicitation to buy or sell a futures contract or make any other type of investment decision. The companies and services listed on this website are not to be considered a recommendation and it is the reader's responsibility to evaluate any product, service, or company. NinjaTrader Ecosystem, LLC is not responsible for the accuracy or content of any product, service or company linked to on this website.

        Let me know if I may be of further assistance.

        Comment


          #5
          Originally posted by AChammas View Post
          Hello guys,

          I am new on NinjaTrader and I don't know how to make an indicator but I need to programming a new one. It is very simple.

          The indicator is composed by 3 simple moving averages. The SMA are 3, 8 and 20 but all of them are divided by the SMA 8. So the SMA8 will be plotted as horizontal line and the others two SMA will be the SMA(3)/SMA(8) and SMA(20)/SMA(8), all 3 SMAs are plotted on the same panel. Could someone help me with this indicator.

          The SMA(3)/SMA(8) is blue, the SMA(20)/SMA(8) is red and the SMA(8)/SMA(8) will be an horizontal white line.

          I have this indicator on my Tradingview website and the code that works perfectly is:

          study("Didi Index")
          sma1=sma(close, 3)/sma(close,8)
          sma2=sma(close, 8)/sma(close,8)
          sma3=sma(close, 20)/sma(close,8)
          plot(sma1, style=line)
          plot(sma2, style=line)
          plot(sma3, style=line)

          The problem is that I don't have an idea of how can I do it on NinjaTrader 8.

          This is how it is appear:

          Click image for larger version

Name:	Didi_Index.png
Views:	1070
Size:	10.4 KB
ID:	1042938

          Someone can help me?
          Amigo, tudo bem?

          Vocę conseguiu o indicador Didi Index, seja gratuitamente ou pago? Estou procurando ele para NT8 e năo estou conseguindo.

          Se puder, me dę um retorno.

          Obrigado.

          Comment


            #6
            Welcome to the forums bhrunogomes!

            When positing on the forums we would ask that posts be made in English. You can use a publicly available translator like the one I have linked below to translate messages.

            Translate texts & full document files instantly. Accurate translations for individuals and Teams. Millions translate with DeepL every day.


            I have also posted your message in English for the original poster or for another community member to reply.

            Hey, buddy, what's up?

            Did you get the Didi Index, either free or paid? I'm looking for it for NT8 and I'm not getting it.

            If you can, give me a return.

            Thanks, man.
            We look forward to assisting.
            JimNinjaTrader Customer Service

            Comment


              #7
              Originally posted by NinjaTrader_Jim View Post
              Welcome to the forums bhrunogomes!

              When positing on the forums we would ask that posts be made in English. You can use a publicly available translator like the one I have linked below to translate messages.

              Translate texts & full document files instantly. Accurate translations for individuals and Teams. Millions translate with DeepL every day.


              I have also posted your message in English for the original poster or for another community member to reply.



              We look forward to assisting.

              Thank you so much for your help and correction.

              Comment


                #8
                Originally posted by AChammas View Post
                Yes, I would like to know how much will cost to have someone build this indicator for me. I know that is a work for 10 min because it is very simple to someone that knows the language. So please give some information on how can I quote this indicator job?

                Thank you,
                Hey @AChammas

                I do not think any programmer would code anything for less than $100 or at least 2-hr time rate. So, I am asking you to donate generously for this free indicator to the charity Children's Hospital Los Angeles here: https://www.chla.org/ or any charity of your choice serving children with cancer.

                Originally posted by bhrunogomes View Post

                Amigo, tudo bem?

                Se puder, me dę um retorno.

                Obrigado.
                I usually do not code or post forex newbee scripts, unless they have some solid purpose or proven trading methodology behind them. But, I was asked for it by bhrunogomes and coding this indicator beats fighting Covid-19 brain drain. So, here is Just another MA oscillator indicator not worth my time.

                Frankly, people would be much better off by simply using the MACD instead, the mother of all MA oscillators.

                Cheers!
                Attached Files
                Last edited by aligator; 04-24-2020, 05:21 PM.

                Comment


                  #9
                  Its good to see fellow traders helping the trading community when they can, and also donating to the less fortunate. Nice one Aligator! Which we had more guys like you mate

                  Comment


                    #10
                    Originally posted by aligator View Post

                    I usually do not code or post forex newbee scripts, unless they have some solid purpose or proven trading methodology behind them. But, I was asked for it by bhrunogomes and coding this indicator beats fighting Covid-19 brain drain. So, here is Just another MA oscillator indicator not worth my time.

                    Frankly, people would be much better off by simply using the MACD instead, the mother of all MA oscillators.

                    Cheers!
                    Noble Alligator.

                    First of all I want to thank you for taking the time to develop the indicator and I affirm that it was done with mastery. Congratulations and thank you very much.

                    Having said that, if you will allow me, I would like to explain a little about the purpose of the indicator so that perhaps you can change a little the bad concept you have of it.

                    As you could see, it is nothing more than a crossing of averages, where we have an entry when the lower average crosses the fixed horizontal line and the confirmation of this entry when the higher average crosses or remains in the opposite direction of the lower average.

                    Logically it is not absolute, I use it together with DMI (8-8) and TRIX (9 with average of 4). When the 3 indicators are speaking the same language, the GAIN is mostly accurate.

                    The request to transform these averages into an indicator is simply to avoid polluting the graph, and to give a cleaner and more accurate view of the averages 3 and 20 crossing the 8.

                    I invite you to make a backtest and I am at your disposal to clear up any doubts.

                    Once again, thank you very much.

                    God bless you.

                    *** Sorry for any mistakes, because I'm using a translator to write.

                    Comment


                      #11
                      Originally posted by bhrunogomes View Post

                      Noble Alligator.

                      First of all I want to thank you for taking the time to develop the indicator and I affirm that it was done with mastery. Congratulations and thank you very much.

                      Having said that, if you will allow me, I would like to explain a little about the purpose of the indicator so that perhaps you can change a little the bad concept you have of it.

                      As you could see, it is nothing more than a crossing of averages, where we have an entry when the lower average crosses the fixed horizontal line and the confirmation of this entry when the higher average crosses or remains in the opposite direction of the lower average.

                      Logically it is not absolute, I use it together with DMI (8-8) and TRIX (9 with average of 4). When the 3 indicators are speaking the same language, the GAIN is mostly accurate.

                      The request to transform these averages into an indicator is simply to avoid polluting the graph, and to give a cleaner and more accurate view of the averages 3 and 20 crossing the 8.

                      I invite you to make a backtest and I am at your disposal to clear up any doubts.

                      Once again, thank you very much.

                      God bless you.

                      *** Sorry for any mistakes, because I'm using a translator to write.
                      Thanks for kind words. No worry, English is my 4th language without a translator.

                      I don't have a "bad concept" about DiDiIndex, it is just another MA cross over. All price-based MA oscillators behave similar and depending on parameters and time frames produce the similar results. I have seen or created many of them for just about any trading platform out there in my 45 years of trading. They all look good in SIM accounts.

                      Here is a comparison of a few MA crossover indicators (DiDi, mahKDJ, LBR310, my own special sauce, MACD, etc.). You can see that any of them would give similar (or better) results compared to DIDI when parameters are optimized.

                      Also, note that you would get the exact same crossover results if you simply plot 3 SMA and 20 SMA on the chart instead of DIDIIndex. See the second screenshot.

                      I actually think my simple mahKDJ indicator (in NT Downloads) gives better indication of short term trend reversals on crosses, if you want to give it a try. Regardless, I have narrowed down oscillators into my own special sauce indicator, the only thing I use.

                      Cheers!

                      p.s.
                      DMI(8) or DMI(8,8)? There is only one period for DMI. Also, TRIX is only a visual indicator and can not be used in real trading. Could you please post a screenshot of your chart showing indicators, time frames, and instrument used
                      Attached Files
                      Last edited by aligator; 06-16-2020, 02:29 PM.

                      Comment


                        #12
                        Originally posted by aligator View Post

                        Thanks for kind words. No worry, English is my 4th language without a translator.

                        I don't have a "bad concept" about DiDiIndex, it is just another MA cross over. All price-based MA oscillators behave similar and depending on parameters and time frames produce the similar results. I have seen or created many of them for just about any trading platform out there in my 45 years of trading. They all look good in SIM accounts.

                        Here is a comparison of a few MA crossover indicators (DiDi, mahKDJ, LBR310, my own special sauce, MACD, etc.). You can see that any of them would give similar (or better) results compared to DIDI when parameters are optimized.

                        Also, note that you would get the exact same crossover results if you simply plot 3 SMA and 20 SMA on the chart instead of DIDIIndex. See the second screenshot.

                        I actually think my simple mahKDJ indicator (in NT Downloads) gives better indication of short term trend reversals on crosses, if you want to give it a try. Regardless, I have narrowed down oscillators into my own special sauce indicator, the only thing I use.

                        Cheers!

                        p.s.
                        DMI(8) or DMI(8,8)? There is only one period for DMI. Also, TRIX is only a visual indicator and can not be used in real trading. Could you please post a screenshot of your chart showing indicators, time frames, and instrument used

                        Dear Alligator.

                        Thank you for making your point.

                        I'll provide the prints and try to better explain the items you questioned me.

                        I looked for your indicator to compare with the Didi and couldn't find it in the "downloads" section. Am I doing the wrong research? Can you help me?

                        Attached Files

                        Comment


                          #13
                          Originally posted by bhrunogomes View Post


                          Dear Alligator.

                          Thank you for making your point.

                          I'll provide the prints and try to better explain the items you questioned me.

                          I looked for your indicator to compare with the Didi and couldn't find it in the "downloads" section. Am I doing the wrong research? Can you help me?
                          Hi,

                          You can see the comparison in the above screen shots. Just compare DiDi crossover to a simple crossover of 3 SMA and 20 SMA plots on the chart and there is no difference.
                          Attached Files

                          Comment

                          Latest Posts

                          Collapse

                          Topics Statistics Last Post
                          Started by jaybedreamin, Today, 05:56 PM
                          0 responses
                          3 views
                          0 likes
                          Last Post jaybedreamin  
                          Started by DJ888, 04-16-2024, 06:09 PM
                          6 responses
                          18 views
                          0 likes
                          Last Post DJ888
                          by DJ888
                           
                          Started by Jon17, Today, 04:33 PM
                          0 responses
                          1 view
                          0 likes
                          Last Post Jon17
                          by Jon17
                           
                          Started by Javierw.ok, Today, 04:12 PM
                          0 responses
                          6 views
                          0 likes
                          Last Post Javierw.ok  
                          Started by timmbbo, Today, 08:59 AM
                          2 responses
                          10 views
                          0 likes
                          Last Post bltdavid  
                          Working...
                          X