MID:EMA(C,20),LINETHICK1,COLORwhite;
UPPER:MID + 2*STD(C,20),LINETHICK1,COLORRED;
LOWER:MID - 2*STD(C,20),LINETHICK1,COLORRED;
H1:=EMA(SLOPE(CLOSE,34)*20+CLOSE,75);
H2:=EMA(CLOSE,8);
Var1d:=H2-H1;
a:=(3*c+l+o+h)/6;
b:=(20*a+19*ref(a,1)+18*ref(a,2)+17*ref(a,3)+16*ref(a,4)+15*ref(a,5)+14*ref(a,6)+13*ref(a,7)+12*ref(a,8)+11*ref(a,9)+10*ref(a,10)+9*ref(a,11)+8*ref(a,12)+7*ref(a,13)+6*ref(a,14)+5*ref(a,15)+4*ref(a,16)+3*ref(a,17)+2*ref(a,18)+ref(a,20))/210;
d:=ma(b,10);
持仓区:STICKLINE(b>d and Var1d>=0 , MID,MID,6,1 ), coloryellow ,linethick2;
副图
50;
VAR1:=LLV( LOW,34);
VAR2:=HHV(HIGH , 34);
SD:=100*(CLOSE-VAR1)/(VAR2-VAR1);
MSD:=MA(SD,3);
VAR3:=LLV(INDEXL,34);
VAR4:=HHV(INDEXH,34);
DP:=100*(INDEXC-VAR3)/(VAR4-VAR3);
大盘MSD:MA(DP,3),linethick3;