一个EXP加DMI的公式
条件: EXP1大于EXP2 股价回踩EXP1或回踩EXP2且收阳线。
DMI中的PDI大于MDI且ADX上涨。
EXP1:=EMA(CLOSE,12);
EXP2:=EMA(CLOSE,50);
平衡线:=MIN(EXP1,EXP2);
TRr := SUM(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(LOW-REF(CLOSE,1))),6);
HD := HIGH-REF(HIGH,1);
LD := REF(LOW,1)-LOW;
DMP:= SUM(IF(HD>0 AND HD>LD,HD,0),14);
DMM:= SUM(IF(LD>0 AND LD>HD,LD,0),14);
PDI:=DMP*100/TRr;
MDI:=DMM*100/TRr;
ADX:=MA(ABS(MDI-PDI)/(MDI+PDI)*100,6);
ADXR:=(ADX+REF(ADX,6))/2;
XG1:(CROSS(平衡线,L) AND C>平衡线) OR REF(CROSS(平衡线,L),1) AND CROSS(C,平衡线) AND EXP1>EXP2 AND pdi>mdi AND adx>REF(adx,1);
833199533.PNG
|