The author of the idea: Scriptor

MQL5 code author: barabashkakvn

The indicator defines the market state: flat or trend.

Interpretation of the histogram color buffers when setting "signal timeframe" PERIOD_CURRENT: