Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

StdError, calculate Linear Regression, divisor starts at 0, slope becomes NaN. bug

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

    StdError, calculate Linear Regression, divisor starts at 0, slope becomes NaN. bug

    I think I discovered a bug in the calculation of linear regression in the built-in indicator StdError

    On the reading of the first bar of the data series, the variable named "divisor" will be set to 0, and the calculation of the variable named "slope" will result in a NaN value. The values of intercept and linReg rely on slope, therefore their values are also NaN.

    This only seems to occur on the first bar, but I was using the calculated value of linReg to set the value of my custom series, and then passing that custom series to the SMA method, and that is how I discovered the Nan bug.

    Consider testing the value of divisor inside the IsFirstTickOfBar conditional.

    psuedocode

    Code:
    if (divisor != 0 )
    {	Print("divisor is not 0"); 	}
    else
    {      Print("divisor IS 0, so we set it to 1 ");
    	divisor = 1;
    }

    #2
    Hello balltrader,

    Thank you for reporting this behavior.

    I am currently looking into the issue.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Hello balltrader,

      I've received a tracking ID for this item.

      The NaN value produced on the first bar of the StdError indicator is being tracked with ID #NTEIGHT-12755.

      As new releases of NinjaTrader become available, please check the release notes for this ID. Below is a public link.
      Chelsea B.NinjaTrader Customer Service

      Comment


        #4
        this has been reported as fixed in version 8.0.14.0 on date May 24, 2018. thank you.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by terofs, Yesterday, 04:18 PM
        1 response
        21 views
        0 likes
        Last Post terofs
        by terofs
         
        Started by CommonWhale, Today, 09:55 AM
        1 response
        3 views
        0 likes
        Last Post NinjaTrader_Erick  
        Started by Gerik, Today, 09:40 AM
        2 responses
        7 views
        0 likes
        Last Post Gerik
        by Gerik
         
        Started by RookieTrader, Today, 09:37 AM
        2 responses
        13 views
        0 likes
        Last Post RookieTrader  
        Started by alifarahani, Today, 09:40 AM
        1 response
        7 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Working...
        X