
tj1:=ref(close,1)>ref(high,2);
tj2:=ref(close,1)<ref(low,2);
tj3:=ref(close,1)>ref(low,2) and ref(close,1)<ref(high,2);
hh:=max(ref(high,1),ref(high,2));
ll:=min(ref(low,1),ref(low,2));
tj4:=tj3 and close>hh;
tj5:=tj3 and close<ll;
tj6:=close>=ll and close<=hh;
hhh:=max(hh,high);
lll:=min(ll,low);
tj7:=tj6 and close<hhh;
tj8:=tj6 and close>lll;
red:=tj1 or tj4 or tj7;
green:=tj2 or tj5 or tj8;
stickline(red,c,o,8,0),color0000aa;
stickline(red,c,o,5,0),color0000cc;
stickline(red,c,o,3,0),color0000dd;
stickline(red,h,l,0,0),color0000ff;
stickline(green,c,o,8,0),color998855;
stickline(green,c,o,5,0),colorbbaa77;
stickline(green,c,o,3,0),colorddcc99;
stickline(green,l,h,0,0),colorffeebb;