OPEN-SOURCE SCRIPT
Bobs Gold and Red Lines

This indicator plots a normal 9 EMA corresponding to the current time frame, ie Bob's 1 min 9 ema Gold Line.
It also plots a 5 min 21 SMA (Bob's Red Line) on the 1 min chart. It actually plots the 5 min redline on timeframes other than the 1 min chart as well.
In other words, this will plot the actual 5 min 21 SMA whether you are on the 1 min, 5 min, or other time frames. I created this instead of having to use the workaround of a 105 SMA on the 1 min chart or having a separate 5 min chart open when trading Bob's 1 min strategies.
On the 1 min chart you will notice the red line typically makes a stairstep effect, that is because it is a 5 min SMA being plotted on the 1 min chart. The right hand end point should still perfectly match the current 5 min SMA price. I have been testing / using this script for several months.
I have noticed that the ema and sma on my tradovate charts do not perfectly match my tradingview charts, even just using the normal tradingview moving averages, however from what I can see on Bob's charts Tradingview seems to be close to the same as on Bob's Ninja charts. I have not started using Ninja yet, but plan to soon then I can compare apples to apples.
I made a few changes in names, etc before I published this script today, so hopefully I didn't inadvertently break anything. So let me know if you find anything off or not working as expected.
It also plots a 5 min 21 SMA (Bob's Red Line) on the 1 min chart. It actually plots the 5 min redline on timeframes other than the 1 min chart as well.
In other words, this will plot the actual 5 min 21 SMA whether you are on the 1 min, 5 min, or other time frames. I created this instead of having to use the workaround of a 105 SMA on the 1 min chart or having a separate 5 min chart open when trading Bob's 1 min strategies.
On the 1 min chart you will notice the red line typically makes a stairstep effect, that is because it is a 5 min SMA being plotted on the 1 min chart. The right hand end point should still perfectly match the current 5 min SMA price. I have been testing / using this script for several months.
I have noticed that the ema and sma on my tradovate charts do not perfectly match my tradingview charts, even just using the normal tradingview moving averages, however from what I can see on Bob's charts Tradingview seems to be close to the same as on Bob's Ninja charts. I have not started using Ninja yet, but plan to soon then I can compare apples to apples.
I made a few changes in names, etc before I published this script today, so hopefully I didn't inadvertently break anything. So let me know if you find anything off or not working as expected.
Script open-source
Dans l'esprit de TradingView, le créateur de ce script l'a rendu open-source, afin que les traders puissent examiner et vérifier sa fonctionnalité. Bravo à l'auteur! Vous pouvez l'utiliser gratuitement, mais n'oubliez pas que la republication du code est soumise à nos Règles.
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.
Script open-source
Dans l'esprit de TradingView, le créateur de ce script l'a rendu open-source, afin que les traders puissent examiner et vérifier sa fonctionnalité. Bravo à l'auteur! Vous pouvez l'utiliser gratuitement, mais n'oubliez pas que la republication du code est soumise à nos Règles.
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.