Your screenshots only show the bare minimum. So it is not possible for me to provide you a screenshot showing the exact signals you have carefully marked in shaded rectangles. I don’t understand, but this is very common among our visitors. They provide a pinhole view through which to view the entire universe. Lot’s of important details are left out. Very common, almost everyone does this. I have no idea why. Especially since I am so careful to set the standard by always presenting full charts in everything I publish. Ok, off the soap box and back to the task at hand.
You did not express any desire to understand how to write this code. So I won’t provide any explanation. Here is the code:
input fastLength = 5;
input midLength = 75;
input slowLength = 85;
#---------- Weighted Moving Averages
plot fastWMA = WMA(close, fastLength);
plot midWMA = WMA(close, midLength);
plot slowWMA = WMA(close, slowLength);
#---------- Trend
def trendUp = midWMA > slowWMA;
def trendDown = midWMA < slowWMA;
#---------- Crosses
def crossingUpMid = fastWMA[1] < midWMA[1] and fastWMA > midWMA;
def crossingUpSlow = fastWMA[1] < slowWMA[1] and fastWMA > slowWMA;
def crossingDownMid = fastWMA[1] > midWMA[1] and fastWMA < midWMA; def crossingDownSlow = fastWMA[1] > slowWMA[1] and fastWMA < slowWMA; plot crossesUp = (midWMA > slowWMA and crossingUpMid) or (slowWMA > midWMA and crossingUpSlow);
plot crossesDown = (midWMA < slowWMA and crossingDownMid) or (slowWMA < midWMA and crossingDownSlow);
#---------- Style statements
crossesUp.SetDefaultColor(Color.CYAN);
crossesUp.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
crossesDown.SetDefaultColor(Color.MAGENTA);
crossesDown.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);
#---------- Alerts
Alert(crossesUp, "Crossing Up", Alert.BAR, Sound.RING);
Alert(crossesDown, "Crossing Down", Alert.BAR, Sound.RING);
Screenshot below shows this indicator plotted on a daily chart of Apple.
I think it would been best if I had been able to present a screenshot using the stock ticker and time frame you used in your original request. Since you did not include the entire chart I could not bring up that same exact chart. It is only the difference between Good Enough and The Best. I like to shoot for the best.