OPEN-SOURCE SCRIPT

Pearson Correlation Best MA [victhoreb]

150
Pearson Correlation Best MA is an innovative indicator designed to dynamically select the moving average that best aligns with price action based on the Pearson correlation coefficient. Here’s what it does:

- Multiple MA Evaluation: The indicator computes eight different moving averages — SMA, EMA, DEMA, TEMA, LSMA, RMA, WMA, and VWMA — using a user-defined period.

- Correlation Analysis: For each moving average, it calculates the Pearson correlation with the price (using the average of high and low) over a specified correlation length, then identifies the one with the highest correlation.

- Optional Smoothing: Users can opt to further smooth the selected best moving average for an even more refined signal.

- Visual Cues: The indicator plots the “Best MA” on the chart, colors it based on its direction (bullish or bearish), and also displays the correlation value. Additionally, it can color the price candles to reflect the trend indicated by the best moving average.

- Customizability: All key parameters such as moving average length, correlation length, smoothing options, and color settings are fully customizable.

This tool helps traders by automatically adapting to market conditions—highlighting the moving average that is most in sync with current price trends, potentially improving trade timing and decision-making.

คำจำกัดสิทธิ์ความรับผิดชอบ

ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมที่ ข้อกำหนดการใช้งาน