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),COLORWHITE,LINETHICK3;
((DB-HLMN3)*HLMN2/HLMN4+HLMN1),COLOR00FF00,LINETHICK3;
((JJ-HLMN3)*HLMN2/HLMN4+HLMN1),COLORRED,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),'★'),COLORFF0080;
DRAWTEXT(慢慢买=1,J,'买'),COLOR0000FF;
DDA:=MAX(MA(C,9),MA(C,55));
DDB:=MIN(MA(C,9),MA(C,55));
红持股:C>DDA,COLORWHITE,NODRAW;
绿持币:C<DDB,COLORCYAN,NODRAW;
黄观望:DDA>=C AND C>=DDB,COLORBLUE,NODRAW;
限制:=LLV(J,550);
STICKLINE(C>DDA,限制-HLMN1/8,限制,3,0),COLORWHITE,LINETHICK2;
STICKLINE(C<DDB,限制-HLMN1/8,限制,3,0),COLORCYAN,LINETHICK2;
STICKLINE(DDA>=C AND C>=DDB,限制-HLMN1/8,限制,2,0),COLORBLUE,LINETHICK2;