Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to Use the Slope

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

    #16
    Hello,

    This isnt the slop of the price. This is the slope of the SMA() which is what I thought you wanted in the first post. If you want just the slope of price.

    Plot0.Set(Slope(Close, 10, 0));
    BrettNinjaTrader Product Management

    Comment


      #17
      I understand. I thought I could designate it in the parameters as the Input Series - in my picture it's AONE (Daily) - Sorry for the confusion. I'll go back to the drawing board.

      Comment


        #18
        Hello,

        No problem. Slope is something that is someone more difficult to work with. Expecially if your using the strategy wizard as it really takes custom programming to forumalte it into somehing usefull in most cases.

        I normalling just end up working with Rising() or Falling() in the Strategy Wizard I find these easier to work with in the strategy wizard and still get some of the same functionality.

        Let me know if I can be of further assistance.
        BrettNinjaTrader Product Management

        Comment


          #19
          viola! Making progress - the calculation on the SMA works as expected so I now "know" what Im dealing with.

          Once I get this straight I should be able to close this topic: How do I change this indicator - I know I have to replace the SMA with what I want as far as syntax goes...but do I do that in an editor from the .zip file and re-import it? What if I wanted to change the name of it?

          Finally, I assume I change both lines that contain the SMA:

          {
          // Use this method for calculating your indicator values. Assign a value to each
          // plot below by replacing 'Close[0]' with your own formula.
          Print(Slope(SMA(20), 10, 0));
          double prev = Swing(MACD(12, 26, 9), 5).SwingHigh[0];
          Plot0.Set(Slope(SMA(20), 10, 0));
          }

          Comment


            #20
            Hello,

            You would only need to change this line.

            Plot0.Set(Slope(SMA(20), 10, 0));

            Change this too:

            Plot0.Set(Slope(EMA(14), 10, 0));

            If you want the slope of a 14 period EMA for example.

            In fact these two lines:

            Print(Slope(SMA(20), 10, 0));
            double prev = Swing(MACD(12, 26, 9), 5).SwingHigh[0];

            Can be deleted as they serve no function they where just left overs from another test. I had going.
            BrettNinjaTrader Product Management

            Comment


              #21
              Slope strategy development

              I'm looking for a strategy (complete) that is a basic slope entry with adjustable stops, targets, etc., I want to be able to enter at every slope change in a moving average. Any completed packages anyone knows of in this regard? Thanks a bunch! SS

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by argusthome, 03-08-2026, 10:06 AM
              0 responses
              69 views
              0 likes
              Last Post argusthome  
              Started by NabilKhattabi, 03-06-2026, 11:18 AM
              0 responses
              42 views
              0 likes
              Last Post NabilKhattabi  
              Started by Deep42, 03-06-2026, 12:28 AM
              0 responses
              24 views
              0 likes
              Last Post Deep42
              by Deep42
               
              Started by TheRealMorford, 03-05-2026, 06:15 PM
              0 responses
              27 views
              0 likes
              Last Post TheRealMorford  
              Started by Mindset, 02-28-2026, 06:16 AM
              0 responses
              54 views
              0 likes
              Last Post Mindset
              by Mindset
               
              Working...
              X