This market screener searches for the best configurations in the context of stock picking with the ichimoku indicator.
This version searches for downtrending stocks.
//bereken TenkanSen en KijunSen
TS=(highest[9](high) + lowest[9](low))/2
KS=(highest[26](high) + lowest[26](low))/2
//Positie t.o.v. TS en KS
a3= ts < ks
a4=ts crosses under ks
//SpanA en SpanB
SpanA= (ts+ks)/2
SpanB=(highest[52](high) + lowest[52](low))/2
//SpanA en SpanB huidige waarde
Minspan=min(spanA[26],SpanB[26])
//Condities voor de positie van de toekomstige SpanA en SpanB
a7=spana<spanb
a8=spana crosses under spanb
//Condities voor de huidige positie van de SpanA en SpanB
b3=close<minspan
b4=close crosses under minspan
//Positie van de achter gebleven lijn (chikouSpan)
minspanlag=min(spana[52],spanb[52])
b7=close< minspanlag
b8= close crosses under minspanlag
//short
cshort1=a4 and a7 and b3 and b7
cshort2=a3 and a8 and b3 and b7
cshort3= a3 and a7 and b4 and b7
cshort4= a3 and a7 and b3 and b8
//actie
Short= cshort1 or cshort2 or cshort3 or cshort4
//Screen
SCREENER [short](short as"short")