操盘主图 线性顶底 韵律图 自用macd-pyj鲁南老师几个指标
macd
A:=(HIGH+LOW+5*CLOSE+OPEN)/8;
DIF:(EMA(A,14)-REF(EMA(A,38),1))/(1+EMA(ABS(A),99.5))*1000,COLOR00FFFF;
DEA:SMA(DIF,5,3),COLOR00FF00,LINETHICK1;
MACD:=(DIF-DEA)*3;
KDF:SMA(DIF,2,1),COLORFF00FF;
DDF:SMA(KDF,2,1),COLORFFFFFF;
JDF:3*KDF-2*DDF,COLORBLUE,LINETHICK2;
IF(JDF>REF(JDF,1),JDF,DRAWNULL),COLORRED,LINETHICK2;
IF(JDF<REF(JDF,1),JDF,DRAWNULL),COLORBLUE,LINETHICK2;
D2:=MACD,VOLSTICK;
STICKLINE(D2>=0,D2,0,1,0),COLORA20051;
STICKLINE(D2>=0,D2,0,0.6,0),COLORBF0060;
STICKLINE(D2>=0,D2,0,0.3,0),COLORDD006F;{紫}
STICKLINE(D2<0,D2,0,1,0),COLOR009797;
STICKLINE(D2<0,D2,0,0.6,0),COLOR00B5B5;
STICKLINE(D2<0,D2,0,0.3,0),COLOR00D2D2;{暗黄}
STICKLINE(D2<REF(D2,1) AND D2>0,0,D2,1,0 ),COLORA2A2A2;
STICKLINE(D2<REF(D2,1) AND D2>0,0,D2,0.6,0 ),COLORBFBFBF;
STICKLINE(D2<REF(D2,1) AND D2>0,0,D2,0.3,0 ),COLORDDDDDD;{灰}
STICKLINE(D2<=REF(D2,1) AND D2<0,0,D2,1,0 ),COLORA25100;
STICKLINE(D2<=REF(D2,1) AND D2<0,0,D2,0.6,0 ),COLORBF6000;
STICKLINE(D2<=REF(D2,1) AND D2<0,0,D2,0.3,0 ),COLORDD6F00;{蓝};
2韵律图
A:=EMA((4*C+O+H+L)/7,2);
乖离:(A-EMA(A,89))/EMA(A,421)*500,COLORGREEN,LINETHICK2;
均离:EMA(乖离,5),COLORF000F0;
IF(乖离>=REF(乖离,1),乖离,DRAWNULL),COLORRED,LINETHICK2;
IF(乖离<REF(乖离,1),乖离,DRAWNULL),COLORGREEN,LINETHICK2;
D1:EMA(乖离,3),COLOR00F2F2;
D2:=1.5*(乖离-均离), COLORSTICK,LINETHICK1;
STICKLINE(D2>=0,D2,0,1,0),COLORA20051;
STICKLINE(D2>=0,D2,0,0.6,0),COLORBF0060;
STICKLINE(D2>=0,D2,0,0.3,0),COLORDD006F;{紫}
STICKLINE(D2<0,D2,0,1,0),COLOR009797;
STICKLINE(D2<0,D2,0,0.6,0),COLOR00B5B5;
STICKLINE(D2<0,D2,0,0.3,0),COLOR00D2D2;{暗黄}
STICKLINE(D2<REF(D2,1) AND D2>0,0,D2,1,0 ),COLORA2A2A2;
STICKLINE(D2<REF(D2,1) AND D2>0,0,D2,0.6,0 ),COLORBFBFBF;
STICKLINE(D2<REF(D2,1) AND D2>0,0,D2,0.3,0 ),COLORDDDDDD;{灰}
STICKLINE(D2<=REF(D2,1) AND D2<0,0,D2,1,0 ),COLORA25100;
STICKLINE(D2<=REF(D2,1) AND D2<0,0,D2,0.6,0 ),COLORBF6000;
STICKLINE(D2<=REF(D2,1) AND D2<0,0,D2,0.3,0 ),COLORDD6F00;{蓝}
上限:HHV(MA(乖离,2),18),COLORFF2626;
下限:LLV(MA(乖离,2),18),COLORFF2626;
强弱:(上限+下限)/2,COLORFFFF20;
3 线性顶底
A:=(5*C+H+L+O)/8;
H1:=REF(HIGH,2);
L1:=REF(LOW,2);
D1:=HIGH>H1 AND LOW>=L1 AND A>REF(A,1);
D11:=HIGH>H1 AND LOW>=L1 AND A<=REF(A,1);
D2:=LOW<L1 AND HIGH<H1;
D3:=HIGH>H1 AND LOW<L1 AND A>REF(A,1);
D31:=HIGH>H1 AND LOW<L1 AND A<=REF(A,1);
D4:=HIGH<=H1 AND LOW>=L1;
思路:SUM(IF(D1,HIGH,IF(D11,LOW,IF(D2,-HIGH,IF(D3,HIGH,IF(D31,-HIGH,IF(D4,0,0)))))),0)/100,COLORGREEN,LINETHICK2;
IF(思路>REF(思路,1),思路,DRAWNULL),COLORRED,LINETHICK3;
IF(思路<REF(思路,1),思路,DRAWNULL),COLORGREEN,LINETHICK2;
线2:SMA(思路,2,1),COLOR0FFFFF;
线3:SMA(线2,2,1),COLORFF00FF;
上延:HHV(MA(思路,2),15),COLORFF2626;
下延:LLV(MA(思路,2),15),COLORFF2626;
中轴:=(上延+下延)/2,COLORF900F9;
自己编辑一下公式吧:通达信公式编辑录像 |