Combination and double top and double bortom algorithm with rsi and macd?

double top and double bottoms are chart patterns and can not write script combining with RSI and MACD , but can be applied manually…and study