九毛八公式指标
公式模块:
指标公式:
N:=7;
M:=6;
TR1:= 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 && HD>LD,HD,0),N,1);
DMM:= SMA(IF(LD>0 && LD>HD,LD,0),N,1);
pdi:= DMP*100/TR1;
mdi:= DMM*100/TR1;
STICKLINE(PDI>=MDI,PDI-MDI,0,2,1),COLORRED;
STICKLINE(PDI<MDI,PDI-MDI,0,2,1),COLORGREEN;
ADX: SMA(ABS(MDI-PDI)/(MDI+PDI)*100,N,1);
ADXR:=(ADX+REF(ADX,M))/2;
DRAWBAND(ADX,RGB(200,0,200),ADXR,RGB(150,150,150));
ADX2:EXPMEMA(ABS(MDI-PDI)/(MDI+PDI)*100,M),COLOR00EEEE,LINETHICK1;
ADXR2:EXPMEMA(ADX,M),COLORFFFFFF,LINETHICK1;
关注线:=50,COLORF0F000,POINTDOT;
IF(ADX>=ADXR,85,DRAWNULL),COLORF580F5,LINETHICK8;
IF(ADX<ADXR,85,DRAWNULL),COLORCCDD66,LINETHICK6;
IF(PDI>=MDI,-55,DRAWNULL),COLOR0000EE,LINETHICK8;
IF(PDI<MDI,-55,DRAWNULL),COLOR33AA33,LINETHICK6;
求老师改成大智慧付图和在第一次出现红柱的地方做一个选股,谢谢老师了!
N:=7;
M:=6;
TR1:= 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/TR1;
MDI:= DMM*100/TR1;
STICKLINE(PDI>=MDI,PDI-MDI,0,5,1),COLORRED;
STICKLINE(PDI<MDI,PDI-MDI,0,5,1),COLORGREEN;
0;
ADX: SMA(ABS(MDI-PDI)/(MDI+PDI)*100,N,1);
ADXR:=(ADX+REF(ADX,M))/2;
FILLRGN(ADX,ADXR,ADX>ADXR,RGB(200,0,200),ADX<ADXR,RGB(150,150,150));
ADX2:EMA(ABS(MDI-PDI)/(MDI+PDI)*100,M),COLOR00EEEE,LINETHICK1;
ADXR2:EMA(ADX,M),COLORFFFFFF,LINETHICK1;
PARTLINE(85,ADX>=ADXR,RGB(250,90,250),ADX<ADXR,RGB(0,150,150)),LINETHICK6;
PARTLINE(-55,PDI>=MDI,RGB(200,0,0),PDI<MDI,RGB(50,200,50)),LINETHICK6;
===========================================================================
N:=7;
M:=6;
TR1:= 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/TR1;
MDI:= DMM*100/TR1;
crOSS(PDI>=MDI,0.5);