Ichimoku Kinko Hyo: Indicator Documentation
Syntax
DataSeries SenkouSpanA (Bars bars)
DataSeries SenkouSpanB (Bars bars)
DataSeries TenkanSen(Bars bars)
DataSeries KijunSen(Bars bars)
Parameter Description
Bars bars |
The Bars object |
Description
Ichimoku Kinko Hyo is a Japanese technical indicator used to gauge momentum along with areas of support and resistance. Ichimoku contains comprised five lines called the Tenkan Sen, Kijun Sen, Senkou Span A, Senkou Span B and Chickou Span, and is devised like an "all-in-one" indicator that helps gauge an market's trend, momentum and support and resistance points at the same time.
References:- Senkou Span A, Senkou Span B, Tenkan Sen, Kijun Sen, Chikou Span.
- Ichimoku Cloud Filters Information Storm
Example
This example nicely plots the Senkou Span A and Senkou Span B indicators as a dual fill band:
using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;
using WealthLab;
using Community.Indicators;
namespace WealthLab.Strategies
{
public class MyStrategy : WealthScript
{
protected override void Execute()
{
PlotSeriesDualFillBand( PricePane, SenkouSpanA.Series(Bars), SenkouSpanB.Series(Bars),
Color.FromArgb( 50, Color.Blue ), Color.FromArgb( 50, Color.Red ),
Color.FromArgb( 50, Color.Black ), LineStyle.Solid, 1 );
}
}
}
This example demonstrates a neat WealthScript trick: pushing the price DataSeries
back 26 bars to align with the Kumo, so that the Kumo is plotted 26 periods into the future:
using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;
using WealthLab;
using Community.Indicators;
namespace WealthLab.Strategies
{
public class IchimokuClouds : WealthScript
{
protected override void Execute()
{
int p4 = 26;
// Push the Price DataSeries back 26 bars to align with Kumo
for (int bar = p4; bar < Bars.Count; bar++)
{
int b = bar - p4 + 1;
Openb = Openbar;
Highb = Highbar;
Lowb = Lowbar;
Closeb = Closebar;
}
// flat line the values for the last 26 bars
double last = CloseBars.Count - 1;
for (int bar = Bars.Count - p4 + 1; bar < Bars.Count; bar++)
{
Openbar = last;
Highbar = last;
Lowbar = last;
Closebar = last;
}
Color ltRed = Color.FromArgb(60, 255, 0, 0);
Color ltBlue = Color.FromArgb(60, 0, 0, 255);
PlotSeriesDualFillBand( PricePane, SenkouSpanA.Series(Bars), SenkouSpanB.Series(Bars), ltBlue, ltRed, Color.Red, LineStyle.Solid, 1 );
HideVolume();
}
}
}