Skip to content
All library documents

Coloring Candles by TDI-2 Trend and Candle Direction

Article MQL5 code base

Summary

This short description explains a chart indicator that colors each bar according to the trend calculated by a custom TDI-2 indicator. When the candle direction agrees with the calculated trend, the bar is shown in a lighter shade; when direction and trend disagree, it is darker. The display is intended to make the relationship between current price movement and the indicator’s trend estimate easier to scan.

The document also notes that the implementation depends on a separate smoothing-algorithm library being installed in the platform’s include directory. It supplies no formula for the TDI-2 calculation, trading rules, market examples, or performance evidence. As a result, it describes a visualization convention rather than demonstrating an independently testable strategy; users would need the underlying indicator details to assess the signal’s meaning and limitations.

Key ideas

  • The indicator assigns bar colors based on a trend estimate from a custom TDI-2 calculation.
  • Bars are lighter when candle direction agrees with the estimated trend.
  • Bars are darker when candle direction conflicts with the estimated trend.
  • The implementation depends on a separate smoothing-algorithm library.
  • The description gives no performance results or complete details of the underlying trend calculation.

Tags

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