Skip to content
All library documents

Displaying Candles in Two Colors Relative to the Kijun Sen

Article MQL5 code base

Summary

This indicator overlays differently colored candles according to whether price is above or below a Kijun Sen line. It is primarily a chart-display aid: users must ensure that the period used by the candle indicator matches the period of the Kijun Sen reference. The instructions describe placing it on a blank line chart, where the ordinary price graphic is hidden while its underlying open, high, low, and close values remain accessible.

The document explains how to verify that the colored candles retain the underlying OHLC values, using a sample candle and the platform's data window. It also describes how colors distinguish candle direction and notes that changing settings followed by a reset can cause the display to revert to bars, with a timeframe switch offered as a workaround. No trading signal, performance test, or evidence of predictive value is presented; the material concerns visualization and data checking.

Key ideas

  • The indicator colors candles according to their position relative to a Kijun Sen line.
  • The Kijun Sen period must match the period configured for the candle indicator.
  • A hidden line chart can preserve OHLC values for inspection while the colored candles are displayed.
  • The platform data window can be used to compare indicator candle values with the underlying prices.
  • Resetting settings may change the display to bars, and switching timeframes back and forth can restore the colored candles.

Tags

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