TT:=IF(ISLASTBAR,240/FROMOPEN,1);
NN:=120;
HH:=HHV(V*TT,NN);
LL:=LLV(V,NN);
最高:=CONST(HH);
最低:=CONST(LL);
RCC:=最高*0.9-(最高-最低)*0.5;
RHL:=RCC;
HLMAX:=最高;
HLMIN:=最低;
HLMN1:=(HLMAX+HLMIN)/2;
HLMN2:=HLMAX-HLMIN;
HLMN3:=(100-0)/2*1.3;
HLMN4:=(100-0)/1*1.3;
VARA2:=LLV(MA(LOW,3),3);
VARA3:=HHV(MA(HIGH,3),3);
KA:=(EMA((CLOSE-VARA2)/(VARA3-VARA2)*100,4)-50)*0.5+50;
DB:=EMA(0.667*REF(KA,1)+0.333*KA,2);
JJ:=3*KA-2*DB;
RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*(HLMN2/HLMN4+HLMN1);
K:SMA(RSV,3,1),LINETHICK2;
D:SMA(K,3,1),LINETHICK2;
J:3*K-2*D;
DRAWBAND(K,RGB(00,250,250),J,RGB(250,00,250));
((KA-HLMN3)*HLMN2/HLMN4+HLMN1),COLORRED,LINETHICK3;
((DB-HLMN3)*HLMN2/HLMN4+HLMN1),COLOR00FF00,LINETHICK3;
((JJ-HLMN3)*HLMN2/HLMN4+HLMN1),COLORWHITE,LINETHICK3;
关注:CROSS(((JJ-HLMN3)*HLMN2/HLMN4+HLMN1),((KA-HLMN3)*HLMN2/HLMN4+HLMN1));
慢慢买:(REF(关注,1) OR REF(关注,2) OR REF(关注,3)) AND CROSS(J,K);
DRAWTEXT(关注=1,((KA-HLMN3)*HLMN2/HLMN4+HLMN1),'★关注'),COLOR008080;
DRAWTEXT(慢慢买=1,J,'★慢慢买'),COLOR0000FF;
DDA:=MAX(MA(C,9),MA(C,55));
DDB:=MIN(MA(C,9),MA(C,55));
红持股:C DDA,COLORRED,NODRAW;
绿持币:C DDB,COLORGREEN,NODRAW;
黄观望:DDA =C AND C =DDB,COLORYELLOW,NODRAW;
限制:=LLV(J,550);
STICKLINE(C DDA,限制-HLMN1/8,限制,3,0),COLORRED,LINETHICK2;
STICKLINE(C DDB,限制-HLMN1/8,限制,3,0),COLORGREEN,LINETHICK2;
STICKLINE(DDA =C AND C =DDB,限制-HLMN1/8,限制,2,0),COLORYELLOW,LINETHICK2;