danilogalisteu

MACD MTF Lines

The indicator shows the MACD histogram sign (positive or negative) for several timeframes at once. You can see at a glance how the price is trending across higher and lower timeframes.

The code uses recursive calculations for the SMA and EMA to avoid lookahead errors and repainting on higher timeframes.

Note that, for lower timeframes, the line becomes yellow to the left because history is limited and there are not enough bars to calculate.
版本注释:
The indicator was updated to show the maximum number of lines supported.
版本注释:
Each line can be enabled or disabled individually, so that unused ones can be hidden.
版本注释:
Added simple trend detection based on the number of bullish and bearish timeframes; threshold can be changed in Settings.

Added data outputs:
* "Score": counting the net number of bullish and bearish timeframes
* "Trend": changes to bullish or bearish as the score goes over or under the threshold

Added background color (green or red according to trend); can be enabled in Settings.

Added alert for trend change.

Fix: named individual timeframe outputs.
版本注释:
Added another alert with a separate threshold score for flexibility.
版本注释:
Fix: minimum values set to 1.
版本注释:
Added score weights for further customization of trend detection and alerts. Input parameters are now set in terms of score values instead of number of lines.
版本注释:
Release notes:
Added input options to choose alert modes for trend and extra alerts. The options are:
* once per bar close (default)
* once per bar
* every time

开源脚本

本着真正的TradingView精神,该脚本的作者将其开源发布,以便交易者可以理解和验证它。为作者喝彩!您可以免费使用它,但在出版物中重复使用此代码受网站规则的约束。 您可以收藏它以在图表上使用。

免责声明

这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。

想在图表上使用此脚本?