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

Can you help me understand Slope()?

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

    Can you help me understand Slope()?

    Can someone help me understand whether I'm doing this right?


    Slope(RegressionChannel(35, 2).Middle, 1, 0);

    Will this simply give me the angle (in radians) of the regression channel that is 35 periods long? That is what I thought would happen, but I must be mistaken because it is giving me an output that seems off. I'm a little confused on what I should use for start and end bars when I'm inputting in a 35 period Reg Channel. I've tried a few variations and nothing has delivered what I expect.

    What I'm attempting to end up with... The equivalent as if I used the Regression Channel indicator (with 35 period) on a chart, and get a value of the angle of those channel lines.

    Thanks.
    Last edited by lookOutBelow; 08-01-2010, 01:53 AM.

    #2
    lookOutBelow, Slope() would return just the rise over run result not the angle in radians or degrees, this would need further conversion.
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Okay thanks. In that case, can you explain what "rise over run" means? Is it simply telling me the regression channel is rising over the length of time I specify? If so, then what are the numbers it is spitting out?

      Just wondering how I can use it and possibly convert it to an angle.

      Thanks

      Comment


        #4
        Rise/run

        It just means how much y-axis displacement was there in the Regression Channel (a.k.a. rise) over how many bars it took to rise that much (run).

        On a 1 minute chart, if you ran the slope calculation for a period of 5, that would mean 5 minutes for the run or a value of 5. Then whatever the value of the indicator 5 bars ago versus the value of the indicator on the current bar would be the rise and then that difference results in the required values for the slope calculation.
        Josh P.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Waxavi, Today, 02:10 AM
        0 responses
        3 views
        0 likes
        Last Post Waxavi
        by Waxavi
         
        Started by TradeForge, Today, 02:09 AM
        0 responses
        9 views
        0 likes
        Last Post TradeForge  
        Started by Waxavi, Today, 02:00 AM
        0 responses
        2 views
        0 likes
        Last Post Waxavi
        by Waxavi
         
        Started by elirion, Today, 01:36 AM
        0 responses
        4 views
        0 likes
        Last Post elirion
        by elirion
         
        Started by gentlebenthebear, Today, 01:30 AM
        0 responses
        4 views
        0 likes
        Last Post gentlebenthebear  
        Working...
        X