通达信公式
{M 1 30 3}
VAR1N:=1990131;
U1:=IF((DATE <= VAR1N),1,0);
TR1:=SUM(MAX(MAX((HIGH - LOW),ABS((HIGH - REF(CLOSE,1)))),ABS((LOW - REF(CLOSE,1)))),5);
HD:=(HIGH - REF(HIGH,1));
LD:=(REF(LOW,1) - LOW);
DMP:=(SUM(IF(((HD > 0) AND (HD > LD)),HD,0),5) * U1);
DMM:=SUM(IF(((LD > 0) AND (LD > HD)),LD,0),5);
神偷线1:=(((DMP * U1) * 100) / TR1),NODRAW;
辅助线:=((DMM * 100) / TR1);
动向趋势线:=(MA(((ABS((辅助线 - 神偷线1)) / (辅助线 + 神偷线1)) * 100),M) * U1);
ADXR:=((动向趋势线 + REF(动向趋势线,M)) / 2);
VAR1:=MA(LOW,1);
VAR2:=MA(HIGH,2);
VAR3:=MA(CLOSE,2);
VAR7:=REF(VAR3,1);
【强弱】:=((SMA(MAX((VAR3 - VAR7),0),5,1) / SMA(ABS((VAR3 - VAR7)),5,1)) * 100);
短底:5,LINETHICK2,COLORFF3300;
短顶:43,COLORGREEN;
绝顶:60,LINETHICK2,COLORFF00FF;
STICKLINE(神偷线1<=短底,神偷线1,短底,1,-1),COLOR997700;
STICKLINE(神偷线1>=短顶,神偷线1,短顶,1,-1),COLOR779900;
STICKLINE(神偷线1>=绝顶,神偷线1,绝顶,1,-1),COLOR0033FF;
神偷线:神偷线1,COLOR00FFFF;
预警:(IF(((动向趋势线 > 88) AND (神偷线1 < 5.8)),20,0) * U1),LINETHICK1,COLORFF00FF;
VAR22:=(2*CLOSE+HIGH+LOW)/4;
VAR33:=IF(YEAR>=2099 AND MONTH>2,0,1);
VAR4:=LLV(LOW,5);
VAR5:=HHV(HIGH,4);
散户: EMA((VAR22-VAR4)/(VAR5-VAR4)*100,4)*VAR33;
庄家: EMA(0.667*REF(散户,1)+0.333*散户,2)*VAR33;
DRAWTEXT(CROSS(散户,庄家) AND 散户<50 AND 29<散户,20,'短快进'),COLOR00FF00;
DRAWTEXT(CROSS(庄家,散户) AND 散户>40 AND 71>散户,50,'短快出'),COLOR00FFFF;
DRAWTEXT(CROSS(散户,庄家) AND 散户<30,0,'逢低吸'),COLOR3399CC;
DRAWTEXT(CROSS(庄家,散户) AND 散户>70,75,'逢高减'),COLORFFFF33;
DRAWICON(CROSS(散户,庄家) AND 散户<30,20,1);
DRAWICON(CROSS(庄家,散户) AND 散户>70,80,2);
VAR9:=CLOSE-REF(CLOSE,5);
VARA:=EMA(EMA(VAR9,5),5)/EMA(EMA(ABS(VAR9),5),5)*100;
VARC:=EMA(EMA(VAR9,20),20)/EMA(EMA(ABS(VAR9),20),20)*100;
卖出: IF(VARA>0 AND CROSS(VARC,VARA),70,80);
DRAWTEXT(VARA>0 AND CROSS(VARC,VARA),70,'中线逃吧!'),COLOR0033FF;
DRAWICON(卖出<0,80,2);