大智慧多周期MACD叠加指标公式 大智慧指标公式源码
DRAWGBKLAST(C,STRIP(RGB(40,100,100),RGB(100,80,60),0));
DIF_15F:="MACD.DIFF#MIN15";
DEA_15F:="MACD.DEA#MIN15";
MACD_15F:="MACD.MACD#MIN15";
DIF_30F:="MACD.DIFF#MIN30";
DEA_30F:="MACD.DEA#MIN30";
MACD_30F:="MACD.MACD#MIN30";
DIF_60F:="MACD.DIFF#MIN60";
DEA_60F:="MACD.DEA#MIN60";
MACD_60F:="MACD.MACD#MIN60";
DIF_R:="MACD.DIFF#DAY";
DEA_R:="MACD.DEA#DAY";
MACD_R:="MACD.MACD#DAY";
DP_MDF15:=STKINDI('SZ000001','MACD.MACD#MIN15',26,12,9);
DP_MDF30:=STKINDI('SZ000001','MACD.MACD#MIN30',26,12,9);
DP_MDF60:=STKINDI('SZ000001','MACD.MACD#MIN60',26,12,9);
DP_MDR:=STKINDI('SZ000001','MACD.MACD#DAY',26,12,9);
DPMACD:=STKINDI('SZ000001','MACD.MACD',26,12,9);
DPDIF:=STKINDI('SZ000001','MACD.DIFF',26,12,9);
DPDEA:=STKINDI('SZ0001','MACD.DEA',26,12,9);
DIF:EMA(C,12)-EMA(C,26),COLOR0000FF,LINETHICK0;
DEA:EMA(DIF,9),COLORFFF000,LINETHICK0;
MACD:2*DIF-2*DEA, COLORSTICK;
小DIF1:IF(DATATYPE=7,DIF_15F,IF(DATATYPE=8,DIF_30F,IF(DATATYPE=9,DIF_60F,DIF))),LINETHICK0;
小DEA1:IF(DATATYPE=7,DEA_15F,IF(DATATYPE=8,DEA_30F,IF(DATATYPE=9,DEA_60F,DEA))),LINETHICK0;
小DPMD1:IF(DATATYPE=7,DP_MDF15,IF(DATATYPE=8,DP_MDF30,IF(DATATYPE=9,DP_MDF60,DPMACD))),LINETHICK0;
小DIF2:IF(DATATYPE=6,DIF_15F,IF(DATATYPE=7,DIF_30F,IF(DATATYPE=8,DIF_60F,IF(DATATYPE=9,DIF_R,DIF)))),LINETHICK0;
小DEA2:IF(DATATYPE=6,DEA_15F,IF(DATATYPE=7,DEA_30F,IF(DATATYPE=8,DEA_60F,IF(DATATYPE=9,DEA_R,DEA)))),LINETHICK0;
小DPMD2:IF(DATATYPE=6,DP_MDF15,IF(DATATYPE=7,DP_MDF30,IF(DATATYPE=8,DP_MDF60,IF(DATATYPE=9,DP_MDR,DPMACD)))),LINETHICK0;
FILLRGN(DIF,DEA,DIF>DEA),color330066;
FILLRGN(DIF,DEA,DIF<=DEA),COLORGRAY;
FILLRGN(小DIF2,小DEA2,C),colorAA1122;
FILLRGN(小DIF2,小DEA2,小DIF2<=小DEA2),COLOR002200;
DRAWTEXTABS(5,5,''),linethick1,COLOR00EEff;
STICKLINE(MACD>0,-0,MACD,2.5,0),COLOR400055;
STICKLINE(MACD>0,-0,MACD,2,0),COLOR400066;
STICKLINE(MACD>0,-0,MACD,1.5,0),COLOR400077;
STICKLINE(MACD>0,-0,MACD,1,0),COLOR400088;
STICKLINE(MACD>0,-0,MACD,0.5,0),COLOR400099;
STICKLINE(MACD<=REF(MACD,1) AND MACD>0,-0,MACD,2.5,0),COLOR888888;
STICKLINE(MACD<=REF(MACD,1) AND MACD>0,-0,MACD,2,0),COLOR999999;
STICKLINE(MACD<=REF(MACD,1) AND MACD>0,-0,MACD,1.5,0),COLORAAAAAA;
STICKLINE(MACD<=REF(MACD,1) AND MACD>0,-0,MACD,1,0),COLORBBBBBB;
STICKLINE(MACD<=REF(MACD,1) AND MACD>0,-0,MACD,0.5,0),COLORCCCCCC;
STICKLINE(MACD<=REF(MACD,1) AND MACD<0,-0,MACD,2.5,0),COLOR555500;
STICKLINE(MACD<=REF(MACD,1) AND MACD<0,-0,MACD,2,0),COLOR666600;
STICKLINE(MACD<=REF(MACD,1) AND MACD<0,-0,MACD,1.5,0),COLOR777700;
STICKLINE(MACD<=REF(MACD,1) AND MACD<0,-0,MACD,1,0),COLOR888800;
STICKLINE(MACD<=REF(MACD,1) AND MACD<0,-0,MACD,0.5,0),COLOR999900;
STICKLINE(MACD>REF(MACD,1) AND MACD<0,-0,MACD,2.5,0),COLOR1155BB;
STICKLINE(MACD>REF(MACD,1) AND MACD<0,-0,MACD,2,0),COLOR2266CC;
STICKLINE(MACD>REF(MACD,1) AND MACD<0,-0,MACD,1.5,0),COLOR3377DD;
STICKLINE(MACD>REF(MACD,1) AND MACD<0,-0,MACD,1,0),COLOR4488EE;
STICKLINE(MACD>REF(MACD,1) AND MACD<0,-0,MACD,0.5,0),COLOR5599FF;
PARTLINE(DEA,1),COLORFFF000,LINETHICK1,LAYER0;
PARTLINE(DIF,1),COLORFFFFFF,LINETHICK1,LAYER0;
PARTLINE(DIF,DIF>REF(DIF,1)),COLORRED,LINETHICK1,LAYER0;
PARTLINE(0,DPMACD<0 AND DPDIF>REF(DPDIF,1)),COLORFFFFFF,LINETHICK2,LAYER0;
PARTLINE(0,DPMACD>0),COLOR00FFFF,LINETHICK2,LAYER0;
PARTLINE(0,DPMACD>0 AND DPDIF>REF(DPDIF,1)),COLOR0000FF,LINETHICK2,LAYER0;
PARTLINE(小DIF2,1),COLORAA1144,LINETHICK2,LAYER0;
PARTLINE(小DEA2,1),COLORFFF000,DOTLINE,LINETHICK1,LAYER0;
PARTLINE(小DEA2,1),COLORC050DD,CIRCLEDOT,LINETHICK2,LAYER0;
PARTLINE(小DEA2,小DPMD2>0),COLORGREEN,LINETHICK2,CIRCLEDOT,LAYER0;
PARTLINE(小DIF1,1),COLOR00FFFF,LAYER0;
PARTLINE(小DEA1,1),COLOR00FF00,LAYER0;
PARTLINE(小DEA1,小DPMD1>0),COLOR0000FF,LAYER0;