The updated Ichimoku indicator that came with 8.1.5 update is wrong:
-
Chikou looks like it plots at the price from 26 bars ago and not the current price moved back 26 bars.
-
Tenkan-sen and Kijun-sen Plotting: Currently,
Values[0]
(Tenkan) andValues[1]
(Kijun) are plotted withnormalDisplacement
(which isMath.Abs(SpanDisplacement)
, default 26). This means they are plotted 26 bars into the past. Standard Ichimoku plots these lines at the current bar (i.e., with a displacement of0
). You might want to changeValues[0][normalDisplacement]
toValues[0][0]
andValues[1][normalDisplacement]
toValues[1][0]
. -
Indicator Calculation Start: The guard condition
if (CurrentBar <= Math.Max(Math.Max(ConversionPeriod, BasePeriod), LeadingSpanBPeriod) + totalLag)
inOnBarUpdate()
(and a similar one inOnRender()
) usestotalLag
. With default settings,totalLag
is 52. This means the indicator won’t start calculating/rendering untilCurrentBar
is greater than52 + 52 = 104
. A more typical approach is to start calculations as soon as enough data for the longest calculation period is available (i.e., whenCurrentBar >= LeadingSpanBPeriod - 1
). This late start might be intentional for some reason, but it’s worth noting.
I made these changes and now the indicator matches other platforms within a few ticks.