'TradingView Pine alert condition based on color change for Moving average slope

Im trying to add alert for colour change for this indicator 'moving average slope to determine market direction' by LukkVal. Tradingview doesnt give option to add alert on colour change, please help.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source