同花顺撑压组合主图源码
在中线趋势形成后,股价会震荡走高,短期均线没有多大意义了只有5日和10日均线看短期走势,配合压力支撑线确定买卖点,附图短中期指标共振最好。这是最简单最好的主图指标。
IF(PERIODNAME== "日线")
nn=6;
ELSE IF(PERIODNAME== "周线")
nn=10;
ELSE IF(PERIODNAME== "月线")
nn=28;
ELSE IF(PERIODNAME== "季线")
nn=40;
ELSE IF(PERIODNAME== "年线")
nn=50;
ELSE IF(PERIODNAME== "60分钟")
nn=3.2;
ELSE IF(PERIODNAME== "30分钟")
nn=1.5;
ELSE IF(PERIODNAME== "15分钟")
nn=1.2 ;
ELSE IF(PERIODNAME== "5分钟")
nn=0.6;
ELSE IF(PERIODNAME== "1分钟")
nn=0.4;
ELSE
nn=60;
nm=nn*0.6;
XA1:=TROUGHBARS(2,nn,1);
xc:=COUNT(XA1==0,0);
xa2:=0;
IF(xa2[1]>0)
xa2:=xa2[1];
ELSE IF(XA1==0 AND REFX(&CLOSE,50)==NULL)
xa2:=xc;
t1:=XA1==0 AND xc==xa2;
t2:=XA1==0 AND xc>xa2;
DRAWLINE(t1,L,t2,L,1),colorff00ff,LINETHICK2;
X0A1:=PEAKBARS(1,nn,1);
x0c:=COUNT(X0A1==0,0);
x0a2:=0;
IF(x0a2[1]>0) x0a2:=x0a2[1];
ELSE IF(X0A1==0 AND REFX(&CLOSE,50)==NULL)
x0a2:=x0c;
t01:=X0A1==0 AND x0c==x0a2;
t02:=X0A1==0 AND x0c>x0a2 AND REFX(&CLOSE,2)>0.01;
DRAWLINE(t01,H,t02,H,1),colorff00ff,LINETHICK2;
YA1:=TROUGHBARS(2,nm,1);
YC:=COUNT(YA1==0,0);
YA2:=0;
IF(YA2[1]>0)
YA2:=YA2[1];
ELSE IF(YA1==0 AND REFX(&CLOSE,30)==NULL)
YA2:=YC;
U1:=YA1==0 AND YC==YA2;
U2:=YA1==0 AND YC>YA2;
DRAWLINE(U1,L,U2,L,1),coloraa8888,LINETHICK2;
Y0A1:=PEAKBARS(1,nm,1);
Y0c:=COUNT(Y0A1==0,0);
Y0a2:=0;
IF(Y0a2[1]>0) Y0a2:=Y0a2[1];
ELSE IF(Y0A1==0 AND REFX(&CLOSE,30)==NULL)
Y0a2:=Y0c;
U01:=Y0A1==0 AND Y0c==Y0a2;
U02:=Y0A1==0 AND Y0c>Y0a2 AND REFX(&CLOSE,2)>0.01;
DRAWLINE(U01,H,U02,H,1),coloraa8888,LINETHICK2;
MA$5:MA(CLOSE, 5);
MA$10:MA(CLOSE, 10);
中期趋势线:MA(CLOSE, 40);