I have not succeeded in writing the project yet
This is the situation
In the half trend indicator, when the indicator line on the chart is blue, it means that the trend is upward. In this case, buffer number 0 (half trend) has a value and buffer number 1 (value 2) has no value.
I want to open a position when the color of the indicator changes (that is, when the value is 2 and the half trend is not)