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

EMA on Momentum. How to set up this indicator?

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

    EMA on Momentum. How to set up this indicator?

    Hi

    One indicator I have used and found to be a pretty good gauge of the direction of market trend is the EMA of momentum.

    What I would like to do in Ninja Trader is plot momentum together with it's exponential moving average on the same sub-chart. I am told this is possible in ninjatrader but I have no programming knowledge. Any guidance would be greatly appreciated.

    And if you can figure out how to turn (EMA of momentum - Momentum) into an oscillator, that would be fantastic!

    Thank you
    Simon

    #2
    Hi Simon, welcome to the NinjaTrader support forums! You could check this indicator here - http://www.ninjatrader-support2.com/...8&d=1234375966

    It was published some time ago on the forums.

    Then just plot this and the 'normal' momentum in the same panel ( this option can be set when you add the indicator to your chart under 'General' ).
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Hi Bertrand and thanks for the quick reply.

      There were 3 files in the package (@EMA.cs, @Momentum.cs & SmoothROC.cs). Can you please explain to me what I need to do with these files?!

      Cheers,
      Simon

      Comment


        #4
        Sorry Simon, please import those using those instructions -
        1. From the Control Center window select the menu File > Utilities > Import NinjaScript to open the Import NinjaScript dialog window
        2. Select the file you want to import
        3. Press the "Open" button
        Then you want to chart the SmoothROC indicator.
        BertrandNinjaTrader Customer Service

        Comment


          #5
          Unfortunately I am not able to select any of the *.cs files from within the File > Utilities > Import Ninja Script window. I know where these files are saved but cannot see them from within Ninja trader. Anything else I should be doing?

          Comment


            #6
            my mistake - I just found the zip file...cheers

            Comment


              #7
              In the import process just point to the zip file you saved to your desktop, NinjaTrader will import the .cs files then automatically.
              BertrandNinjaTrader Customer Service

              Comment


                #8
                Thanks for your help Bertrand. Sorry to keep on with the questions, but this gives me an EMA of ROC from what I can gather. I am also plotting momentum in panel 2 (same as smoothROC) but not the EMA of momentum. Can I get it to calulate and plot EMA on momentum rather than ROC?

                BTW - I must complement Ninja Trader support on your responsiveness...so far you have all been great!

                Comment


                  #9
                  You're welcome, we appreciate the kind words - If you open the code you'll see it's based on the normal momentum formula.
                  BertrandNinjaTrader Customer Service

                  Comment


                    #10
                    Sorry to be a pain, but what I see in the code (if I have done this right...a big IF!) is:

                    double smoothROC = Momentum(EMA(Input, PeriodsEMA), PeriodsROC)[0];

                    SmoROC.Set(smoothROC);

                    not sure how this relates to the normal momentum formula?

                    Comment


                      #11
                      Oh, I see what you mean now, this is a Momentum taking the EMA data as the input, where as you need an EMA of the Momentum values, would guess the values will be pretty close...but you can use this changed code for the double smoothROC line -
                      Code:
                      double smoothROC = EMA(Momentum(Input, PeriodsROC), PeriodsEMA)[0];
                      BertrandNinjaTrader Customer Service

                      Comment


                        #12
                        or should it be:

                        double smoothROC = EMA(Momentum(Input, PeriodsMomentum), PeriodsEMA)[0];

                        Comment


                          #13
                          It should not matter, in your case you would need to rename the user defined input you're using...please try this with the changed snippet I posted.
                          BertrandNinjaTrader Customer Service

                          Comment

                          Latest Posts

                          Collapse

                          Topics Statistics Last Post
                          Started by alifarahani, Today, 09:40 AM
                          6 responses
                          36 views
                          0 likes
                          Last Post alifarahani  
                          Started by Waxavi, Today, 02:10 AM
                          1 response
                          17 views
                          0 likes
                          Last Post NinjaTrader_LuisH  
                          Started by Kaledus, Today, 01:29 PM
                          5 responses
                          14 views
                          0 likes
                          Last Post NinjaTrader_Jesse  
                          Started by Waxavi, Today, 02:00 AM
                          1 response
                          12 views
                          0 likes
                          Last Post NinjaTrader_LuisH  
                          Started by gentlebenthebear, Today, 01:30 AM
                          3 responses
                          17 views
                          0 likes
                          Last Post NinjaTrader_Jesse  
                          Working...
                          X