This is read-only version of AFL library entry. Ability to add user formulas
and comment is only available from members-only area.
Tomasz Janeczko - tj --at-- amibroker.com
Presented in TASC magazine issue 10/2000
DISCLAIMER: Most formulas present in AFL on-line library are submitted
by the users and are provided here on an "as is" and "as available" basis.
makes no representations or warranties of any kind to the contents or the operation
of material presented here. We do not maintain nor provide technical support
for 3rd party formulas. Description:
Ichimoku charts - yet another Japanese charting technique is enjoying new wave of popularity. Just a few months ago, in the October 2000 issue of Technical Analysis of Stocks and Commodities (TASC) magazine an article covering this charting method was presented. I will not dig into details - they are described fairly enough in the TASC magazine - instead I am going to focus on AFL implementation, but a bit of introduction is needed:
"Literally, ichimoku means 'one look'; a chart of this style is referred to as [...] the table of equilibrium prices at a glance. [..] All the computations involved no more than taking midpoints of historical highs and lows in various ways. Nevertheless, the completed chart presents a panoramic view of price movement"
OK. This sounds a little bit complicated, but in fact the whole algorithm is not difficult at all. An ichimoku chart consists of:
the standard line calculated as one half of the sum of highest high and lowest low price over past 26 days
the turning line calculated as one half of the sum of highest high and lowest low price over past 9 days
the delayed line which is close price shifted 25 days prior to today
the first preceding span line which is calculated as the average of standard line and turning line and then shifted 25 days ahead of today
the second preceding span line which is calculated as the average of highest high and lowest low prices over past 52 days and then shifted 26 days ahead of today
Implementing above rules in AFL gives the following formula:
This chart is great. Works very well, and is easier to read with lines that are thicker.
Brian Richard brianrichard99 [at] hotmail.com 2004-09-22 17:50:21
My cleaned-up version of Ichimoku charting, below.
A bullish signal is issued when the Tenkan-Sen (RED line) crosses the Kijun-Sen (BLUE line) from below. On the other hand, a bearish signal is issued when the Tenkan-Sen crosses the Kijun-Sen from above.
Moreover, there are, in fact, different levels of strength for the buy and sell signals of an Ichimoku chart.
First, if there was a bullish crossover signal and the crossover occurred above the Kumo (or WHITE clouds), this would be considered a very strong buy signal (indicated with three green up arrows). In contrast, if there was a bearish crossover signal and the crossover occurred below the Kumo, this would be considered a very strong sell signal (indicated with three red down arrows, as above).
Secondly, a normal buy or sell signal would be issued if the crossover took place within the Kumo (or clouds). These signals would be indicated with two green up arrows, for a buy signal, and two red down arrows, for a sell signal.
Thirdly, a weak buy signal would be issued if there was a bullish crossover that occurred below the Kumo (or clouds). This is indicated with only one green up arrow (as above). On the other hand, a weak sell signal would be issued if there was a bearish crossover that occurred above the Kumo. This is indicated with only one red down arrow.
Another striking feature of the Ichimoku charting technique is the identification of support and resistance levels. These levels can be predicted by the presence of Kumo (or WHITE clouds). The Kumo can also be used to help identify the prevailing trend of the market. If the BLACK price line is above the Kumo, the prevailing trend is said to be up. And if the price is below the Kumo, the prevailing trend is said to be down.
A final feature of the Ichimoku chart is the PURPLE line, or Chikou Span (or Lagging Span). This line can be used to determine the strength of the buy or sell signal. If the Chikou Span is below the closing price for 26 periods ago and a sell signal is issued, then the strength is with sellers, otherwise it is a weak sell signal. Conversely, if there was a buy signal and the Chikou Span is above the price for 26 periods ago, then there is strength to the upside, otherwise, it can be considered a weak buy signal. This feature can also be incorporated into the other signals.
Plot(SL,"SL",colorBlue,styleThick); // standard, base, or kijun-sen line
Plot(TL,"TL",colorRed,styleThick); // turning, conversion, or tenkan-sen line
Plot(DL,"DL",colorViolet,styleLine); // delayed, lagging, or chikou span
Plot(Span1,"A",colorWhite,styleLine); // senkou span A, kumo, or white clouds
Plot(Span2,"B",colorWhite,styleLine); // senkou span B, kumo, or white clouds
Plot(Close,"Close",colorBlack,styleLine); // price close
Buy1 = IIf(Cross(TL,SL) AND TL>Span1 AND TL>Span2,1,0);
Buy2 = IIf(Cross(TL,SL) AND ( (TL>Span1 AND TL<Span2) OR (TL<Span1 AND TL>Span2) ),1,0);
Buy3 = IIf( (Buy1 OR Buy2) AND C>Ref(DL,-26),1,0);
Short1 = IIf(Cross(SL,TL) AND SL<Span1 AND SL<Span2,1,0);
Short2 = IIf(Cross(SL,TL) AND ( (SL>Span1 AND SL<Span2) OR (SL<Span1 AND SL>Span2) ),1,0);
Short3 = IIf( (Short1 OR Short2) AND C<Ref(DL,-26),1,0);
Thank you Richard. It is really appreciated when people like you take the time and effort to explain the indicator instead of refering us to some other internet sites or issues of Technical Analysis of Stocks and Commodities (TASC) magazines like this one above.
I can actually learn from reading your comment and it is the right way to use this place provided for us. People have different ideas that can be great but useless for others if they do not explain what's behind them. They just assume it's obvious when it's not.
Richard Semock semockr [at] hotmail.com 2005-05-09 07:34:46
I copyed the following description that was recently published:
Ichimoku charts are trend following indicators that can be used in a way similar to moving averages to generate trading signals and identify support and resistance levels. A key difference however is that Ichimoku chart lines are shifted forward in time, which allows for wider support and resistance zones and decreases the risk of trading false breakouts.
The Ichimoku study conveys a great deal of information on trend existence, direction, support and resistance. It is comprised of four main lines:
Turning Line = (Highest High + Lowest Low) / 2, for the past 9 days
Standard Line = (Highest High + Lowest Low) / 2, for the past 26 days
Leading Span 1 = (Standard Line + Turning Line) / 2, plotted 26 days ahead of today
Leading Span 2 = (Highest High + Lowest Low) / 2, for the past 52 days, plotted 26 days ahead of today
How are they used?
Much like a moving average crossover strategy, Ichimoku charts generate a buy signal when the Turning Line crosses the Standard Line from below, and a sell signal when the Turning Line crosses the Standard Line from above.
In addition, the blue shaded area that is formed between Leading Spans 1 and 2 is known as a cloud, and defines support or resistance. Clouds not only act as support or resistance, they also help to identify trend direction. When prices are above the cloud, the trend is up; similarly when prices are below the cloud, the trend is likely down. Below is an example of an Ichimoku chart applied to USD/CHF: (not included)
Wednesday, May 4, 2005 11:57 GMT
By Kathy Lien
Forex Capital Markets LLC
Bhupendra r Jambhulakr bhupendra.jambhulkar [at] mfglobal.in 2007-09-13 01:27:57
can u please send me Ichimoku charts calculation for (Leading Span 1 & Leading Span 2 )in excel format, as i'm can't able to get the exact calculation for the same