以下是同花顺实战指标源码
同花顺实战指标源码
创于实战,未必实用,自行判断吧。
MAi60:=MA(INDEXC,60);phx:0;
gwgd:=REF(mai60,1)>MAX(REF(mai60,2),MAi60);
dwgd:=REF(mai60,1)<MIN(REF(mai60,2),MAi60);
ng:=BARSLAST(gwgd);
nd:=BARSLAST(dwgd);
n:=IF(REF(MAi60,1)>MAi60,Ng+1,Nd+1);
MA3:=(5*C+2*H+2*L+O)/10;
MAi3:=(5*INDEXC+2*INDEXH+2*INDEXL+INDEXO)/10;
Hi:=100*(MA3-REF(MA3,n))/REF(MA3,n);
Hj:=100*(MAi3-REF(MAi3,n))/REF(MAi3,n);
Hk:SMA(Hi-Hj,2,1),COLORSTICK;
zdfgu:IF(REF(MAi60,1)>MAi60,100*(MA3-REF(MA3,Ng+1))/REF(MA3,Ng+1),100*(MA3-REF (MA3,Nd+1))/REF(MA3,Nd+1));
zdfdp:IF(REF(MAi60,1)>MAi60,100*(MAi3-REF(MAi3,Ng+1))/REF(MAi3,Ng+1),100*(MAi3-REF (MAi3,Nd+1))/REF(MAi3,Nd+1));
FILLRGN(zdfgu,zdfdp,zdfgu>=zdfdp,RGB(150,0,150),zdfgu<zdfdp,RGB(0,0,120));