广告管理-1170PX*80PX
广告管理-770PX*90PX
当前位置:牛股网 > 牛股公式 >

把精确无将来MACD公式计算改编成大智慧应用

  • 牛股公式
  • 2020-09-12 16:47
  • 牛股网
广告管理-720PX*80PX

编写标准:

编写方式 :网友求助:

DIFIF1:=EMA(CLOSE,12) - EMA(CLOSE,26);

DEAEA1:=EMA(DIFIF1,9);

MACD1:=2*(DIFIF1-DEAEA1),STICK;

MACD2:=EMA(MACD1,3);

STICKLINE(MACD1>MACD2 AND MACD1>0,0,MACD1,1,0),COLORRED;

STICKLINE(MACD1>MACD2 AND MACD1<0,0,MACD1,1,0),COLORGREEN;

STICKLINE(MACD1<MACD2,0,MACD1,1,0),COLORCBCBC0;

STICKLINE(MACD1>=0 OR MACD1<=0,0,0,50,1),COLORWHITE;

DIFIF1,COLOR33FF33,LINETHICK2;

DEAEA1,COLORYELLOW,LINETHICK2;

MACD:MACD1,NODRAW,COLORMAGENTA;

强:IF(DIFIF1>=DEAEA1,DIFIF1,DRAWNULL),COLORRED,LINETHICK2;

弱:=IF(DEAEA1>=DIFIF1,DEAEA1,DRAWNULL),COLORFF9900,LINETHICK2;

DRAWICON(CROSS(DIFIF1,DEAEA1),DIFIF1 0.1,1);

DRAWICON(CROSS(DEAEA1,DIFIF1),0.4,2);

A1:=BARSLAST(REF(CROSS("MACD.DIF","MACD.DEA"),1));

B1:=REF(C,A1 1)>C AND REF("MACD.DIF",A1 1)<"MACD.DIF" AND CROSS("MACD.DIF","MACD.DEA");

DRAWTEXT(B1>0,-0.8,'MACD底背'),COLORFF00FF;

A2:=BARSLAST(REF(CROSS("KDJ.K","KDJ.D"),1));

B2:=REF(C,A2 1)>C AND REF("KDJ.K",A2 1)<"KDJ.K" AND CROSS("KDJ.K","KDJ.D");

DRAWTEXT(B2,-0.6,'KDJ底离'),COLORYELLOW;{KDJ底背离};

A3:=BARSLAST(REF(CROSS("RSI.RSI1","RSI.RSI2"),1));

B3:=REF(C,A3 1)>C AND REF("RSI.RSI1",A3 1)<"RSI.RSI1" AND CROSS("RSI.RSI1","RSI.RSI2");

DRAWTEXT(B3>0,-0.3,'RSI底离'),COLORCYAN;{RSI底背离};

C1:=BARSLAST(REF(CROSS("MACD.DEA","MACD.DIF"),1));

D1:=REF(C,C1 1)<C AND REF("MACD.DIF",C1 1)>"MACD.DIF" AND CROSS("MACD.DEA","MACD.DIF");

DRAWTEXT(D1>0,0.4,'MACD顶离'),COLORBLUE;{MACD顶背离}

C2:=BARSLAST(REF(CROSS("KDJ.D","KDJ.K"),1));

D2:=REF(C,C2 1)<C AND REF("KDJ.K",C2 1)>"KDJ.K" AND CROSS("KDJ.D","KDJ.K");

DRAWTEXT(D2>0,0.6,'KDJ顶离'),COLORLIGRAY;{KDJ顶背离}

C3:=BARSLAST(REF(CROSS("RSI.RSI2","RSI.RSI1"),1));

D3:=REF(C,C3 1)<C AND REF("RSI.RSI1",C3 1)>"RSI.RSI1" AND CROSS("RSI.RSI2","RSI.RSI1"); DRAWTEXT(D3>0,0.8,'RSI顶离'),COLORGREEN;{RSI顶背离};

此外要求教师获取红色箭头出現时的选择股票和预警信息公式计算。多谢了!!!!!

解释以下:

DIFIF1:=EMA(CLOSE,12) - EMA(CLOSE,26);

DEAEA1:=EMA(DIFIF1,9);

MACD1:=2*(DIFIF1-DEAEA1);

MACD2:=EMA(MACD1,3);

STICKLINE(MACD1>MACD2 AND MACD1>0,0,MACD1,1,0),COLORRED;

STICKLINE(MACD1>MACD2 AND MACD1<0,0,MACD1,1,0),COLORGREEN;

STICKLINE(MACD1<MACD2,0,MACD1,1,0),COLORCBCBC0;

STICKLINE(MACD1>=0 OR MACD1<=0,0,0,50,1),COLORWHITE;

DIFIF1,COLOR33FF33,LINETHICK2;

DEAEA1,COLORYELLOW,LINETHICK2;

MACD:MACD1,linethick0,COLORMAGENTA;

DRAWICON(CROSS(DIFIF1,DEAEA1),DIFIF1 0.1,1);

DRAWICON(CROSS(DEAEA1,DIFIF1),0.4,2);

A1:=BARSLAST(REF(CROSS("MACD.DIF","MACD.DEA"),1));

B1:=REF(C,A1 1)>C AND REF("MACD.DIF",A1 1)<"MACD.DIF" AND CROSS("MACD.DIF","MACD.DEA");

DRAWTEXT(B1>0,-0.8,'MACD底背'),COLORFF00FF;

A2:=BARSLAST(REF(CROSS("KDJ.K","KDJ.D"),1));

B2:=REF(C,A2 1)>C AND REF("KDJ.K",A2 1)<"KDJ.K" AND CROSS("KDJ.K","KDJ.D");

DRAWTEXT(B2,-0.6,'KDJ底离'),COLORYELLOW;{KDJ底背离};

A3:=BARSLAST(REF(CROSS("RSI.RSI1","RSI.RSI2"),1));

B3:=REF(C,A3 1)>C AND REF("RSI.RSI1",A3 1)<"RSI.RSI1" AND CROSS("RSI.RSI1","RSI.RSI2");

DRAWTEXT(B3>0,-0.3,'RSI底离'),COLORCYAN;{RSI底背离};

C1:=BARSLAST(REF(CROSS("MACD.DEA","MACD.DIF"),1));

D1:=REF(C,C1 1)<C AND REF("MACD.DIF",C1 1)>"MACD.DIF" AND CROSS("MACD.DEA","MACD.DIF");

DRAWTEXT(D1>0,0.4,'MACD顶离'),COLORBLUE;{MACD顶背离}

C2:=BARSLAST(REF(CROSS("KDJ.D","KDJ.K"),1));

D2:=REF(C,C2 1)<C AND REF("KDJ.K",C2 1)>"KDJ.K" AND CROSS("KDJ.D","KDJ.K");

DRAWTEXT(D2>0,0.6,'KDJ顶离'),COLORGRAY;{KDJ顶背离}

C3:=BARSLAST(REF(CROSS("RSI.RSI2","RSI.RSI1"),1));

D3:=REF(C,C3 1)<C AND REF("RSI.RSI1",C3 1)>"RSI.RSI1" AND CROSS("RSI.RSI2","RSI.RSI1"); DRAWTEXT(D3>0,0.8,'RSI顶离'),COLORGREEN;{RSI顶背离};

大智慧改了根据了 试一试

广告管理-720PX*80PX

  • 关注微信

相关文章

微信公众号