The Kagi chart is usually drawn on close prices and considers neither timeframe, nor volume. The idea is that if the market continues to move in the direction of the current Kagi line, the line is extended, and if the price goes in the opposite direction more than the set minimum reversal value then the line is drawn in the opposite direction. If there is breakthrough of the previous minimum (maximum) in the rollback then the line changes the color indicating about reversal.
Translated from Russian by MetaQuotes Software Corp.
Original code: https://www.mql5.com/ru/code/1300
The chart of (three) linear breakthrough in a separate subwindowExp_ColorNonLagDotMACD
The Exp_ColorNonLagDotMACD Expert Advisor drawn on the basis of the signals taken from the ColorNonLagDotMACD histogram