Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Linreg and stdErr calcs wildly off..

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

    Linreg and stdErr calcs wildly off..

    I 'save as' the stdErr indi and added some plots to provide additional levels of upper and lower. But when I apply the indicator the lines are hundreds of ticks higher and lower. I've checked and even recopied the calc code from the original indi StdErr, but still getting crazy numbers. Here's print output -
    stdErr = 9032.23001084432 linReg = 28579.9280957913
    Current price is 20231 area.
    Seems like this would be pretty simple, but I've been chasing this for, well I'm embarrassed to say.
    Clues welcome and TIA.
    Attached Files

    #2
    Hello WayneSheppard,

    I applied the standard stdErr indicator and see that the plots it exposes are around the instruments price, did you make some changes to the calculation after doing the save as? The indicator should work identically after you do a save as so the result should look identical to the stock indicator. If you didnt check that first and started changing plots or values around that may alter the calculation the indicator is doing.

    Comment


      #3
      Hi Jesse,
      The calcs appear to be identical, I didn’t get to that step yet, just added plots. Then I check the plots, and even the linreg plot is off as you see from the print output.

      Comment


        #4
        Hello WayneSheppard,

        In the script you attached some of the math calculations have been changed from what they are in the original indicator, I don't know what impact that may have on its original calculations. I would suggest to revert back to the original code so it is exactly identical and then try adding your plots without changing the original calculation at all. You should see that the original plots don't change when doing that so only the new plots you add would have new values. I also see you changed the plot indexes around, for the purpose of retaining the original logic I would also suggest just adding the new plots after the original plots and using the higher indexes for the new plots. That lets you change less from the original code to try and avoid having the same problem happen.

        Comment


          #5
          Can you direct me to a line number of the different calc please?

          Comment


            #6
            Hello WayneSheppard,

            In the file you attached the multiplication being done in OnBarUpdate is changed to 0.68 from 0.5, I don't know what effect that would have. Again the best way to approach this would be to revert back to the original code as a starting point and confirm that is working before making any modifications. When you do make a change do 1 change at a time, compile and check the result on the chart.

            Comment


              #7
              Thanks much.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by Geovanny Suaza, 02-11-2026, 06:32 PM
              0 responses
              607 views
              0 likes
              Last Post Geovanny Suaza  
              Started by Geovanny Suaza, 02-11-2026, 05:51 PM
              0 responses
              353 views
              1 like
              Last Post Geovanny Suaza  
              Started by Mindset, 02-09-2026, 11:44 AM
              0 responses
              105 views
              0 likes
              Last Post Mindset
              by Mindset
               
              Started by Geovanny Suaza, 02-02-2026, 12:30 PM
              0 responses
              560 views
              1 like
              Last Post Geovanny Suaza  
              Started by RFrosty, 01-28-2026, 06:49 PM
              0 responses
              561 views
              1 like
              Last Post RFrosty
              by RFrosty
               
              Working...
              X