Is there any intercept indicator?

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #263104 quote
    thomas2004ch
    Participant
    Average

    I’ve read this link and the following:

    Intercept = average[period](close) - Slope * average[period](barindex)
    


    But it seems it is not correct since the value of intercept is quite different than that from TradinView or other platforms.

    #263110 quote
    Nicolas
    Keymaster
    Legend

    Hello,

    There is no native “Intercept” instruction in Pine Script, TradingView only provides ta.linreg(source, length, offset), which returns the value of the regression line itself, not the intercept as a separate output. If you want the actual intercept, you have to calculate it manually with the least squares formulas, same as we do in ProBuilder.

    What people call LRI (Linear Regression Intercept) on TradingView is just a community script, not a built in function, and it uses the same math you already tried, here are 2 topics about how to calculate intercept in ProBuilder (mostly use to test breakout of trendlines or patterns such as triangles:

    Etendre DRAWRAY sur X barres

    lignes de support resistance oblique dans proorder

    Let us know if the numbers match once you try this.

    #263115 quote
    Nicolas
    Keymaster
    Legend

    BTW, I just translated this intercept code from a TV translation query I found out in the forum from years ago:

    Conversion of regression intercept indicator


Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.

Is there any intercept indicator?


ProBuilder: Indicators & Custom Tools

New Reply
Author
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by Nicolas
3 days, 21 hours ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 08/02/2026
Status: Active
Attachments: No files
Logo Logo
Loading...