DRAWGBK(CLOSE>0,RGB(0,0,0),RGB(0,50,50),0,4,0);
DI1F:=(EMA(CLOSE,12) - EMA(CLOSE,26));
DE1A:=EMA(DI1F,9);
MACD:(2 * (DI1F - DE1A)),NODRAW,COLORFF8000;
0;
STICKLINE(MACD<REF(MACD,1) AND MACD>0,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(CLOSE,12) - EMA(CLOSE,26)),COLORFFFFFF;
DEA:EMA(DIF,9),COLOR00FFFF;
{ 以下是可能出现的变盘点,关注 }
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(CLOSE,1) <= REF(DIF2,1)) AND (CLOSE > DIF2)) AND (ZSJR6 < ZSJR7));
DIF33:=(((REF(CLOSE,1) >= REF(DIF2,1)) AND (CLOSE < 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));
上次成立:=BARSLAST(REF(CROSS(DIF,DEA),1));
上次最低价:=REF(LLV(LOW,8),上次成立+1);
本次成立:=BARSLAST(CROSS(DIF,DEA));
本次最低价:=REF(LLV(LOW,8),本次成立);
底背离:=上次最低价>本次最低价 AND DIF>REF(DIF,A1+1) AND CROSS(DIF,DEA);
{底背离:=REF(CLOSE,A1+1)>CLOSE 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(CLOSE,A2+1)<CLOSE AND REF(DIF,A2+1)>DIF AND CROSS(DEA,DIF);
顶背: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(CLOSE)));
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,1,0),COLORYELLOW;
STICKLINE(MACD<0 AND MACD<H1J_26 AND H1J_26<0,MACD,H1J_26,1,0),COLORFFFFFF;
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,'———————————');
DRAWTEXT_FIX(1,0.980,20,1,'★分析家公式网'),COLOR666666;
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,'周金叉'),COLORFF00FF;
DRAWTEXT(CROSS(X_22,X_21),DIF/2*-1,'周死叉'),COLORFFFF00;
|
评论内容只代表网友观点,与本站立场无关!
本网提供的公式文件说明:
* alg格式飞狐股票公式,可以用飞狐交易师或者交易师软件导入;
* fnc格式大智慧新一代公式指标,可以用大智慧股票软件使用,少部分可以用分析家股票软件引入使用;
* exp格式大智慧经典版股票公式,仅可以用大智慧经典版股票软件引入使用;
* tni和tnc格式通达信股票公式,仅可以用通达信新引入使用,例如可以用通达信股票软件引入使用;
* tne,tn6格式通达信公式,可以用通达信公式编辑器5.0版导入,推荐通达信金融终端版本;
* hxf格式同花顺股票公式,仅可以用同花顺股票软件引入使用。
以上的各种软件都可以在本网股票软件栏目找到!
* 关于股票公式时间限制,如果在引入大智慧公式,交易师公式或者飞狐公式的时候,发现公式名称栏是空白的,这时候调整电脑时间到1997年,又能出现公式名称,并且能正常显示,可能是公式使用期限已过。
* 关于还原公式源码如果你忘记了自己编写的大智慧公式,通达信公式,同花顺公式,操盘手公式,飞狐公式,博易大师公式,金字塔公式,文华公式和交易师公式等等公式的密码,本网可帮恢复源码,有.偿.服.务无意勿扰,点击在线咨询联系我。
* 关于股票公式源码编辑
本网提供的源码,一般都可以编辑成公式,如果不明白公式的编辑,在本页右侧教程录像可参考,或者找公式教程资料学习,请搜索:教程
* 如果您发现软件内容或者链接错误,请点击报告错误谢谢!
* 站内提供的所有软件包含源码均是由网上搜集,若侵犯了你的版权利益,请联系通知我们!