通達信穩(wěn)賺MACD建倉空倉買賣指標公式
- 指標類別: 通達信指標公式
- 授權方式: 免費版
- 指標評級: ★★★★★
- 指標分類: 趨勢
- 畫線方法: 副圖
- 日期:2020-07-01 來源:互聯網
通達信穩(wěn)賺MACD建倉空倉買賣指標公式:包含未來函數:BACKSET
SHORT:=8;
LONG:=13;
MID:=5;
P:=5;
DIF1:=EMA(CLOSE,12) - EMA(CLOSE,26);
DEA1:=EMA(DIF1,9);
MACD1:=2*(DIF1-DEA1),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;
DIF:DIF1,COLOR33FF33;
DEA:DEA1,COLORYELLOW;
MACD:MACD1,NODRAW,COLORMAGENTA;
強:IF(DIF1>=DEA1,DIF1,DRAWNULL),COLORRED,LINETHICK2;
持倉段:0,COLOR00CFFF;
空倉段:0,COLORFFCCFF;
DRAWTEXT(CROSS(DIF,DEA),DIF-0,'建倉'),COLORRED;
DRAWTEXT(CROSS(DEA,DIF),DIF+0,'空倉'),COLORGREEN;
A1:=REF(DEA,P)=HHV(DEA,2*P+1);
B1:=FILTER(A1,P);
C1:=BACKSET(B1,P+1);
D1:=FILTER(C1,P);{高點}
A2:=REF(DEA,P)=LLV(DEA,2*P+1);
B2:=FILTER(A2,P);
C2:=BACKSET(B2,P+1);
D2:=FILTER(C2,P);{低點}
前期高點:REF(DEA,BARSLAST(D1)),COLORFF00FF,NODRAW;
前期低點:REF(DEA,BARSLAST(D2)),COLOR00FF00,NODRAW;
向前期高點:CROSS(DEA,前期高點*1.01),NODRAW;
相對能量:(DEA-前期低點)/(前期高點-前期低點)*100,COLORRED,NODRAW;
R11:=BACKSET(ISLASTBAR,BARSLAST(D1)+1);
S11:=R11>REF(R11,1);
DRAWLINE(D1,DEA,S11,DEA,1),COLORRED;
T11:=BACKSET(ISLASTBAR,BARSLAST(D2)+1);
U11:=T11>REF(T11,1);
DRAWLINE(D2,DEA,U11,DEA,1),COLORRED;
STICKLINE(C>0,前期低點,前期低點,1,0),COLORRED;
STICKLINE(C>0,前期高點,前期高點,1,0),COLORFF00FF;
通達信穩(wěn)賺MACD建倉空倉買賣指標公式實例圖解:
通達信穩(wěn)賺MACD建倉空倉買賣指標公式