通达信短中长主力线指标公式,通达信MACD变盘点指标公式
admin888
|通达信短中长主力线指标公式,通达信MACD变盘点指标公式
通达信短中长主力线指标公式
短期RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
短期K:=SMA(短期RSV,4.5,1);
短期D:=Sma(短期K,3,1);
短期主力:3*短期K-2*短期D,COLORCYAN,DOTLINE;
中期RSV:=(CLOSE-LLV(LOW,20))/(HHV(HIGH,20)-LLV(LOW,20))*100;
中期K:=SMA(中期RSV,9,1);
中期D:=SMA(中期K,3,1);
中期主力线:3*中期K-2*中期D,COLORGREEN,DOTLINE;
长期RSV:=(CLOSE-LLV(LOW,40))/(HHV(HIGH,40)-LLV(LOW,40))*100;
长期K:=SMA(长期RSV,18,1);
长期D:=SMA(长期K,3,1);
长期主力线:3*长期K-2*长期D,COLORBLUE;
rsi自设:=SMA(MAX(CLOSE-REF(CLOSE,1),0),6,1)/SMA(Abs(CLOSE-REF(CLOSE,1)),6,1)*100;
操作线条件1:=(CLOSE-LLV(LOW,21))/(HHV(HIGH,21)-LLV(LOW,21))*100;
操作线条件2:=SMA(操作线条件1,13,8);
操作线:CEILING(SMA(操作线条件2,13,8)),COLORRED,LINETHICK2;
红绿柱条件1:=(HHV(HIGH,9)-CLOSE)/(HHV(HIGH,9)-LLV(LOW,9))*100-70;
红绿柱条件2:=SMA(红绿柱条件1,9,1)+100;
红绿柱条件3:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
红绿柱条件4:=SMA(红绿柱条件3,3,1);
红绿柱条件5:=SMA(红绿柱条件4,3,1)+100;
红绿柱条件6:=红绿柱条件5-红绿柱条件2;
红绿柱条件7:=IF(红绿柱条件6>100,红绿柱条件6-100,0);
stICKLINE(REF(红绿柱条件7,1)<红绿柱条件7,红绿柱条件7,REF(红绿柱条件7,1),0.5,0),COLORRED;
STICKLINE(REF(红绿柱条件7,1)>红绿柱条件7,红绿柱条件7,REF(红绿柱条件7,1),0.5,0),COLORGREEN;
-10,COLORLICYAN;
DRAWTEXT(CURRBARSCOUNT=1,-10,' -10.00'),COLORLICYAN;
0,COLORGREEN;
DRAWTEXT(CURRBARSCOUNT=1,0,' 0.00'),COLORGREEN;
20,COLORGREEN,DOTLINE;
DRAWTEXT(CURRBARSCOUNT=1,20,' 20.00'),COLORGREEN;
50,COLORYELLOW,DOTLINE;
DRAWTEXT(CURRBARSCOUNT=1,50,' 50.00'),COLORYELLOW;
80,COLORRED,DOTLINE;
DRAWTEXT(CURRBARSCOUNT=1,80,' 80.00'),COLORRED;
100,COLORRED;
DRAWTEXT(CURRBARSCOUNT=1,100,' 100.00'),COLORRED;
通达信MACD变盘点指标公式
DI1F:=(ema(obv,12) - Ema(OBV,26));
DE1A:=EMA(DI1F,9);
macd:(2 * (DI1F - DE1A)),NODRAW,COLORFF8000;0;
stICKLINE(MacD0,0,MACD,3,1),COLOR0080FF,LINETHICK2;
STICKLINE(MACD>=REF(MACD,1) AND MACD>0,0,MACD,3,1),COLOR0000FF,LINETHICK2;
STICKLINE(MACD>REF(MACD,1) AND MACD<0,0,MACD,3,1),COLORFF8000,LINETHICK2;
STICKLINE(MACD<=REF(MACD,1) AND MACD<0,0,MACD,3,1),COLORFFFF00,LINETHICK2;
dif:(EMA(OBV,12) - EMA(OBV,26)),COLORFFFFFF,LINETHICK3;
DEA:EMA(DIF,9),COLOR00FFFF,LINETHICK3;
{ 以下是可能出现的变盘点,关注 }TJ:=MACD>0;
T:=MACD<0;
DRAWTEXT(BArslAST(TJ)=5,0.03,'5'),COLORYELLOW;
DRAWTEXT(BARSLAST(TJ)=8,0.03,'8'),COLORYELLOW;
DRAWTEXT(BARSLAST(TJ)=13,0.03,'13'),COLORYELLOW;
DRAWTEXT(BARSLAST(TJ)=21,0.03,'21'),COLORYELLOW;
DRAWTEXT(BARSLAST(TJ)=34,0.03,'34'),COLORYELLOW;
DRAWTEXT(BARSLAST(TJ)=55,0.03,'55'),COLORYELLOW;
DRAWTEXT(BARSLAST(T)=5,-0.03,'5'),COLORGREEN;
DRAWTEXT(BARSLAST(T)=8,-0.03,'8'),COLORGREEN;
DRAWTEXT(BARSLAST(T)=13,-0.03,'13'),COLORGREEN;
DRAWTEXT(BARSLAST(T)=21,-0.03,'21'),COLORGREEN;
DRAWTEXT(BARSLAST(T)=34,-0.03,'34'),COLORGREEN;
DRAWTEXT(BARSLAST(T)=55,-0.03,'55'),COLORGREEN;
ZSJR4:=crOSS(DIF,0);
ZSJR5:=CROSS(0,DIF);
ZSJR6:=BARSLAST(ZSJR4);
ZSJR7:=BARSLAST(ZSJR5);
ZSJR8:=REF(ZSJR4,1);
ZSJR9:=REF(ZSJR5,1);
DIF0:=BARSLAST(ZSJR8);
DIF1:=BARSLAST(ZSJR9);
DIF2:=IF((DIF0 < DIF1),REF(HHV(HIGH,2),DIF0),REF(LLV(LOW,2),DIF1));
DIF3:=(((REF(OBV,1) <= REF(DIF2,1)) AND (OBV > DIF2)) AND (ZSJR6 < ZSJR7));
DIF33:=(((REF(OBV,1) >= REF(DIF2,1)) AND (OBV < DIF2)) AND (ZSJR7 < ZSJR6));
DIF4:=(DIF3 AND (COUNT(DIF3,ZSJR6) = 1));
DIF5:=(DIF33 AND (COUNT(DIF33,ZSJR7) = 1));
DIF6:=(DIF4 AND (REF(BARSLAST(DIF5),1) < REF(BARSLAST(DIF4),1)));
DIF7:=(DIF5 AND (REF(BARSLAST(DIF5),1) > REF(BARSLAST(DIF4),1)));
DIF8:=(DIF4 AND (REF(BARSLAST(DIF5),1) > REF(BARSLAST(DIF4),1)));
DIF9:=(DIF5 AND (REF(BARSLAST(DIF5),1) < REF(BARSLAST(DIF4),1)));
bsLINE:=IF((BARSLAST(DIF6) < BARSLAST(DIF7)),IF(REF(CROSS(0,MACD),1),LLV(LOW,2),REF(LLV(LOW,2),BARSLAST(REF(CROSS(0,MACD),1)))),IF(REF(CROSS(MACD,0),1),HHV(HIGH,2),REF(HHV(HIGH,2),BARSLAST(REF(CROSS(MACD,0),1)))));
DEA3:=BARSLAST(CROSS(MACD,0));
DEA5:=BARSLAST(CROSS(0,MACD));
DEA4:=IF((MACD >= 0),HHV(MACD,(DEA3 + 1)),REF(HHV(MACD,(DEA3 + 1)),(DEA5 + 1)));
DEA6:=IF((MACD < 0),LLV(MACD,(DEA5 + 1)),REF(LLV(MACD,(DEA5 + 1)),(DEA3 + 1)));
DEA7:=REF(DEA4,(DEA3 + 1));
DEA8:=REF(DEA6,(DEA5 + 1));
零下金叉:CROSS(DIF,DEA) AND DIF<0,NODRAW,COLOR0000FF;
零上金叉:CROSS(DIF,DEA) AND DIF>=0 AND DIF<0.25 ,NODRAW,COLOR4080FF;
DRAWICON(零上金叉,DEA,1) ;
DRAWICON(零下金叉,DEA,1) ;
JCCOUNT:=COUNT(CROSS(DIF,DEA),BARSLAST(DEA>=0));
二次金叉:CROSS(DIF,DEA) AND DEA<0 AND COUNT(JCCOUNT=2,21)=1,NODRAW,COLOR00FFFF;
DRAWTEXT(二次金叉,DEA*0.4,'★二金'),COLORYELLOW;
A1:=BARSLAST(REF(CROSS(DIF,DEA),1));
底背离:=REF(OBV,A1+1)>OBV AND DIF>REF(DIF,A1+1) AND CROSS(DIF,DEA);
{STICKLINE(底背离,-0.2,-0.3,6,1),COLOR00FF00;}
底背:DRAWLINE(A1=0,DEA,底背离,DEA,0),COLORRED,POINTDOT;
DRAWTEXT(底背离,DEA*0.6,'底背离'),COLORRED;
A2:=BARSLAST(REF(CROSS(DEA,DIF),1));
顶背离:=REF(OBV,A2+1)
顶背:DRAWLINE(A2=0,DEA,顶背离,DEA,0),COLORGREEN,POINTDOT;
DRAWTEXT(顶背离,DEA*1.3,'顶背离'),COLORGREEN;
DRAWTEXT(零下金叉 AND 二次金叉 AND 底背离,DIF*-1,'★底现★'),COLORFFFFFF;
H1J_19:=HHVBARS(MACD,BARSLAST(MACD<0)+1);
H1J_20:=CROSS(BACKSET(CROSS(0,MACD),REF(H1J_19,1)+2),0.5);
H1J_22:=DRAWLINE(H1J_20,MACD,REF(H1J_20,1),REF(MACD,1),1);
H1J_23:=LLVBARS(MACD,BARSLAST(MACD>0)+1);
H1J_24:=CROSS(BACKSET(CROSS(MACD,0),REF(H1J_23,1)+2),0.5);
H1J_25:=BARSLAST(FILTERX(CROSS(0,MACD),BARSCOUNT(OBV)));
H1J_26:=DRAWLINE(H1J_24,MACD,REF(H1J_24,1),REF(MACD,1),1);
MACD0:=BACKSET(ISLASTBAR,BARSLAST(H1J_20)+1);
MACD1:=MACD0>REF(MACD0,1);
前1高:REF(MACD,BARSLAST(MACD1)),COLORYELLOW,LINETHICK2;
STICKLINE(MACD>H1J_22,MACD,H1J_22,2,0),COLORYELLOW;
STICKLINE(MACD<0 AND MACD
H7:=BARSLASTCOUNT(DIF>DEA );
DRAWNUMBER(ISLASTBAR,0,H7),COLORFFFFFF,LINETHICK9;
IF(DIF>REF(DIF,1),DIF,DRAWNULL),COLORRED;
STICKLINE(DIF<0 AND CROSS(DIF,DEA),DEA,0,0,0),COLORRED;
STICKLINE(DIF>0 AND CROSS(DEA,DIF),DEA,0,0,0),COLORGREEN;
STICKLINE(DIF<0 AND CROSS(DIF,DEA),DEA,0,0,0),COLORRED;
STICKLINE(DIF>0 AND CROSS(DEA,DIF),DEA,0,0,0),COLORGREEN;
DRAWTEXT(DIF<0 AND CROSS(DIF,DEA),DEA/2,'???????????');
DRAWTEXT(DIF>0 AND CROSS(DEA,DIF),DEA/2,'???????????');
X_21:=MACD.DIF#WEEK(12,26,9);
X_22:=MACD.DEA#WEEK(12,26,9);
X_23:=MACD.MACD#WEEK(12,26,9);
X_24:=CROSS(X_21,X_22);
0,COLOR00FF00;
IF(X_23>0,0,DRAWNULL),COLOR0000FF;
DRAWTEXT(X_24,DIF/2*-1,'周金叉'),COLORWHITE;
DRAWTEXT(CROSS(X_22,X_21),DIF/2*-1,'周死叉'),COLORFFFF00;
牛市通网是一个牛股推荐网与低风险投资知识网,可以在线联系客服领取牛股。牛市通网从权威的投资专家、金融分析师等投资信息中挑选优质的文章进行发布。牛市通网主要为投资者提供股票知识、股票观点、股票分析和明智金融投资讨论等信息。