K:=(C+H+L)/3;
D:=MA(K,4);
AA:D,COLORWHITE,LINETHICK2;
AB:HHV(D,13),COLORRED,LINETHICK2;
AC:LLV(D,8),COLORYELLOW,LINETHICK2;
A:MA(C,34);
B:HHV(A,2),COLORCYAN;
E:IF(A<B,(A-(B-A)),B),COLORRED;
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;
{说明:1、满足条件的前5天不出信号。2、第六天满足条件时便出信号,并且将前5天的信号都显示出来。3、如果第7天不满足条件,则前6天信息都消失。4、如果9天都满足条件,则一直显示信号。}
15145331C-0.jpg
|