This is very simple. This is a short-term moving average system, and the closing price is unmarked. If it is rising, first output the red line below K, if it is falling, output the green line on the K line.
It is not difficult to achieve this.
I can write code.