TradingView
rrunner88
2021년 1월 21일 오전 8시 22분

MACD Crossover Strategy with EMA200 Trend Detection 

USD/CHFOANDA

설명

Simple MACD Strategy Indicator.

Rules:

- MACD Crossover with Signal Line

If
- MACD Crossover above zero line
- Price is below EMA200
=> Sell

If
- MACD Crossover below zero line (buy)
- Price is above EMA200
=> Buy

코멘트
MrGlad
Nice work, is it possible to add a horizontal arrow to point exactly where the crossover happends, not just what candle?
dmweyandt
Hello,
Could you add inputs for a take profit and stoploss?
UnknownUnicorn29124263
Hello, author, why does this strategy show no data in the strategy test?
tuckerleiske94
@UnknownUnicorn29124263, change alertconditions( to

if crossoverBear
strategy.entry('MACD Bear', strategy.short)
if crossoverBull
strategy.entry('MACD Bull', strategy.long)
tuckerleiske94
should be a tab before each "strategy.entry"

Also update to V5
Mike240
@tuckerleiske94, for me it doesn't work..
snokam
Hi, it's very great job. Possible to have the alerts? Thanks you
AndreasMatze
It would be nice for the alerts to work... :(
AndreasMatze
It would be awesome to add the arrow right after the price bar closes and the MACD cross has happened. In your example the arrow appears to late to indicate the cross on MACD and it lags. The idea is awesome though, very helpful.
ZhenFu1228
Hi, thanks for sharing this wonderful tools. I’m facing some problem which I didn’t receive any alert when crossover happened, couldn’t find it in the log also.
더보기