N:=60;
K:=3;
VAR1:=LLV(LOW,N);
VAR2:=HHV(HIGH,N);
SD:=((100 * (CLOSE - VAR1)) / (VAR2 - VAR1));
MSD:MA(SD,K),COLORRED;
VAR3:=LLV(INDEXL,N);
VAR4:=HHV(INDEXH,N);
DP:=((100 * (INDEXC - VAR3)) / (VAR4 - VAR3));
大盘MSD:MA(DP,K),COLORGREEN;
弱势线:20,COLORGREEN;
强势线:50,COLORMAGENTA;