快好知 kuaihz

MACD拐点和面积公式原码czsc :M...

MACD拐点和面积公式原码

czsc :MACD拐点和面积公式原码

说明:本公式不需要设置参数,按1分钟级别走势做T+0效果不错。公式原码如下:

DIF:=EMA(CLOSE,24)-EMA(CLOSE,52);

MACD:=EMA(DIF,18),COLOR33CCFF;

DEF:2*(DIF-MACD),COLORFFFF00,LINETHICK0;

STICKLINE(DEF>=0 AND DEF>=REF(DEF,1),0,DEF,0,0),COLORRED;

STICKLINE(DEF>=0 AND DEF< REF(DEF,1),0,DEF,0.0,0),COLORRED;

STICKLINE(DEF<0 AND DEF>=REF(DEF,1),0,DEF,0.0,0),COLORGREEN;

STICKLINE(DEF<0 AND DEF< REF(DEF,1),0,DEF,0.0,0),COLORGREEN;

IF(DIF<1000,0,DRAWNULL),COLORBROWN;

K1:=BACKSET(DIF>REF(DIF,1),2);

强DIF:IF(K1,DIF,DRAWNULL),COLORRED,LINETHICK2;

K2:=BACKSET(DIF<REF(DIF,1),2);

弱DIF:IF(K2,DIF,DRAWNULL),COLORFF8B80,LINETHICK2;

K3:=BACKSET(MACD>REF(MACD,1),2);

强MACD:IF(K3,MACD,DRAWNULL),COLORLIRED,LINETHICK2;

K4:=BACKSET(MACD<REF(MACD,1),2);

弱MACD:IF(K4,MACD,DRAWNULL),COLORFF8B80,LINETHICK2;

底拐:DRAWLINE(DIF>=HHV(DIF,21),DIF,DIF<=LLV(DIF,21),DIF,0),COLORGREEN,LINETHICK3;

顶拐:DRAWLINE(DIF<=LLV(DIF,21),DIF,DIF>=HHV(DIF,21),DIF,0),COLORYELLOW,LINETHICK3;

DRAWICON(底拐=LLV(DIF,21),底拐*0.97,23);

DRAWICON(顶拐=HHV(DIF,21),顶拐*1.03,14);

AA1:=IF(DEF>0,1,-1);

AA2:=REF(AA1,1);

AA3:=AA1*AA2;

AA4:=BARSLAST(AA3<0);

AA5:=AA4+1;

面积:SUM(DEF,AA5)/10,COLORGREEN,LINETHICK2;

本站资源来自互联网,仅供学习,如有侵权,请通知删除,敬请谅解!
搜索建议:拐点  拐点词条  公式  公式词条  面积  面积词条  MACD  MACD词条  czsc  czsc词条  
股票

 股票投资建议

1.平时控制股票数量到2-4只;  股票数量一定要严格控制,如果手中的票多余四只,一旦发生股灾或者大盘大面积回落,必然造成手中个股全线下探,...(展开)