Half Trend Indicator Python Code