What is Correlation Coefficient?
The Correlation Coefficient measures how closely this market's closing price has tracked another market's over the last 20 bars. It reads +1 when the two move in lockstep, -1 when one mirrors the other, and near 0 when they are unrelated. By default the second market is ETH/USDT.
It correlates price levels, not bar-to-bar moves. Two markets that both trended up read close to +1 even if their daily moves had little in common. It does not say which market leads, or how large either move was.
How to use Correlation Coefficient
- Near +1. The two prices have been rising and falling together over the window.
- Near -1. When one has risen, the other has fallen.
- Near 0. Over this window the two prices show no straight-line relationship.
- Changes in the reading. A drop from a high reading to near zero means the two markets have started to go their own ways, which matters if you are treating them as a pair or a hedge.
Correlation describes the recent past. It does not guarantee the relationship will continue.
Settings
| Setting | Default | What it changes |
|---|---|---|
| Symbol | ETH/USDT | The market to compare against. It must trade on the same exchange as the chart. If it cannot be found, the line stays empty rather than showing a wrong value. |
| Length | 20 | Bars in the window. Shorter reacts quickly and swings widely; longer is steadier and slower to show a change in the relationship. Minimum 2. |
Change the comparison market and window in the indicator settings. Both markets are compared on their closing prices.
Calculation
Pearson's correlation coefficient between the two closing prices over the last Length bars:
a = this market's close, b = the other market's close
r = sum((a - mean a) * (b - mean b))
/ sqrt(sum((a - mean a)^2) * sum((b - mean b)^2))
The result is always between -1 and +1, and a dashed line marks zero. The calculation uses a full window, so the first value appears once 20 bars of both markets are available.
There is no price source choice: both markets are always compared on their close. Where the other market has no bar, its previous close is carried forward. If either price is perfectly flat across the window, the reading is undefined and no value is drawn.
Limitations
- Trends inflate the reading. Any two markets that trended the same way score high, whether or not their day-to-day moves were related. Correlation - Log compares the moves instead.
- It ignores size. A reading of +1 says the two moved together, not that they moved by the same amount.
- Same exchange only. The comparison market must be listed on the chart's exchange.
- It changes with the window. The same pair can read +0.9 over 20 bars and near 0 over 100.
- The live candle moves. The current bar's value changes until that bar closes.
Frequently asked questions
It is a number from -1 to +1 that measures how closely two markets' prices have moved together over a recent window. +1 means they moved in lockstep, -1 means one mirrored the other, and 0 means no straight-line relationship.
The Correlation Coefficient compares price levels, so two markets that both trended up read high even if their individual moves were unrelated. Correlation - Log compares bar-to-bar percentage moves, which is closer to what most traders mean when they ask whether two markets move together.
Yes. The indicator declares two inputs: Symbol, default ETH/USDT, and Length, default 20 with a minimum of 2. The symbol must trade on the same exchange as the chart. Open the indicator's settings on the chart to change them.
Values on bars that have already closed are not revised. The current bar's reading moves while either market's live candle is still open and settles when the bar closes.
Usually because the comparison market could not be found on the chart's exchange. Check the symbol is written as the exchange lists it, for example ETH/USDT, and that it trades there. The line also needs a full window of bars before it starts.
Use the Add to chart button at the top of this page. It opens BTC/USDT on Binance in the Altrady Charts terminal with the built-in Correlation Coefficient already applied. On any other market, open the indicator picker on the chart and choose Correlation Coefficient from the Comparison group.