aamin:min(OPEN,close),LINETHICK0;
bbmin:min(ref(OPEN,1),ref(close,1)),LINETHICK0;
ccmin:min(ref(OPEN,2),ref(close,2)),LINETHICK0;
aamax:max(OPEN,close),LINETHICK0;
bbmax:max(ref(OPEN,1),ref(close,1)),LINETHICK0;
ccmax:max(ref(OPEN,2),ref(close,2)),LINETHICK0;
COND1:(aamax>=bbmax and aamin<=bbmin) or (aamax<=bbmax and aamin>=bbmin) or (aamax>=bbmax and aamin<=bbmax) or (aamax>=bbmin and aamin<=bbmin) ;
COND2:(aamax>=ccmax and aamin<=ccmin) or (aamax<=ccmax and aamin>=ccmin) or (aamax>=ccmax and aamin<=ccmax) or (aamax>=ccmin and aamin<=ccmin) ;
cond:ref(COND1 and COND2,1);