选股公式:
ZF:=C>REF(C,1)*1.03 AND C/REF(C,1)*1.05;
HS:=DYNAINFO(37)>0.03;
LB:=DYNAINFO(17)>1.5;
SZ:=FINANCE(40)/100000000<100;
YL:=FINANCE(30)>0;
XG:ZF AND HS AND LB AND SZ AND YL;
******************************************************
DMI 主图源码:
VAR1:=(C-LLV(L,13))/(HHV(H,13)-LLV(L,13))*100;
牛:=SMA(VAR1,7,1);
VAR2:=SMA(牛,5,1);
熊:=IF(CROSS(牛,VAR2) AND CROSS(MA(C,5),MA(C,13) AND 牛>50),VAR2*2,VAR2);
{DRAWBAND(牛,RGB(205,92,92),熊,RGB(28,134,238));}
N:=14;M:=6;
TRR:=EXPMEMA(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(REF(CLOSE,1)-LOW)),N);
HD :=HIGH-REF(HIGH,1);
LD :=REF(LOW,1)-LOW;
DMP:=EXPMEMA(IF(HD>0&&HD>LD,HD,0),N);
DMM:=EXPMEMA(IF(LD>0&&LD>HD,LD,0),N);
PDI:=DMP*100/TRR COLORMAGENTA;
MDI:=DMM*100/TRR COLORGREEN;
ADX:=EXPMEMA(ABS(MDI-PDI)/(MDI+PDI)*100,M);
ADXR:=EXPMEMA(ADX,M);
{STICKLINE(ADX>=ADXR,ADX,ADXR,3,0),COLOR800040;}
{STICKLINE(ADX<ADXR,ADX,ADXR,3,1),COLORGRAY;}
关注:=STICKLINE(BARSLAST(CROSS(MDI,PDI))<5 AND MDI>PDI AND ADX<ADXR AND MDI>ADXR*0.97,ADX,ADXR,2,0) COLORRED;
10;90;
FVAR1:=REF(CLOSE,2);
会员专用:= SMA(MAX(CLOSE-FVAR1,0),7,1)/SMA(ABS(CLOSE-FVAR1),7,1)*100,COLORYELLOW;
{一、PDI>MDI且趋势向上;二、ADX;ADXR在PDI及MDI中间金叉 }
走强:DRAWTEXT(CROSS(ADX,ADXR) AND PDI>MDI AND PDI>REF(PDI,1) AND ADX>REF(ADX,1) AND BETWEEN(ADX,MDI,PDI) AND ADXR>REF(ADXR,1),ADXR*0.98,'走强')*99,COLORYELLOW;
STICKLINE(CROSS(ADX,ADXR) AND PDI>MDI AND PDI>REF(PDI,1) AND ADX>REF(ADX,1) AND BETWEEN(ADX,MDI,PDI) AND ADXR>REF(ADXR,1)AND (ADXR*0.98),L,H*9,2,0),COLORGREEN;