Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Beta 10 slopes?

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

    Beta 10 slopes?

    Hello,

    I just installed 6.5 Beta 10 version (from an earlier 6.5 Beta version) and of course now all my indicators using slope are non-functional. I see in the release notes that slope has changed but I cannot determine in what way and/or what is needed to correct the problem...any suggestions? Thank you in advance.

    #2
    Why in the log am I seeing 'Startbar" cannot be less than "endbar" messages??

    The Startbar MUST be less than the Endbar...right? That is the bar we want to start the slope measurement FROM, thus of course it's going to be less than where we want to end..

    Comment


      #3
      No. It is startBarsAgo. The latest bar would be 0 bars ago. You need to start further back then you end.
      Josh P.NinjaTrader Customer Service

      Comment


        #4
        Yes, I agree...is this code (for example) no longer valid for some reason:

        int Period = 8;
        SLOPESTD.Set(Slope(StdDev(Close, 14).Value, CurrentBar - Period + 4, CurrentBar));

        ...I've been using code similar to this for months without issue...now they don't work at all? I haven't changed anything other than update to Beta 10.

        Comment


          #5
          No it is not.
          Slope(IDataSeries series, int startBarsAgo, int endBarsAgo)

          CurrentBar will bring you all the way to the beginning of the chart. Please take note of the Ago portion of the parameters. You are effectively saying start on the 4th to last bar and end on the last bar of the chart. Instead you need to say start on the last bar of the chart and end 4 bars after that.
          Josh P.NinjaTrader Customer Service

          Comment


            #6
            Thanks for the response. I'm looking at the manual here (for CurrentBar):

            "A number representing the current bar in a Bars object that the OnBarUpdate() method in an indicator or strategy is currently processing. For example, if a chart has 100 bars of data, the very first bar of the chart (left most bar) will be number 0 (zero) and each subsequent bar from left to right is incremented by 1."

            Why do you say that CurrentBar will take "all the way to the beginning of the chart" and that last CurrentBar parameter is stating to end "on the last bar of the chart"? According to the manual above CurrentBar remains what it has always been--the latest bar number.

            If I change that code to this:

            int Period = 8;
            SLOPESTD.Set(Slope(StdDev(Close, 14).Value, CurrentBar
            , CurrentBar - Period + 4));

            The code is no longer useful, it runs although the data is meaningless, it just outputs some downward sloping junk...


            I apologize for my confusion, but it's frustrating to suddenly have many indicators non-functional and useless just because I did an upgrade...

            Comment


              #7
              Yes CurrentBar is the latest bar number, but when you pass that number into a barsAgo parameter it effectively means go all the way to the beginning of the chart. The latest bar may be numbered bar 200. When you go 200 bars ago, you are now on the first bar of the chart.
              Josh P.NinjaTrader Customer Service

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by jeronymite, 04-12-2024, 04:26 PM
              3 responses
              44 views
              0 likes
              Last Post jeronymite  
              Started by Barry Milan, Yesterday, 10:35 PM
              7 responses
              20 views
              0 likes
              Last Post NinjaTrader_Manfred  
              Started by AttiM, 02-14-2024, 05:20 PM
              10 responses
              179 views
              0 likes
              Last Post jeronymite  
              Started by ghoul, Today, 06:02 PM
              0 responses
              9 views
              0 likes
              Last Post ghoul
              by ghoul
               
              Started by DanielSanMartin, Yesterday, 02:37 PM
              2 responses
              13 views
              0 likes
              Last Post DanielSanMartin  
              Working...
              X