PulseHub
OPEN-SOURCE SCRIPT
Updated

Ichimoku Status Panel - Projection and Price Targets

219
Ichimoku Status Panel - Projection and Price Targets

WHAT THIS IS

A read-only status panel for Ichimoku Kinko Hyo. It produces no buy or sell
signals and takes no view on direction. It reports what the chart currently
shows, in a form that is quicker to read than the lines themselves, and leaves
the judgement to the reader.

The panel is aimed at people who already trade with Ichimoku and want the
bookkeeping done for them: which conditions hold, for how long, and what is
already determined about the next few bars.


WHAT IT ADDS OVER A PLAIN ICHIMOKU

1. Projection of the Tenkan-sen and Kijun-sen.

The Tenkan-sen and Kijun-sen are midpoints of rolling high/low windows. That
means the bar on which the current extreme leaves the window is already known,
and so is the value the line will take once it does. The panel reports this as
"in N bars, up/down to X". Unless a new extreme is made in the meantime, that
move is settled in advance. A moving average cannot be read this way, and this
property is generally not surfaced by Ichimoku tools.

2. Chikou Span measured against the cloud, not only against price.

Most implementations compare the Chikou Span with the price 26 periods back
and stop there. Classical treatments also compare it with the cloud that sits
at that same location. A break of the cloud by price that is not confirmed by
the Chikou Span clearing the cloud behind it is a well documented failure
pattern. The panel shows this as a separate row, and calls out when the Chikou
Span is inside the cloud.

3. Counting that matches the original construction.

The original definition displaces by "26 periods including the current one",
which is a 25-bar shift. The script uses this by default and exposes a toggle
for anyone who prefers a plain 26-bar shift, so the reading can be matched to
whichever convention the rest of a workflow uses.

4. Construction from closes only, for indices.

Classical practice takes the intraday high and low, with the note that stock
indices remain valid when built from closes alone. Both are available.

5. Wave price targets, with a validity rule.

V, N, E and NT calculations from the last three alternating swing points, with
the percentage of the move already completed, and an option to hide targets
that price has passed. Consecutive swing points of the same kind are merged
into the more extreme one, so a usable wave is always available rather than
the display stalling whenever two highs or two lows confirm in a row.

More importantly, a wave whose starting point A has been taken out by price is
no longer a valid premise for a target. Pivots confirm several bars late, so
after a breakout the most recent completed wave often still runs against the
market, and every target it produces sits on the wrong side. When this happens
the script falls back to the preceding wave, which by construction runs the
other way, and the panel marks the condition. This keeps the levels on the
side the market is actually working toward.


PANEL ROWS

Bullish count how many of the six conditions currently hold
Price - Tenkan side, plus distance from the Tenkan-sen in percent
Tenkan - Kijun bullish or bearish, and how many bars it has held
Chikou - Price bullish or bearish, and how many bars it has held
Chikou - Kumo above, below, or inside the cloud behind price
Price - Kumo above, below, or inside the current cloud
Kijun slope rising, falling, or flat with a count of flat bars
Proj Tenkan bars until the Tenkan-sen moves, and to what value
Proj Kijun bars until the Kijun-sen moves, and to what value
Kumo twist bars until the next crossing of the leading spans
Bars since bars since the recent high and low, flagged when close to
the classical time numbers 9, 17, 26, 33, 42, 65 and 76
Wave the A, B and C points currently used for the targets,
marked when the preceding wave is in use or when the
starting point has been broken

All panel values are also written to the data window, so past bars can be
inspected by moving the cursor across the chart.


PRICE TARGET FORMULAS

With A as the start of the wave, B as the first objective and C as the
pullback or rally against it:

V = B + (B - C)
N = C + (B - A)
E = B + (B - A)
NT = C + (C - A)

The same four formulas serve both directions. In a down wave A is the starting
high, B the low and C the rally high, which makes the bracketed terms negative
and places the targets below B.

NT is off by default. Classical texts describe it as the rarest of the four,
and leaving all four on tends to produce a level near any price.


ON LAG AND REVISION

Swing points are found with a pivot lookback, so they confirm a number of bars
after the fact, set by "Swing sensitivity". Until a pivot confirms, the most
recent leg is not part of the wave, and the wave used for the targets can
change as new pivots arrive. The target lines move when it does. This is
inherent to identifying waves mechanically and is not hidden: the A, B and C
values in use are always shown in the panel so the reading can be checked.

The six conditions, the projections and the Kumo twist count are all evaluated
on confirmed values and do not revise.

Choosing the wave is a judgement in classical practice, not a calculation. The
automatic detection here is a convenience. Where it disagrees with the wave you
would have drawn, trust your own.


SETTINGS WORTH KNOWING

Wave selection "Latest valid" falls back to the preceding wave when
price takes out the starting point of the latest one.
"Latest only" always uses the most recent wave.
Swing sensitivity larger picks up larger waves, and confirms later
Target line length how far left the target lines are drawn
Panel theme the panel is opaque, so it stays readable on any
chart background; the theme is a preference
Draw the Ichimoku lines
turn this off if you already have the built-in
Ichimoku Cloud on the chart

The time-number flags on the "Bars since" row derive from calendar-based
reasoning in the original theory. They are meaningful on daily charts. On
intraday charts the rest of the panel still applies, but those flags are best
ignored.


CREDIT

Ichimoku Kinko Hyo was developed by Goichi Hosoda. The projection property,
the Chikou Span versus cloud relationship, the inclusive counting convention
and the four price target formulas are all part of the classical body of
theory. The code and the panel design are my own.
Release Notes
We have revised the labeling of the Ichimoku Kinko Hyo lines.
 
Tenkan-sen (Conversion Line)
Kijun-sen (Base Line)
Senkou Span A (Leading Span A)
Senkou Span B (Leading Span B)
Chikou Span (Lagging Span)
Kumo (Cloud)
Release Notes
Kata-fu candle patterns, with an orderly/disorderly distinction.

KATA-FU CANDLE PATTERNS

A secondary, classical reading of candle streaks, separate from the Ichimoku
lines themselves.

A streak of five or more same-direction candles is read in tiers of five,
seven and nine. Each tier is split into two cases:

Orderly the high, low, open and close all extend further in the
streak's direction on every candle, bar over bar
Disorderly the same streak length, but the body and the wicks do not
extend together, bar over bar

This is the stated point of difference from a plain candle count such as the
Sakata methods: two five-bar streaks can carry different weight depending on
whether the move was orderly or not. A doji does not break a streak; it is
absorbed into the count.

A second, separate pattern looks for a single opposite-colored candle
interposed inside an otherwise same-direction run: one bear candle inside a
six-day window bounding five bull candles, one bear candle inside an
eight-day window bounding seven bull candles, or two bear candles inside an
eleven-day window bounding nine bull candles (and the mirrored bear-trend
versions of each). The window's first and last candles must run with the
streak; the interposed candles must sit strictly inside it.

Both readings report whether the pattern followed a move of one period (26
bars) or more in the opposite direction, since classical treatments describe
the pattern as strongest when it does. This check compares the close 26 bars
before the streak started against the close at the streak's start, which is
a simplified proxy for a sustained prior move rather than a strict
bar-by-bar test, and is disclosed as such in the code comments.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by PulseWire. Read more in the Terms of Use.