TradingView
undershot
23 sie 2022 10:59

MACD Divergences 

VOLATILITY S&P 500TVC

Opis

Update of MACD indicator which shows the most recent, and developing, price action divergences with the histogram.

Informacje o Wersji

Updated chart image

Informacje o Wersji

Updated to now include all past divergences, and fix bug which stopped indicator updating.

Informacje o Wersji

Updated to include MACD variable inputs, and show MACD plot and MACD signal plot.

Informacje o Wersji

Improved label positions

Informacje o Wersji

Added alerts and tidied script

Informacje o Wersji

Bug fix (hopefully): Stopped lines drawing onto each increasing histogram bar of current island.
Komentarze
BTCCNY
Thanks for your "MACD Divergences".
Set alert "alertcondition" is not valid, although it appears in the chart.
Suggest that bullish is all green and bearish is all red.
Suggest shrinking the label frame.
Suggest that labels appear in the closing line instead of the center.
jgvansickle
Thanks, very good indicator. I wish the alerts worked.
sharpie0319
Many thanks for this indicator. I been an avid user of MACD histogram for my secondary confirmation. I made a copy of the indicator for my personal used and tweaked a bit the codes, basically as below

*Plot only histogram and not the MACD and Signals
*Instead of alert condition, I change to "alert" to use any alert function, thus saving some number of alerts.
*I would suggest try to use 100/26 and see the difference.

Once again thanks @undershot
sharpie0319
@undershot I forgot to add. I added "lookback" so that it will work on some assets like GOLD and some JPY assets. Hope it helps that you can update the code for others. Cheers
Izzatikhmal
@sharpie0319, where to change 100/26?
sharpie0319
@Izzatikhmal, I am not using it anymore but here are some snippets of changes I did before.
// Input parameters macdSource = close macdShortPeriod = 26 macdLongPeriod = 100 macdSignalPeriod = 9


and alerts is here

// Generate alerts if isBullishToBearish alert("MACD Histogram changed from Bullish to Bearish (" + syminfo.ticker + ") {{interval}}", alert.freq_once_per_bar_close) if isBearishToBullish alert("MACD Histogram changed from Bearish to Bullish (" + syminfo.ticker + ") {{interval}}", alert.freq_once_per_bar_close)
haiprodt3
Hướng dẫn sử dụng ad ơi
Detri_Mantela
That's exactly the indicator I was looking for! Thanks a lot!
Więcej