Skip to content
All library documents

Coloring Candlesticks by RSI Trend and Candle Direction

Article MQL5 code base

Summary

RSI_BARS is a chart indicator that colors each candlestick according to a trend signal derived from the relative strength index (RSI). It compares the RSI-based trend direction with the candle’s own direction: matching directions receive a lighter shade, while opposing directions receive a darker shade. Candles are left uncolored when RSI does not indicate the specified trend-strength condition.

The description sets example upper and lower RSI levels at 55 and 45, respectively, and says these input parameters define the overbought and oversold areas used by the indicator. It explains a visual encoding rather than a complete trading system: no entry or exit rules, asset class, test results, or evidence of predictive value are supplied. The thresholds are configurable inputs, so the coloring depends on the chosen settings and should not be interpreted by itself as a validated signal.

Key ideas

  • The indicator uses RSI levels to identify trend strength for chart coloring.
  • Candles receive lighter colors when candle direction matches the RSI-based trend and darker colors when the directions oppose each other.
  • Bars are not colored when RSI lies outside the configured signal areas.
  • The described default thresholds are 55 for the upper level and 45 for the lower level.
  • The indicator provides a visual aid, not tested entry or exit rules.

Tags

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