danilogalisteu

MACD MTF Lines

danilogalisteu Mis à jour   
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.
Notes de version:
The indicator was updated to show the maximum number of lines supported.
Notes de version:
Each line can be enabled or disabled individually, so that unused ones can be hidden.
Notes de version:
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.
Notes de version:
Added another alert with a separate threshold score for flexibility.
Notes de version:
Fix: minimum values set to 1.
Notes de version:
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.
Notes de version:
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

Script open-source

Dans le véritable esprit de TradingView, l'auteur de ce script l'a publié en open-source, afin que les traders puissent le comprendre et le vérifier. Bravo à l'auteur! Vous pouvez l'utiliser gratuitement, mais la réutilisation de ce code dans une publication est régie par le règlement. Vous pouvez le mettre en favori pour l'utiliser sur un graphique.

Clause de non-responsabilité

Les informations et les publications ne sont pas destinées à être, et ne constituent pas, des conseils ou des recommandations en matière de finance, d'investissement, de trading ou d'autres types de conseils fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.

Vous voulez utiliser ce script sur un graphique ?