Periodic Linear Regressions
Sep 25, 2024

The Periodic Linear Regressions (PLR) indicator offers traders an insightful way to analyze market trends by calculating linear regressions based on customizable time intervals, similar to the VWAP indicator. This feature allows traders to uncover potential supports and resistances in the market by aligning the regressions with underlying price trends.
How to Trade the Periodic Linear Regressions Indicator?
The PLR indicator operates by calculating a linear regression within a user-defined "Anchor Period." This adjustable interval is crucial for tailoring the analysis to different trading strategies, whether short-term or long-term. The indicator can display the regression line either as a static line, which readjusts for new data points until the period ends, or as a rolling average, where new values are derived from the latest point on a regression line fitted over the interval. The static method may repaint but is valuable for highlighting the linearity of trends and for suggesting future price directions.
An innovative feature of the PLR indicator is its extremities, defined by the root mean squared error (RMSE) between the price and the regression line. The Multiple setting allows traders to adjust the distance between these extremities, which can be critical for identifying support and resistance levels in price channels.
The PLR provides significant value in identifying trading opportunities within price ranges or channels, making it a versatile tool for various market conditions.
For ease of tracking, the PLR indicator marks where a new analysis period begins (the anchor), often visible in the top right of the chart.
The indicator also includes a display for extremities, accessible by enabling the Show Extremities option in settings, applicable to both the Rolling and Static methods.
Additionally, users can opt for a gradient background color in the bands, though this is exclusive to the Rolling method. The color changes within the bands also serve as trend indicators: green hues suggest upward trends while red hints at downward momentum.
Technical Details of the Periodic Linear Regressions Indicator
Anchor Type Explained
The Anchor Type setting is pivotal in determining how the PLR indicator resets and recalculates. When set to Periodic, the indicator resets with each new Anchor Period. If set to anchor at First Bar, the rolling line continues its calculation across the entire session, aiding in detecting long-term potential highs and lows.
Traders should note that a minimum of two values is required for linear regression, which explains why static lines don't appear from the first bar of a session. The rolling regression starts displaying on the third bar due to its requirement for a preceding value.
Rolling vs. Static Methods
When using a Periodic Anchor Type, the indicator calculates linear regressions from the session's starting point to the current bar, seeking the best fit line.
In the rolling method, the script connects the most recent calculated point to the previous one, while in the static method, it displays the most recent line.
Remember that two values are essential for calculating linear regression, influencing how and when lines appear within a session.
Customizing PLR Indicator Settings
- Method: Choose between "Static" (straight line) or "Rolling" (rolling linear regression).
- Anchor Type: Select "Periodic" or "First Bar" ("First Bar" works exclusively with "Rolling" method).
- Anchor Period: Applicable when "Anchor Type" is set to Periodic.
- Source: Options include open, high, low, close, and more.
- Multiple: Adjusts the width of the bands when extremities are shown.
- Show Extremities: Toggles the display of upper and lower extremities.
Color and Display Options
- Mono Color: Used when "Bicolor" is off.
- Bicolor: On/Off toggle and color selection.
- Gradient: Applies a background color to extremities.
Dashboard Customization
- Show Dashboard
- Location: Choose where the dashboard appears.
- Text Size: Adjust to preference.
FAQ About Periodic Linear Regressions Indicator
How can I access the Periodic Linear Regressions Indicator?
You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.
What is the purpose of the extremities in the PLR indicator?
The extremities based on RMSE help identify support and resistance zones, key for range-bound trading.
Why doesn’t the static line show from the session start?
Linear regression calculations require at least two points, which is why the static line doesn't appear at the session's start.
Trading is risky and many will lose money in connection with trading activities. All content on this site is not intended to, and should not be, construed as financial advice. Decisions to buy, sell, hold or trade in securities, commodities and other markets involve risk and are best made based on the advice of qualified financial professionals. Past performance does not guarantee future results.
Hypothetical or Simulated performance results have certain limitations. Unlike an actual performance record, simulated results do not represent actual trading. Also, since the trades have not been executed, the results may have under-or-over compensated for the impact, if any, of certain market factors, including, but not limited to, lack of liquidity. Simulated trading programs in general are designed with the benefit of hindsight, and are based on historical information. No representation is being made that any account will or is likely to achieve profit or losses similar to those shown.
Testimonials appearing on this website may not be representative of other clients or customers and is not a guarantee of future performance or success.
As a provider of technical analysis tools for charting platforms, we do not have access to the personal trading accounts or brokerage statements of our customers. As a result, we have no reason to believe our customers perform better or worse than traders as a whole based on any content or tool we provide.
Charts used on this site are by TradingView in which the majority of our tools are built on. TradingView® is a registered trademark of TradingView, Inc. www.TradingView.com. TradingView® has no affiliation with the owner, developer, or provider of the Services described herein.
This does not represent our full Disclaimer. Please read our full disclaimer.
© 2025 LuxAlgo Global, LLC.