This script Uses Ma`s for Trend confluence and looks for macd divergence where the macd is below the Zero line on a long and doesnt cross back up before the divergence happens.
Also added Tp as preeset 2:1RR in green. SL in red and 1:1 RR in orange.
Alerts are included too.