Kijun Trend Indicator for ThinkorSwim



New member
I've found using the Ichimoku can get me cross eyed sometimes, but I've found the Kijun specifically to be very powerful. This in tandem with it's little brother, the Tenkan, can give a good eye on trend. Here's a simple code for "KijunTrend". Hope someone finds it useful!

I do use this along with TPOProfile, volume and a custom candlestick indicator to just visually show the specific candles which I feel give a higher probability regarding future direction than others..... but here's the KijunTrend code.

*I will "hide" the Tenkan and Set as Default when viewing on the chart.

input price = close;
input tenkan_period = 9;
input kijun_period = 26;
input displace = 0;

plot Tenkan = (Highest(high, tenkan_period) + Lowest(low, tenkan_period)) / 2;
plot Kijun = (Highest(high, kijun_period) + Lowest(low, kijun_period)) / 2;
Kijun.DefineColor("Up", Color.GREEN);
Kijun.DefineColor("Down", Color.RED);
Kijun.DefineColor("Even", Color.WHITE);
Kijun.AssignValueColor(if Kijun > Tenkan then Kijun.Color("Down") else (if Kijun == Tenkan then Kijun.Color("Even") else Kijun.Color("Up")));
Last edited by a moderator:


Well-known member
You do know your Tenkan and Kijun are the same calculation. How is the Kijun then more powerful?


New member
Period length. Same line of thinking as slower v faster moving averages. It was more speaking to (what could be seen as) confusion looking at an entire Ichimoku Cloud vs Kijun specifically. The Kijun line itself can serve as very liable Support/Resistance (vs a more unreliable Tenkan), and also the trend factor (Tenkan > Kijun or Tenkan < Kijun) gives a better picture of market flow in the terms of uptrend/downtrend).