MACD Crossover Trend Indicator

This is a very simple "the trend is your friend" indicator - if you are consistent!

How this indicator works:
This indicator detects MACD Crossovers based on the current trend. It checks wether the current close price is above or below the 200 EMA and therefore decides whether we are in an up- or down trend.

UP-TREND: If the price is above the EMA200, the MACD is below 0 and crosses up the signal line, then this is a BUY signal!

DOWN-TREND: If the price is below the EMA200, MACD is above 0 and crosses down the signal line, then this is a SELL signal!

You can also add an alert, that keeps you informed, once one of these scenario happens for a certain pair!

With this indicator you will never enter against the trend.

Have fun! :)
Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.

Want to use this script on a chart?


Awesome! Is there a way it utilise it as a scan so that a buy/sell would show up on your screen through an alert?
+8 Reply
Nice script, I removed the MACD <0 to give more signals
+5 Reply

When i enter this script will it automatically update me with a alert through my phone? or do i need to enter some extra code for that feature.

+2 Reply
Extremely helpful for those who, like me, love this strategy. Many thanks!
How do I add the alerts please?
Good job! The buy or sell signal appear even if the macd make the cross and the price candle is not close or it send the signal only when the candle is close?
Much thanks!
Good Job!
why isnt there Sell cross places ?
mastixmc aktifgirisimci
@aktifgirisimci, this indicator only puts SELLs when the price is below the EMA200. Which is not the case in this example. Use this Indicator on a bearish pair and you'll also see SELL signals.