利用极品MACD、趋势MACD副图可以知道当前个股是上涨行情的初期还是末期??是下跌开始还是末期?? 极品MACD---副图公式 DIF:=EMA(CLOSE,12)-EMA(CLOSE,26); DEA:=EMA(DIF,9); MACD:=(DIF-DEA)*2,COLORSTICK; W1:STICKLINE(MACD>0,MACD,0,3,1),COLORRED; W2:STICKLINE(MACD<0,MACD,0,3,1),COLORCYAN; STICKLINE(MACD<REF(MACD,1)AND MACD>0,0,MACD,1.2,1 ),COLOR00CCFF; STICKLINE(MACD<REF(MACD,1)AND MACD>0,0,MACD,1.65,1 ),COLOR00DDFF; STICKLINE(MACD<REF(MACD,1)AND MACD>0,0,MACD,1.1,1 ),COLOR00EEFF; STICKLINE(MACD>=REF(MACD,1)AND MACD>0,0,MACD,1.1 ,1 ),COLOR0044EE; STICKLINE(MACD>=REF(MACD,1)AND MACD>0,0,MACD,0.55 ,1 ),COLOR0055FF; STICKLINE(MACD>REF(MACD,1)AND MACD<0,0,MACD,2.0 ,1 ),COLORBB11BB; STICKLINE(MACD>REF(MACD,1)AND MACD<0,0,MACD,1.2,1 ),COLORCC22BB; STICKLINE(MACD>REF(MACD,1)AND MACD<0,0,MACD,1.65,1 ),COLORDD33BB; STICKLINE(MACD<=REF(MACD,1)AND MACD<0,0,MACD,1.1 ,1 ),COLORFFEE44; STICKLINE(MACD<=REF(MACD,1)AND MACD<0,0,MACD,0.55 ,1 ),COLORFFFF55; VA1:=HHVBARS(MACD,BARSLAST(MACD<0)+1); VA2:=CROSS(BACKSET(CROSS(0,MACD),REF(VA1,1)+2),0.5); QG:=CROSS(BACKSET(CROSS(0,MACD) OR (ISLASTBAR AND MACD>0),REF(VA1,1)+2),0.5); 前高:DRAWLINE(VA2,MACD,REF(VA2,1),REF(MACD,1),1),COLORMAGENTA,DOTLINE; VA3:=LLVBARS(MACD,BARSLAST(MACD>0)+1); VA4:=CROSS(BACKSET(CROSS(MACD,0),REF(VA3,1)+2),0.5); BD:=BARSLAST(FILTERX(CROSS(0,MACD),BARSCOUNT(C))); 前低:DRAWLINE(VA4,MACD,REF(VA4,1),REF(MACD,1),1),CIRCLEDOT; BDTJ:=IF(MACD<0,FILTERX(MACD=LLV(MACD,BARSLAST(MACD>0)), BARSCOUNT(C)),DRAWNULL); TSBDTJ:=BARSLAST(BDTJ); BDZH:=FILTERX(MACD<CONST(LLV(MACD,BD+1)),BARSCOUNT(C)); BDTS:=BARSLAST(BDZH); 本低:IF(BD+1>=1,CONST(LLV(MACD,BD+1)),DRAWNULL); BDCL:=CROSS(COUNT(CROSS(MACD>本低/2 AND MACD<0,0.5),TSBDTJ)=1,0.5) AND TSBDTJ>=0; 终点:=IF(ISLASTBAR AND MACD>0 AND MACD=HHV(MACD,BARSLAST(MACD<0)),1, IF(FILTERX(QG,BARSCOUNT(C)),2,DRAWNULL)); UU:=(终点=1 OR 终点=2) AND MACD>0; ZZ:=FILTERX(UU,BARSCOUNT(C)); 本高:DRAWLINE(ZZ,MACD,REF(ZZ,1),REF(MACD,1),1),COLORWHITE; 横线:=CONST(REF(MACD,BARSLAST(ZZ))); WW:=MACD>横线; 起始点:=FILTERX(REFX(BARSLAST(WW),1)=1,BARSCOUNT(C)); 天数:BARSLAST(起始点),COLORYELLOW,NODRAW; 上横线:DRAWLINE(起始点,横线,ZZ,横线,0),COLORGREEN,DOTLINE; 下横线:DRAWLINE(BDZH,CONST(LLV(MACD,BD+1)),BDTJ=1,MACD,0),COLOR8080FF,DOTLINE; DRAWNUMBER(BDTJ,CONST(LLV(MACD,BD+1))*0.9,BDTS); DRAWNUMBER(ZZ,上横线*1.1,天数); TJ:=IF(起始点,BARSNEXT(ZZ),DRAWNULL); 红柱数量:IF(天数>0 AND 天数<=REF(TJ,天数),SUM(MACD>0,天数),DRAWNULL),COLORWHITE,NODRAW; 横线起始价:REF(C,天数),NODRAW; 空间评估:(横线起始价-C)/C*100,NODRAW; TT:=BARSLAST(ZZ); WQG:=CROSS(COUNT(CROSS(MACD<本高/2 AND MACD>0,0.5),ZZ)=1,0.5) AND ZZ>=0; STICKLINE(MACD>前高 AND 本高>前高 AND BARSLAST(CROSS(MACD<本高/2,0.5))>0 AND MACD>(前高+本高)/2,MACD,前高,1,0),COLORYELLOW; 前高本高二分位:IF(MACD>0 AND 本高!=前高,DRAWLINE(WQG,(前高+本高)/2,REF(WQG,1),REF((前高+本高)/2,1),1) ,DRAWNULL),COLORC0C000,DOTLINE; AA:=STRCAT(STRCAT(STRCAT('〖','上升空间'),'〗'),CON2STR(IF(空间评估,空间评估, DRAWNULL),2)); DRAWTEXT(WQG,MACD*1.1,'本高成立'),COLORWHITE; DRAWTEXT(BDCL,MACD*1.1,'本低成立'),COLORWHITE; STICKLINE(MACD>前高,MACD,前高,1,0),COLORYELLOW; STICKLINE(WQG,MACD,0,1,0),COLORGREEN; STICKLINE(MACD<0 AND MACD<前低 AND 前低<0,MACD,前低,1,0),COLORBLUE; B1:=IF(CROSS(MACD<0,0.5),BARSNEXT(BDTJ),DRAWNULL); TSB1:=BARSLAST(MACD>0)-1; STICKLINE(BARSLAST(BDCL)>=0 AND MACD<前低 AND MACD<0,MACD,前低,1,0),COLORGREEN; STICKLINE(BDCL,MACD,0,1,0),COLORWHITE; STICKLINE(MACD>前高 AND 本高>前高 AND BARSLAST(WQG)>0, MACD,前高,1,0),COLORRED; DRAWTEXT(VA2 AND VA2!=UU,(MACD/10)*9,'前'); DRAWTEXT(VA2 AND VA2!=UU,MACD/10,'高'); DRAWTEXT(ZZ,(MACD/10)*9,'本'),COLORWHITE; DRAWTEXT(ZZ,MACD/10,'高'),COLORWHITE; DRAWTEXT(BDTJ,(MACD/10)*9,'低'),COLORRED; DRAWTEXT(BDTJ,MACD/10,'本'),COLORRED; IF(BARSLAST(BDCL)>=0,本低/2,DRAWNULL),COLORRED,DOTLINE; 基准:=CONST(SUM(VA2,0)); 前高L:=基准=SUM(VA2,0) AND VA2,COLORCYAN,NODRAW; 前高1:=基准-1=SUM(VA2,0) AND VA2,COLORYELLOW,NODRAW; 前高2:=基准-2=SUM(VA2,0) AND VA2,COLORWHITE,NODRAW; 前高3:=基准-3=SUM(VA2,0) AND VA2,COLORWHITE,NODRAW; 前高4:=基准-4=SUM(VA2,0) AND VA2,COLORWHITE,NODRAW; 距离G1:=BARSLAST(前高1); 距离G2:=BARSLAST(前高2); 距离G3:=BARSLAST(前高3); 距离G4:=BARSLAST(前高4); NOTEXTG2:DRAWLINE(前高1,MACD,前高L AND MACD>=REF(MACD,距离G1),MACD,0),COLORYELLOW; NOTEXTG1:DRAWLINE(前高1,MACD,前高L AND MACD<REF(MACD,距离G1),MACD,0),COLORGREEN; NOTEXTG3:DRAWLINE(前高2,MACD,前高1 AND MACD>=REF(MACD,距离G2),MACD,0),COLORYELLOW; NOTEXTG4:DRAWLINE(前高2,MACD,前高1 AND MACD<REF(MACD,距离G2),MACD,0),COLORGREEN; NOTEXTG5:DRAWLINE(前高3,MACD,前高2 AND MACD>=REF(MACD,距离G3),MACD,0),COLORYELLOW; NOTEXTG6:DRAWLINE(前高3,MACD,前高2 AND MACD<REF(MACD,距离G3),MACD,0),COLORGREEN; NOTEXTG7:DRAWLINE(前高4,MACD,前高3 AND MACD>=REF(MACD,距离G4),MACD,0),COLORYELLOW; NOTEXTG8:DRAWLINE(前高4,MACD,前高3 AND MACD<REF(MACD,距离G4),MACD,0),COLORGREEN; 基准2:=CONST(SUM(VA4,0)); 前低L:=基准2=SUM(VA4,0) AND VA4; 前低1:=基准2-1=SUM(VA4,0) AND VA4; 前低2:=基准2-2=SUM(VA4,0) AND VA4; 前低3:=基准2-3=SUM(VA4,0) AND VA4; 前低4:=基准2-4=SUM(VA4,0) AND VA4; 距离D1:=BARSLAST(前低1); 距离D2:=BARSLAST(前低2); 距离D3:=BARSLAST(前低3); 距离D4:=BARSLAST(前低4); NOTEXTD1:DRAWLINE(前低1,MACD,前低L AND MACD>=REF(MACD,距离D1),MACD,0),COLORYELLOW; NOTEXTD2:DRAWLINE(前低1,MACD,前低L AND MACD<REF(MACD,距离D1),MACD,0),COLORGREEN; NOTEXTD3:DRAWLINE(前低2,MACD,前低1 AND MACD>=REF(MACD,距离D2),MACD,0),COLORYELLOW; NOTEXTD4:DRAWLINE(前低2,MACD,前低1 AND MACD<REF(MACD,距离D2),MACD,0),COLORGREEN; NOTEXTD5:DRAWLINE(前低3,MACD,前低2 AND MACD>=REF(MACD,距离D3),MACD,0),COLORYELLOW; NOTEXTD6:DRAWLINE(前低3,MACD,前低2 AND MACD<REF(MACD,距离D3),MACD,0),COLORGREEN; NOTEXTD7:DRAWLINE(前低4,MACD,前低3 AND MACD>=REF(MACD,距离D4),MACD,0),COLORYELLOW; NOTEXTD8:DRAWLINE(前低4,MACD,前低3 AND MACD<REF(MACD,距离D4),MACD,0),COLORGREEN; STICKLINE(MACD>前高 AND 本高>前高 AND BARSLAST(WQG)>0, MACD,前高,1,0),COLORRED; DRAWTEXT(VA2 AND VA2!=UU,(MACD/10)*9,'前'); DRAWTEXT(VA2 AND VA2!=UU,MACD/10,'高'); DRAWTEXT(ZZ,(MACD/10)*9,'本'),COLORWHITE; DRAWTEXT(ZZ,MACD/10,'高'),COLORWHITE; DRAWTEXT(BDTJ,(MACD/10)*9,'低'),COLORRED; DRAWTEXT(BDTJ,MACD/10,'本'),COLORRED; IF(BARSLAST(BDCL)>=0,本低/2,DRAWNULL),COLORRED,DOTLINE; DIFF:EMA(CLOSE,12)-EMA(CLOSE,26),COLORMAGENTA; DEAA:EMA(DIF,9),COLORWHITE; 低位金叉:=CROSS(DIFF,DEA) AND DIFF<-0.1; STICKLINE(低位金叉,0,0.08,2,0),COLORYELLOW; DRAWTEXT(低位金叉,0.16,' 低位金叉'),COLORWHITE; JCCOUNT:=COUNT(CROSS(DIFF,DEA),BARSLAST(DEA>=0)); 二次金叉:=CROSS(DIFF,DEA) AND DEA<0 AND COUNT(JCCOUNT=2,21)=1; STICKLINE(二次金叉,0,0.06,2,0),COLORFF00FF; DRAWICON(二次金叉,DEA*0.9,1) ; DRAWTEXT(二次金叉,0.2,' 二次金叉'),COLORYELLOW; A1:=BARSLAST(REF(CROSS(DIFF,DEA),1)); 底背离:=REF(CLOSE,A1+1)>CLOSE AND DIFF>REF(DIFF,A1+1) AND CROSS(DIFF,DEA); STICKLINE(底背离,0,0.03,2,0),COLOR00FF00; 底背:DRAWLINE(A1=0,DEA,底背离,DEA,0),COLOR008080,LINETHICK4; DRAWTEXT(底背离,0.1,' 底背离'),COLORFF00FF; A2:=BARSLAST(REF(CROSS(DEA,DIFF),1));{www.fxjgsw.com} 顶背离:=REF(CLOSE,A2+1)<CLOSE AND REF(DIFF,A2+1)>DIFF AND CROSS(DEA,DIFF); 顶背:DRAWLINE(A2=0,DEA,顶背离,DEA,0),COLORGREEN,LINETHICK4; DRAWTEXT(低位金叉 AND 二次金叉 AND 底背离,0.25,'三全项'),COLOR0000FF,LINETHICK2; DRAWTEXT_FIX(1,0.05,0.04,0,'【黑马拉升由两个阶段构成:同步上涨阶段(红芯柱) 和惯性上涨阶段(背离阶段、黄芯柱)】'),COLORFFFF00; 趋势MACD-----副图公式 DIFF:=( EMA(CLOSE,12) - EMA(CLOSE,26))*100; DEA:=EMA(DIFF,9); MACD:=2*(DIFF-DEA); STICKLINE(DIFF<0,0,DIFF,2,0),COLOR00FF00; STICKLINE(DIFF>=0,0,DIFF,2,0),COLORRED; STICKLINE(DEA>=0,0,DEA,2,0),COLORBLUE; STICKLINE(DEA<0,0,DEA,2,0),COLORYELLOW; DRAWICON(CROSS(DIFF,DEA),DEA*1.1,1); DRA |
评论内容只代表网友观点,与本站立场无关!
本网提供的公式文件说明:
* alg格式飞狐股票公式,可以用飞狐交易师或者交易师软件导入;
* fnc格式大智慧新一代公式指标,可以用大智慧股票软件使用,少部分可以用分析家股票软件引入使用;
* exp格式大智慧经典版股票公式,仅可以用大智慧经典版股票软件引入使用;
* tni和tnc格式通达信股票公式,仅可以用通达信新引入使用,例如可以用通达信股票软件引入使用;
* tne,tn6格式通达信公式,可以用通达信公式编辑器5.0版导入,推荐通达信金融终端版本;
* hxf格式同花顺股票公式,仅可以用同花顺股票软件引入使用。
以上的各种软件都可以在本网股票软件栏目找到!
* 关于股票公式时间限制,如果在引入大智慧公式,交易师公式或者飞狐公式的时候,发现公式名称栏是空白的,这时候调整电脑时间到1997年,又能出现公式名称,并且能正常显示,可能是公式使用期限已过。
* 关于还原公式源码如果你忘记了自己编写的大智慧公式,通达信公式,同花顺公式,操盘手公式,飞狐公式,博易大师公式,金字塔公式,文华公式和交易师公式等等公式的密码,本网可帮恢复源码,有.偿.服.务无意勿扰,点击在线咨询联系我。
* 关于股票公式源码编辑
本网提供的源码,一般都可以编辑成公式,如果不明白公式的编辑,在本页右侧教程录像可参考,或者找公式教程资料学习,请搜索:教程
* 如果您发现软件内容或者链接错误,请点击报告错误谢谢!
* 站内提供的所有软件包含源码均是由网上搜集,若侵犯了你的版权利益,请联系通知我们!