TS=(highest[9](high) + highest[9](low))/2
KS=(highest[26](high) + lowest[26](low))/2
SpanA= (ts+ks)/2
SpanB=(highest[52](high) + lowest[52](low))/2
Minspan=min(SpanA[26],SpanB[26])
Maxspan=max(spanA[26],SpanB[26])
// This checks for bullishsigns using Ichimoku
// A very strong bullish sign is when price is above TS,
// and price is above the Cloud,
// and SMA200 > cloud
a1= ts > ks
b1= close > maxspan
sma200 = Average[200](Close)
priceOverMA = Close > sma200
cloudOverMA = min(spanA[26], spanB[26]) > sma200
priceOverKS = Close > KS
Long = a1 AND b1 AND priceOverMA AND cloudOverMA AND priceOverKS
If long then
DRAWTEXT("☺", barindex,high+0.02*high,SansSerif,Bold,16)coloured(0,300,0)
endif
// This checks for bearish signs using Ichimoku
// A very strong bearish sign is when price is bellow TS,
// and price is bellow the Cloud,
// and SMA200 > cloud
TS=(highest[9](high) + highest[9](low))/2
KS=(highest[26](high) + lowest[26](low))/2
a3= ts < ks
SpanA= (ts+ks)/2
SpanB=(highest[52](high) + lowest[52](low))/2
Minspan=min(spanA[26],SpanB[26])
b3= close < minspan
sma200 = Average[200](Close)
priceUnderMA = sma200 > Close
cloudUnderMA = max(spanA, spanB) < sma200
priceUnderKS = Close < KS
short = a3 AND b3 AND priceUnderMA AND cloudUnderMA AND priceUnderKS
If Short then
DRAWTEXT("☻", barindex,low-Low*0.02,SansSerif,Bold,16)coloured(255,0,0)
endif
RETURN