The scripts in this series are all open source, with the code broken up into logical section and notated so beginner users can also understand some PineScript fundamentals.
Please understand that no indicator presented in and of itself constitutes a complete trading strategy. Rather, this series is to help users determine which indicators make sense to them, and which ones to combine to create their own trading strategy. All material presented is purely for educational purposes.
Presented here is the Ichimoku Cloud.
The Ichimoku Cloud was developed by Goichi Hosada, and first published in the late 1960s. It is used by traders to understand price momentum, and help forecast future price movements.
The indicator at its core can be understood from four component parts:
- The Conversion Line - An average of the highest and lowest price in a given window. Typically, this is a "fast" average, and as such, this line has the lowest period
- The Base Line - An average of the highest and lowest price in a given window. This is a "slower" average than the Conversion Line, and as such should have a larger period than the Conversion Line
- Leading Span A - The average of the Conversion Line and the Base Line
[*}Leading Span B - An average of the highest and lowest price in a given window. This is the "slowest" average of all three, and as such should have the largest period
One interesting feature of the Ichimoku Cloud is that it drawn a certain number of candles forward. What this means is that where the cloud is drawn on the chart is reflective of prices that have occurred a number of candles in the past. This is done intentionally to help traders see how the current price is moving in relation to historical price movements on the asset.
See below for how the indicators look in their default colors on the chart
These indicators can then be used to start analyzing the price movement, and making trade decisions.
The first inference we can make is the momentum of the price. Since the lines are drawn from averages of varying speeds, the shaded area between the Leading Span lines can tell us whether the momentum is bullish (up) or bearish (down).
Whenever Leading Span A, the faster of the two lines, is above Leading Span B, that means that price is moving upward faster than it typically has, ergo we are in Bullish Momentum. On the chart, this is indicated in two ways:
- The area is shaded positively (blue by default)
- A green upward triangle is added to the chart to indicate where the momentum first turned Bullish
- The area is shaded negatively (red by default)
- A red downward triangle is added to the chart to indicate where the momentum first turned Bearish
When the asset is in Bullish Momentum, and the Conversion Line, our fastest average, is above the Base Line, our mid speed average, we know that the price is coming up quickly in the short term. When the Base Line and current Price are also above the cloud, then we have triple confirmation that price is going up, and we should enter a Long position. On the chart, this point is indicated with a green flag.
When the asset is in Bearish Momentum, and the Conversion Line is below the Base Line, we know that the price is going down quickly in the short term. When the Base Line and current Price are also below the cloud, then we have triple confirmation that price is going down, and we should enter a Short position. On the chart, this point is indicated with a red flag.
The script presented here also allows users to customize the various parameters of the Ichimoku Cloud, and visually see how analysis is affected by these changes. This is designed to allow users to modify parameters as they see fit, within certain constraints, to find the best set for them. The lines, cloud, and chart indicators will all update automatically with the users' inputs.
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.
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.