// Ichimoku Follow Patterns | Oscillator
// 21/04/2019 (Release 1.0)
// Swapping @ http://www.forexswap.fr
// Sharing ProRealTime knowledge (alt+16)
// — Property settings
Katana = 1 //(1=true, 0=false)
Daisho = 1 //(1=true, 0=false)
Twist = 1 //(1=true, 0=false)
TenKij = 1 //(1=true, 0=false)
// — end
Tenkansen1 = (highest[9](high)+lowest[9](low))/2
Kijunsen1 = (highest[26](high)+lowest[26](low))/2
SenkouSA = (Tenkansen1[26]+Kijunsen1[26])/2
SenkouSB = (highest[52](High[26])+lowest[52](Low[26]))/2
if katana then
Pattern1 = summation[2](Tenkansen1 = Kijunsen1) = 2 // Katana (2 candles follower)
endif
if daisho then
Pattern2 = summation[3](Tenkansen1 = Kijunsen1) = 3 // Daisho (3 candles follower)
endif
if twist then
Pattern3 = SenkouSA crosses over SenkouSB or SenkouSA crosses under SenkouSB // Twist crossing
endif
if tenkij then
Pattern4 = Tenkansen1 crosses over Kijunsen1 or Tenkansen1 crosses under Kijunsen1 // Tenkan crossing Kijun
if Tenkansen1 crosses over Kijunsen1 then
r1=255
g1=0
elsif Tenkansen1 crosses under Kijunsen1 then
r1=0
g1=255
endif
endif
if close > close[1] then // Katana bullish green
r = 0
g = 180
else // Katana bearish red
r = 180
g = 0
endif
return Pattern1/1 coloured(r,g,0) style(histogram,1) as"Katana", Pattern2/1.75 coloured(250,160,0) style(histogram,1)as"Daisho", Pattern3/2 coloured(0,160,250) style(histogram,1) as"Twist", Pattern4/-1.75 coloured(r1,g1,0) style(histogram,1) as"Ten/Kij"