Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Slope

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

    Slope

    How do I use "slope" in the condition builder? Specifically a moving average that has an upward slope.

    #2
    Any value that is greater than 0 has a positive slope. You can select slope and compare it to a value on the right of the condition builder.
    RayNinjaTrader Customer Service

    Comment


      #3
      So, if I wanted the slope of a 20 ema for the last 5 bars to be sloping up:
      On the left side I would select "slope" with a series value of EMA(20), start bar(5), end bar(0)
      Right side, "numeric value" with a value of 1?
      Numeric value of 2 would be a higher angled slope than 1?

      Comment


        #4
        Correct although a value of > 0 would be positive, and 2 would be higher angle than 1.
        RayNinjaTrader Customer Service

        Comment


          #5
          I've got something wrong. I tried a quick strategy using those parameters as entry criteria on a 5 min chart for a month of data. Zero trades triggered.

          Comment


            #6
            No one uses slope?

            Comment


              #7
              You don't want to use >1. The slope returns the answer in decimals. I believe it is radians. Scale is -1 to 1. To test for positive you need to do >0 not >1 since it will never be >1.
              Josh P.NinjaTrader Customer Service

              Comment


                #8
                On the left side of condition builder:
                Slope selected:
                Series: EMA(close,20)
                Start bar: 10
                End bar: 0

                Right side of condition builder:
                Numeric value selected.
                Value: 0

                Is this correct?

                I setup a simple backtest to enter long with a trailing stop, 5 min bars. Tested on RIG starting 12-1-2007 to today. 0 trades executed.

                Comment


                  #9
                  Unfortunately it is not correct and after further review, working with Slope is not possible in the wizard.

                  The problem is that you are passing in "barsAgo" values where the Slope function is really looking for the true bar number. Unfortunately, you can not assign the true bar number in the wizard. I will change the implementation of slope to use bars ago logic. This will show up in our next beta version.
                  RayNinjaTrader Customer Service

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by usazencort, Today, 01:16 AM
                  0 responses
                  1 view
                  0 likes
                  Last Post usazencort  
                  Started by kaywai, 09-01-2023, 08:44 PM
                  5 responses
                  603 views
                  0 likes
                  Last Post NinjaTrader_Jason  
                  Started by xiinteractive, 04-09-2024, 08:08 AM
                  6 responses
                  23 views
                  0 likes
                  Last Post xiinteractive  
                  Started by Pattontje, Yesterday, 02:10 PM
                  2 responses
                  22 views
                  0 likes
                  Last Post Pattontje  
                  Started by flybuzz, 04-21-2024, 04:07 PM
                  17 responses
                  230 views
                  0 likes
                  Last Post TradingLoss  
                  Working...
                  X