This is a script I created by combining parts of other scripts I looked at. It uses RSI and MACD to give entrance signals for longs or shorts. When the color changes from red to green it signifies a buy, from green to red signifies a short.
The problem that I am having is that I cannot set up the alert script properly, Using the code : alert1 = (xRSI > Overbought and signal < macd) ? 1: 0
gives repeat signals every time the criteria reasserts itself, and I only want it to show an alert at the same time the bar color changes. If I could get some advice on how to set up the alert so it only alerts me at the same time that the bars change color, it would be much appreciated. Thankyou