通达信副图指标螺旋法则源码
VAR1:=(HHV(HIGH,21)-CLOSE)/(HHV(HIGH,21)-LLV(LOW,21))*100-10;
VAR2:=(CLOSE-LLV(LOW,21))/(HHV(HIGH,21)-LLV(LOW,21))*100;
VAR3:=Sma(VAR2,13,5);
VAR4:=BARSCOUNT(CLOSE)*3.1415926/180;
VAR5:=SMA(VAR3,13,8),COLORWHITE;
VAR6:=SMA(VAR1,21,8),COLORCYAN;
VAR7:=ema(200*(HHV(HIGH,34)-CLOSE)/(HHV(HIGH,34)-LLV(LOW,34)),4);
IF(VAR7>=160,200,DRAWNULL),COLORWHITE;
IF(VAR7<160,200,DRAWNULL),COLORCYAN;
T1:SIN(VAR4*8)*100+100,COLORRED;
IF(T1<=REF(T1,1),T1,DRAWNULL),COLORLIBLUE,LINETHICK1;
T2:COS(VAR4*8)*100+100,COLORFF8080,LINETHICK4,POINTDOT;
IF(T2<=REF(T2,1),T2,DRAWNULL),COLORLIBLUE,LINETHICK4,POINTDOT;
IF(VAR5>VAR6,0,DRAWNULL),COLORCYAN;
IF(VAR5<VAR6,0,DRAWNULL),COLORWHITE;