以下是通达信手九转序源码副图
A1:=C>REF(C,4);
NT:=BARSLASTCOUNT(A1);
TJ11:=REF(NT,1)=8 AND NT>REF(NT,1);
TJ12:=REF(BETWEEN(NT,5,8),1) AND NT<REF(NT,1);
TJ13:=ISLASTBAR AND BETWEEN(NT,6,8);
AY:=(BACKSET(TJ11>0,9) OR BACKSET(TJ12>0,NT+1)*0 OR BACKSET(TJ13>0,NT))*NT;
DRAWTEXT(AY>0,H*1.02,VAR2STR(AY,0)),COLORYELLOW;
DRAWTEXT(NT=9,H*1.02,'9'),COLORGREEN;