Skip to content
All library documents

Smoothed Bar-to-Bar Correlation for Trend and Range Detection

Article MQL5 code base

Summary

This document describes a smoothed correlation indicator intended to distinguish trending price action from ranging or erratic movement. It calculates a bar-to-bar correlation coefficient over a correlation period and then applies smoothing, with both periods controlled by user inputs. Values near positive one indicate a directional trend, whether upward or downward; values near zero suggest prices are moving within a range. Negative readings are associated with whipsawing action.

The description offers a qualitative interpretation of the indicator rather than a trading system or tested results. It does not specify the precise calculation, smoothing method, threshold for classifying regimes, or how a trader should enter and exit positions. The indicator may help describe price behavior, but the document provides no evidence that it predicts future moves or improves trading performance. Its output should therefore be treated as a regime signal whose usefulness depends on implementation and independent evaluation.

Key ideas

  • The indicator uses a bar-to-bar correlation coefficient to characterize price behavior.
  • Values near positive one are described as indicating a directional trend.
  • Values near zero suggest ranging movement, while negative values suggest whipsawing.
  • Separate inputs set the correlation lookback and smoothing period.
  • The document gives no entry rules or performance evidence.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.