Changed segment signal plotting. Now the segment signal is not deleted if a segment series is no longer valid. By definition, the segment signal cannot be repainted. The segments follow higher lows and lower highs.
Definition of a valid long signal: there are three segments and the current candle high is higher than the last candle high (high> high [1]).