Kijun Trend Indicator for ThinkorSwim

J

JJSPX

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.

Code:
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")));
Kijun.SetLineWeight(3);
 
Last edited by a moderator:
horserider

horserider

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

JJSPX

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).
 
C

CreaitiveFreedom

New member
Thanks for posting. I was looking for an isolated Kijun.
 
J

JJSPX

New member
Here's an additional (slightly tweaked) bit of code, in case you find it useful. It's the same code, but calls to a higher time frame. You can have a 30min chart up, but have higher time frame (1hr, 4hr, daily, etc) Kijun levels printed on the chart. I've found the Kijun levels to be great, especially when they align with Market Profile.

==============================================================

input Period = aggregationPeriod.DAY;
def close = close(period = Period);
def high = high(period = Period);
def open = open(period = Period);
def low = low(period = Period);

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")));
Kijun.SetLineWeight(3);
 
A

asragov

New member
2019 Donor
VIP
@JJSPX What "Market Profile" are you referring to, that you compare with this indicator?
 

Similar threads

Top