九毛八公式指标
公式模块:
TR:=SMA(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(LOW-REF(CLOSE,1))),N,1);
HD:=HIGH-REF(HIGH,1);
LD:=REF(LOW,1)-LOW;
DMP:=SMA(IF(HD>0 AND HD>LD,HD,0),N,1);
DMM:=SMA(IF(LD>0 AND LD>HD,LD,0),N,1);
pdi:DMP*100/TR,COLORRED;
mdi:DMM*100/TR,COLORYELLOW;
ADX:SMA(ABS(MDI-PDI)/(MDI+PDI)*100,N,1),COLORGREEN;
ADXR:=(ADX+REF(ADX,6))/2,COLOR66FF66;
DRAWTEXT(crOSS(PDI,MDI)AND PDI>ADX,PDI,'火箭');
DRAWTEXT(CROSS(MDI,PDI)AND MDI>ADX,MDI,'炸弹');
条件:PDI上穿MDI的地方加一个红箭头,MDI死叉PDI加一个绿色的箭头,谢谢了
TR:=SMA(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(LOW-REF(CLOSE,1))),N,1);
HD:=HIGH-REF(HIGH,1);
LD:=REF(LOW,1)-LOW;
DMP:=SMA(IF(HD>0 AND HD>LD,HD,0),N,1);
DMM:=SMA(IF(LD>0 AND LD>HD,LD,0),N,1);
PDI:DMP*100/TR,COLORRED;
MDI:DMM*100/TR,COLORYELLOW;
ADX:SMA(ABS(MDI-PDI)/(MDI+PDI)*100,N,1),COLORGREEN;
ADXR:=(ADX+REF(ADX,6))/2,COLOR66FF66;
DRAWTEXT(CROSS(PDI,MDI)AND PDI>ADX,PDI,'火箭');
DRAWTEXT(CROSS(MDI,PDI)AND MDI>ADX,MDI,'炸弹');
DRAWICON(CROSS(PDI,MDI),PDI,1);
DRAWICON(CROSS(MDI,PDI),PDI,2);