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

Stochastic Momentum Index

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

    #16
    Hello,

    PLease see post number 10 to download and them inside NinjaTrader goto Control Center->File->Utilities->Import NinjaScipt to import this indicator into NinjaTrader. Import the full .zip file no need to extract it.

    Let me know if I can be of further assistance.

    Comment


      #17
      I tried the download for SMI but it didn't load after following the instructions. Any other ideas. I'm on Ninja 7.0.1

      Comment


        #18
        liam33, welcome to our forums, which zip did you download? Do you see any error being reported as you try to install the file via File > Utilities > Import NinjaScript?
        BertrandNinjaTrader Customer Service

        Comment


          #19
          I downloaded the one from eDanny at 12:03-22-2010, 12:25 AM

          Just went back in to try again and get the message

          Says that I have custom NinjaSCript files on my PC that have programming errors. These errors must be rsolved before I can import a NS Archive File.

          This is what it said whenI tried to install this the first time. Can't remember exactly what it said but it went further in the process.

          This the first time I have tried to import a file......Just started using the product

          Comment


            #20
            Thanks for the reply, could you please email us at support at ninjatrader dot com so we could schedule a remote support session on our TeamViewer channel with you to resolve?

            Thanks,
            BertrandNinjaTrader Customer Service

            Comment


              #21
              hi bertrand,

              I'm unsuccesfully trying to add to the SMI code i downloaded on this forum a condition that will make
              the SMI value in market analyser turn green if SMI < 0 and SMI > SMI of one bar ago.

              Can you help me or direct me to someone who can help me.

              thank you.

              Comment


                #22
                bigdec, welcome to our forums - to create an alert for this study in the MA would need custom coding or for example a wizard strategy that would monitor for this condition.

                To get started down this direction, please either check into our coding tutorials here -



                For the wizard interface, please see this section :

                BertrandNinjaTrader Customer Service

                Comment


                  #23
                  This SMI - here, work in Ninja7?
                  thanks

                  Comment


                    #24
                    Hello jmagaia,

                    Thank you for your post.

                    I have tested the SMI in this thread and it does in fact work in NinjaTrader 7.

                    Please let me know if I may be of further assistance.

                    Comment


                      #25
                      Yes, I have some doubts, because in xml file say:
                      "<Version>6.5.1000.13</Version>"
                      But work.
                      Thanks

                      Comment


                        #26
                        That is correct, it was created and exported with this NT version. However if there are no code breaking changes in the SMI code > it could work well for NT7 as Patrick had tested for you.
                        BertrandNinjaTrader Customer Service

                        Comment


                          #27
                          Originally posted by magister View Post
                          now I have to go use tradestation...

                          why aren't there more indicators for this platform, it is a serious bummer.
                          Indicators don't work. They all lag. They tell you absolutely nothing that could be helpful. The closest I've seen to a good indicator is Ninjacator's realtime supply & demand indicator. Even that one has flaws, but it's the best of the bunch. I'm so sick of not making money. I wish there was an anti-BS indicator that tells us when to get in & never loses. Unfortunately, that could only exist on some other planet from aliens who are smarter than us. We are forced to go to our crappy jobs because someone thought it would be funny to make us have to work for $ instead of enjoying our lives. The End.

                          Comment


                            #28
                            Hello NinjaTrader_Bertrand, Hope you're doing good. I've downloaded the SMI indicator here.

                            The Stochastic Momentum Index is made up of two lines that oscillate between a vertical scale of -100 to 100. The indicator installs as &#8220;SMI&#8221; This is the NT8 conversion of the SMI indicator found in the NT7 D3Spotter.


                            It works great. I can't reply to Paul in the other post. If it's not too much to ask, I was wondering if it's possible to have an alternate color of the "SMIDiff" i.e green when positive and red when negative?

                            Thank you.

                            Comment


                              #29
                              Hello You4Life,

                              Thanks for your note.

                              You could use PlotBrushes to change the color of a plot based on a certain condition. For example, the code may look something like this to color a plot blue when the current close is less than the previous close or color the plot pink when the current close is greater than the previous close.

                              Code:
                              if (Close[0] < Close[1])
                              {
                                  PlotBrushes[0][0] = Brushes.DodgerBlue;
                              }
                              else if (Close[0] > Close[1])
                              {
                                  PlotBrushes[0][0] = Brushes.HotPink;
                              }
                              See this help guide documentation for more information and example code: https://ninjatrader.com/support/help...lotbrushes.htm

                              Also, see the attached example script which demonstrates this.

                              Let us know if we may assist further.
                              Attached Files
                              Brandon H.NinjaTrader Customer Service

                              Comment


                                #30
                                Thank you, Brandon.

                                I played with the code and it works. For those that would like to have a different color as well, just update the code for the following function, compile, re-add the indicator and it would work.
                                ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
                                protected override void OnBarUpdate()
                                {
                                if (( CurrentBar < emaperiod2) || ( CurrentBar < emaperiod1))
                                {
                                return;
                                }

                                //Stochastic Momentum = SM {distance of close - midpoint}
                                sms[0] = (Close[0] - 0.5 * ((MAX(High, range)[0] + MIN(Low, range)[0])));

                                //High low diffs
                                hls[0] = (MAX(High, range)[0] - MIN(Low, range)[0]);

                                //Stochastic Momentum Index = SMI
                                double denom = 0.5*EMA(EMA(hls,emaperiod1),emaperiod2)[0];
                                smis[0] = (100*(EMA(EMA(sms,emaperiod1),emaperiod2))[0] / (denom ==0 ? 1 : denom ));

                                //Set the current SMI line value
                                smi[0] = (smis[0]);

                                //Set the line value for the SMIEMA by taking the EMA of the SMI
                                SMIEMA[0] = (EMA(smis, smiemaperiod)[0]);

                                SMIDiff[0] = smi[0] - SMIEMA[0];

                                // this part here is to update the SIMDiff color - white when positive and red when negative.
                                if (SMIDiff[0] <= 0)
                                {
                                PlotBrushes[2][0] = Brushes.Crimson;
                                }
                                else if (SMIDiff[0] > 0)
                                {
                                PlotBrushes[2][0] = Brushes.White;
                                }

                                }
                                ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

                                Thanks again, Brandon. Have a great day.

                                Comment

                                Latest Posts

                                Collapse

                                Topics Statistics Last Post
                                Started by TraderBCL, Today, 04:38 AM
                                2 responses
                                13 views
                                0 likes
                                Last Post TraderBCL  
                                Started by martin70, 03-24-2023, 04:58 AM
                                14 responses
                                105 views
                                0 likes
                                Last Post martin70  
                                Started by Radano, 06-10-2021, 01:40 AM
                                19 responses
                                607 views
                                0 likes
                                Last Post Radano
                                by Radano
                                 
                                Started by KenneGaray, Today, 03:48 AM
                                0 responses
                                4 views
                                0 likes
                                Last Post KenneGaray  
                                Started by thanajo, 05-04-2021, 02:11 AM
                                4 responses
                                471 views
                                0 likes
                                Last Post tradingnasdaqprueba  
                                Working...
                                X