Trend

Ichimoku Signals: TK Crosses and Correct Cloud Alignment

Read Ichimoku crosses with correctly aligned cloud and Chikou comparisons. A Pine Script example separates plotted offsets from when a signal becomes known.

Ichimoku Cloud Signal Interpretation

Quick-reference guide to 5 signal types you will see on the chart.

Signal TypeIndicator ConditionMarket MeaningInterpretation limits
TK upward/downward crossConversion range midpoint crosses the base range midpointAn ordering change in two undisplaced lines.The lines are high-low range midpoints, not closing-price moving averages.
Price crosses the cloud at the current barClose crosses the aligned upper/lower boundary drawn at that timeInteraction with previously calculated leading spans.Different from comparing close with newly computed spans projected forward.
Current close versus historical closeCurrent close is above/below close from the chosen offset agoA simple Chikou-style close comparison at the historical plotting position.Not a full comparison with historical candles, cloud or other obstacles.
New leading-span crossNewly calculated Span A crosses Span BThe cloud projected forward changes ordering.This uses known history, not observed future prices.
Combined exampleConfirmed TK cross plus aligned cloud position plus the current/historical close comparisonAll three explicitly defined conditions occur together.No reliability advantage or win rate is established by combining them.

Ichimoku Cloud Pine Script Signal Code

Educational indicator example. Review its exact rules and compare its plots with your intended calculation in TradingView. It does not place orders or establish profitability.

Pine Script v6
//@version=6
indicator("Ichimoku Aligned Condition Examples", overlay=true)
conversionLength = input.int(9, "Conversion Length", minval=1)
baseLength = input.int(26, "Base Length", minval=1)
spanBLength = input.int(52, "Span B Length", minval=1)
offsetBars = input.int(26, "Exact Plot Offset Bars", minval=1, maxval=200)
midpoint(length) => (ta.highest(high, length) + ta.lowest(low, length)) / 2.0
conversion = midpoint(conversionLength)
base = midpoint(baseLength)
spanA = (conversion + base) / 2.0
spanB = midpoint(spanBLength)
pA = plot(spanA, "Leading Span A", color=color.teal, offset=offsetBars)
pB = plot(spanB, "Leading Span B", color=color.orange, offset=offsetBars)
fill(pA, pB, color=spanA > spanB ? color.new(color.green, 90) : color.new(color.red, 90))
plot(conversion, "Conversion", color=color.blue)
plot(base, "Base", color=color.red)
plot(close, "Current close plotted backward", color=color.purple, offset=-offsetBars)
cloudTop = math.max(spanA[offsetBars], spanB[offsetBars])
cloudBottom = math.min(spanA[offsetBars], spanB[offsetBars])
tkUpCross = ta.crossover(conversion, base)
tkDownCross = ta.crossunder(conversion, base)
cloudUpCross = ta.crossover(close, cloudTop)
cloudDownCross = ta.crossunder(close, cloudBottom)
spanCross = ta.cross(spanA, spanB)
tkUp = barstate.isconfirmed and tkUpCross
tkDown = barstate.isconfirmed and tkDownCross
cloudUp = barstate.isconfirmed and cloudUpCross
cloudDown = barstate.isconfirmed and cloudDownCross
chikouAboveClose = close > close[offsetBars]
chikouBelowClose = close < close[offsetBars]
combinedUp = tkUp and close > cloudTop and chikouAboveClose
combinedDown = tkDown and close < cloudBottom and chikouBelowClose
newCloudCross = barstate.isconfirmed and spanCross
plotshape(tkUp, "TK upward cross", shape.triangleup, location.belowbar, color=color.green, size=size.tiny)
plotshape(tkDown, "TK downward cross", shape.triangledown, location.abovebar, color=color.red, size=size.tiny)
plotshape(combinedUp, "Combined upward condition", shape.diamond, location.belowbar, color=color.aqua, size=size.small)
plotshape(combinedDown, "Combined downward condition", shape.diamond, location.abovebar, color=color.orange, size=size.small)
alertcondition(tkUp, "TK upward cross", "Confirmed conversion line cross above base line")
alertcondition(tkDown, "TK downward cross", "Confirmed conversion line cross below base line")
alertcondition(cloudUp, "Aligned cloud upward cross", "Confirmed close cross above the cloud aligned with the current bar")
alertcondition(cloudDown, "Aligned cloud downward cross", "Confirmed close cross below the cloud aligned with the current bar")
alertcondition(combinedUp, "Combined upward condition", "Confirmed upward TK cross, close above aligned cloud and above offset-ago close")
alertcondition(combinedDown, "Combined downward condition", "Confirmed downward TK cross, close below aligned cloud and below offset-ago close")
alertcondition(newCloudCross, "New leading-span cross", "Newly calculated leading spans cross; their drawing is projected forward")

Example settings for Ichimoku Cloud

Record the inputs used by the example. These settings are not an optimized trading recommendation.

Feature comparison table: Default vs Description
ParameterDefaultDescription
Conversion / Base lengths9 / 26, examplesLookbacks for high-low range midpoints. Changing Base Length does not change the separate plot-offset input.
Span B Length52, exampleRange midpoint lookback. A shorter value does not always produce a thinner cloud.
Exact Plot Offset Bars26This example uses the literal offset for plotting and historical indexing. Check actual offsets before comparing with built-in scripts that may apply a displacement-minus-one convention.
Chikou comparisonCurrent close versus offset-ago closeThe bullish comparison is current > historical. The lagging plot’s position does not make today’s close knowable on the old bar.

Turn the condition into an explicit rule

Specify the calculation, confirmation time, entry and exit rules before asking Pineify to draft or revise Pine Script. Review the code and simulate realistic costs before evaluating a strategy.

Explore Pine Script coding

FAQ

Ichimoku Cloud Signals FAQ

Is a cloud-color change the same as price breaking the cloud?
No. One compares the leading spans; the other compares price with an aligned boundary. They can happen on different bars and convey different calculated relationships.
What was reversed in a bearish Chikou comparison?
To ask whether today’s backward-plotted close is above the historical close, compare current close > close[offset]. Reversing those operands reverses the interpretation. The example states the comparison explicitly.
Does plotting the cloud forward use future prices?
No. The leading spans are calculated from known bars and drawn later on the chart. Conversely, a close drawn backward was not available at that earlier timestamp. Signal markers remain on the actual detection bar.
Does cloud thickness establish volatility or support strength?
It is the distance between two calculated spans. A thin or thick cloud does not itself establish future volatility, a probability of holding support or the best trade direction.
Is the combined condition more profitable than a TK cross?
No comparative performance is established here. Compare complete strategies with costs and reserved data before making that claim.
How do I check the example?
First align each plot and offset. Then compare current price with the spans drawn at that same bar, and inspect the actual detection time of alerts. Recreate saved alerts after changing inputs; delivery requires a separate live-data check.