All indicators

Sector Correlation Matrix

By LuxAlgoFeb 19, 2026

Sector Correlation Matrix is an indicator on Vela, our next-generation charting platform, written in Pine Script®.

Static chart image

Sector Correlation Matrix measures how tightly your charted symbol tracks a benchmark you choose. It computes a rolling Pearson correlation between the two closing-price series and sorts each reading into five plain-language states, so instead of eyeballing two charts side by side you watch one oscillator answer the question: is this asset moving with the market, against it, or on its own?

How to Trade the Sector Correlation Matrix?

  • Strong Positive (above 0.7): tight synchronization - a breakout here is more plausibly part of a broader market move than an isolated event.
  • Moderate zones (above 0.3 or below -0.3): a general tendency to move together or apart, without lockstep.
  • Decoupled (-0.3 to 0.3): no significant linear relationship. An asset holding firm while its benchmark slides is printing relative strength worth investigating.
  • Strong Negative (below -0.7): strongly inverse movement - the zone hedgers and defensive positioners care about.

State changes carry information of their own: a symbol drifting from Strong Positive toward Decoupled may be starting an independent trend, and a portfolio whose holdings all read Strong Positive against the same benchmark is closer to one position than several.

Sector Correlation Matrix Settings

  • Benchmark Asset: the ticker to compare against - an index proxy, crypto pair, forex pair, or commodity.
  • Correlation Length: the rolling lookback; shorter lengths react faster, longer lengths smooth noise.
  • Show Dashboard / Position / Size: the on-chart panel with the live correlation value and state, its placement, and its text size.

Frequently Asked Questions

Free to use

Run it on Vela. Go further with a paid plan.

  • Up to 500 strategy alerts, with webhook automation
  • Up to 10× the chart history of Free
  • Orderflow lookback up to full history
  • More Quant usage to customize it, plus extra usage when you need it
  • Futures data alongside crypto, stocks, forex and commodities
See plans

Also works on

TradingView
Original indicatorBuilt in-house by LuxAlgo

Run it on Vela. Make it yours with Quant.

Open this indicator free on Vela, our next-generation charting platform. Then ask Quant, our coding agent built into Vela, to retune it or turn it into a backtested strategy of your own.