通达信稳赚MACD指标公式
2020/1/10 18:32:19
本文公式指标的选股公式如下:
稳赚MACD之建仓选股指标公式
{参数:
SHORT 2 177 8
LONG 2 177 13
MID 2 177 5
P 2 177 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;
{看股吧-股票公式网站 www.kanguba.com}
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;
看 股吧公式 www. kanguba.com
其它股票公式列表