This Pine Script indicator combines a customizable moving average (MA) with Pearson correlation analysis to provide traders with deeper insights into trends and key reference levels. It overlays a Pearson-adjusted moving average on price charts and highlights levels based on correlation for potential trading opportunities. With flexible parameters, it adapts to various trading styles.
Key Features Pearson-Adjusted Moving Average
Combines a basic MA (SMA, EMA, WMA, or VWMA) with a Pearson correlation adjustment to reflect trend strength.
Adjustable: MA length, price source, smoothing, and line thickness.
Optional color changes based on trends (positive/negative).
Pearson Correlation Levels
Plots smoothed Pearson correlation with upper/lower thresholds to signal strong or weak trends.
Marks entry levels with price labels and dynamic colors when thresholds are crossed.
Customizable: Pearson length, smoothing, thresholds, and colors.
Reference Levels and Alerts
Optional dotted lines for upper, lower, and zero correlation thresholds.
Alerts for bullish MA signals (crossing the lower threshold) and bearish signals (crossing below the upper threshold).
How It Works Moving Average: Calculates a standard moving average enhanced by a Pearson adjustment based on price trends over a given period.
Pearson Levels: Computes the strength of correlation, smoothed for better readability, and plots price lines at threshold crossings.
Visualization: Displays the MA and levels with trend-reactive colors and optional reference lines.
Usage Ideal for traders who combine traditional MAs with statistical trend analysis.
Adjust the MA type and Pearson length for short-term or long-term strategies.
Use correlation levels for reversal signals or trend confirmation.
Customization Options MA Parameters: Select the type, length, and smoothing of the MA; toggle visibility and color changes.
Pearson Levels: Adjust thresholds, line thickness, and label colors.
Display Options: Show/hide reference lines and the standard MA for comparison purposes.