手机端
当前位置:爱约股 > 公式技巧 > 把MACD中的MA买点以线形在图中显示出来

把MACD中的MA买点以线形在图中显示出来

 网友求助:

请老师把MACD中的MA买点以【如图】的线形在图中显示出来;

把MACD中的MA买点以线形在图中显示出来

源码如下:
DIFF : EMA(VOL,12) - EMA(VOL,26);
DEA : EMA(DIFF,9);
O线:0,COLORWHITE;
MACD : 2*(DIFF-DEA),COLORSTICK;
STICKLINE(MACD>=REF(MACD,1)AND MACD>=0,0,MACD,1,0),COLOR0000AA;
STICKLINE(MACD<REF(MACD,1)AND MACD>0,0,MACD,1,0),COLORYELLOW;
STICKLINE(MACD>REF(MACD,1)AND MACD<0,0,MACD,1,0);
D1:=EMA(C,3)-EMA(C,8);
D2:=EMA(O,3)-EMA(O,8);
D3:=EMA(H,3)-EMA(H,8);
D4:=EMA(L,3)-EMA(L,8);
鹰击:EMA(DIFF,46),COLORGREEN,LINETHICK2;
IF(鹰击>=REF(鹰击,1),鹰击,0),COLORRED,LINETHICK2;


VAR1:=(MA(CLOSE,80)-MA(CLOSE,13)/3);
VAR2:=( MA((CLOSE-VAR1)/VAR1,1));

MA买点: IF(REF(VAR2,2)=LLV(VAR2,20) AND
REF(VAR2,2)<0.071 AND REF(VAR2,2)<REF(VAR2,1) AND
NOT(REF(LOW,1)>REF(HIGH,2) AND LOW>REF(HIGH,1)) AND
CLOSE>REF(CLOSE,1),2,0),LINETHICK2;

 

解答如下:

DIFF : EMA(VOL,12) - EMA(VOL,26);
DEA : EMA(DIFF,9);
O线:0,COLORWHITE;
MACD : 2*(DIFF-DEA),COLORSTICK;
STICKLINE(MACD>=REF(MACD,1)AND MACD>=0,0,MACD,1,0),COLOR0000AA;
STICKLINE(MACD<REF(MACD,1)AND MACD>0,0,MACD,1,0),COLORYELLOW;
STICKLINE(MACD>REF(MACD,1)AND MACD<0,0,MACD,1,0);
D1:=EMA(C,3)-EMA(C,8);
D2:=EMA(O,3)-EMA(O,8);
D3:=EMA(H,3)-EMA(H,8);
D4:=EMA(L,3)-EMA(L,8);
鹰击:EMA(DIFF,46),COLORGREEN,LINETHICK2;
IF(鹰击>=REF(鹰击,1),鹰击,0),COLORRED,LINETHICK2;


VAR1:=(MA(CLOSE,80)-MA(CLOSE,13)/3);
VAR2:=( MA((CLOSE-VAR1)/VAR1,1));

MA买点: IF(REF(VAR2,2)=LLV(VAR2,20) AND
REF(VAR2,2)<0.071 AND REF(VAR2,2)<REF(VAR2,1) AND
NOT(REF(LOW,1)>REF(HIGH,2) AND LOW>REF(HIGH,1)) AND
CLOSE>REF(CLOSE,1),HHVALL(MACD ),0),LINETHICK2;

TAG:
分享至:

相关推荐