Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

MA Slope and avoidance ranges

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

    MA Slope and avoidance ranges

    Hi,

    I have a couple of questions about creating Strategies through the Strategy Interface.


    Is it possible to add a condition that a SMA needs to be a certain slope ? I can currently have something like SMA1 2 bars ago > SMA1 0 bars ago, but I would like something like SMA 2 bars ago 5 tick higher in value > SMA1 0 bars ago ? I tried affset but it didn't seem to work.


    Also how I define an area where I want to stay out of traders, eg (+-5 of the price of 900 ?)

    Finally is there a way in the strategy interface to pull a value from another chart, such as the VIX index ? I would like to stay out of trade when the VIX reaches a certain level ?

    #2
    webart,

    When you open up the Condition Builder expand the Misc section. There should be one titled Slope in there. After selecting that then you want to change the Series parameter to your SMA indicator. On the right hand side then you want to select Misc -> Numeric value and then type in what you want for slope.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      In my experience, slope is VERY useful in strategy development. because its a very 'pure' and transparent way to measure market sentiment.

      I would suggest avoiding the NT slope function because the values it returns are not congruent with the way most people think of slope.

      Slope should be in degrees, not some weird decimal.

      Check the the file sharing section for MASlopePlot and MASlopeBoxMulti, two of my favorites for sure, and much easier to use in strategies.

      One concept I have found works well is using slope for exits. All markets tend to revert to the mean over time, so if the moving average slope is 80+, that cannot be sustained. A good way to pick tops is when the MA has been above ~80+ and then crosses below a certain value. Another useful technique is exiting when the slope of a shorter moving average crosses above/below a longer period.

      Comment


        #4
        Thanks Elliot and Josh. I did a search for MASlopeplot on the forum but couldn't see it, also went through everypage of the Indicators but couldn't see, but found something called "Krauseslope" which I hope will do the same.

        Comment


          #5
          Any ideas on the other 2 questions ?

          I can easily setup a condition to only trade under a value or only trade over a value, but can't setup a condition to stay below a value and above another one at the same time. Eg, I want to setup a no trade area 2 points wide of a difficult price area, like 800, 900 and 1000 on the ES right now.

          I'de also like to pull the value from the VIX index, so I can turn off a strategy when it goes over a certain value.

          Have a good weekend.

          Comment


            #6
            Here is MASlopeBox


            It looks like MASlopePlot hasn't been posted yet, I'll post it soon.

            Here is a very big thread on slope, you may find it helpful:

            Comment


              #7
              Thanks Ellliot, appreciate the help.

              I installed that indicator, however unfortunately the output it gives to the strategy is the SMA (or EMA,TMA etc etc) of the price'/period, but not the slope angle value. I can see the angle on the chart ok though. The only output option in strategies is Plot1.

              Regards.

              Comment


                #8
                Yes, I know. The SlopeBox indicator is only for charts not strategies. The SlopePlot indicator is the one for strategies.

                I couldn't post it right away as I had to edit the code to remove reference to the JurikJMA, which I assume most people don't have.

                Try this.
                Attached Files

                Comment


                  #9
                  Thanks again, its working well.

                  Comment


                    #10
                    Elliot Wave

                    MASlopePlot is an excellent indicator....great code

                    I am trying to call it from my strategy using:

                    MASlopePlot(ADXVMA,WDS,5)[2] < -50

                    and

                    MASlopePlot(ADXVMA,"WDS",5)[2] < -50

                    and WDS will not compile in either format

                    How should I access?

                    Thanks

                    Comment


                      #11
                      Originally posted by ATI user View Post
                      Elliot Wave

                      MASlopePlot is an excellent indicator....great code

                      I am trying to call it from my strategy using:

                      MASlopePlot(ADXVMA,WDS,5)[2] < -50

                      and

                      MASlopePlot(ADXVMA,"WDS",5)[2] < -50

                      and WDS will not compile in either format

                      How should I access?

                      Thanks
                      I think you should use that: SlopePlotType.WDS

                      Comment


                        #12
                        thanks ryker

                        the following compiles:

                        MASlopePlot(SlopePlotAverageType.ADXVMA,SlopePlotT ype.WDS,5)[2] < -50

                        Comment


                          #13
                          I was wondering why the MASlopeBox and MASlopePlot give different values for the same parameters at times? Also for MASlopePlot, is it not possible to use the WYS parameter as in MASlopeBox?
                          Attached Files

                          Comment


                            #14
                            Originally posted by tjendra View Post
                            I was wondering why the MASlopeBox and MASlopePlot give different values for the same parameters at times? Also for MASlopePlot, is it not possible to use the WYS parameter as in MASlopeBox?

                            wondering the same thing...

                            Comment

                            Latest Posts

                            Collapse

                            Topics Statistics Last Post
                            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                            0 responses
                            633 views
                            0 likes
                            Last Post Geovanny Suaza  
                            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                            0 responses
                            364 views
                            1 like
                            Last Post Geovanny Suaza  
                            Started by Mindset, 02-09-2026, 11:44 AM
                            0 responses
                            105 views
                            0 likes
                            Last Post Mindset
                            by Mindset
                             
                            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                            0 responses
                            567 views
                            1 like
                            Last Post Geovanny Suaza  
                            Started by RFrosty, 01-28-2026, 06:49 PM
                            0 responses
                            568 views
                            1 like
                            Last Post RFrosty
                            by RFrosty
                             
                            Working...
                            X