前期回顾: 通达信【强势短线】主/副图/选股指标 源码
通达信【三角共振】主图指标 源码
三角共振指标是在均线系统上--金三角战法基础上做了优化,包含了黄金柱、MACD、KDJ、RSI等指标共振。
指标使用说明:1、当主图出现共振信号后1~10个交易日内,观察副图对应的几日内,有无黄金坑,有则最佳;2、当随后某日,5日线上穿10日线为第一买点;K线放量上穿60均线,则视为是大涨在即,为第二买点;3、共振信号结合探底点、决策线洋红色三角、量王红色线上穿蓝色线,可判断底部。
4、当60均线呈水平一段时间(大于5日)时,容易出现超级牛股启动!此时,该60均线水平段与回踩支撑位蓝色线呈平行或重叠状态最佳!
5、源码用到了支撑划线,是未来函数,否则画不好这样的线;还有引用了周月线数据(不适用手机,手机不支持引用数据)。6、以下举例:
1、三角共振主图指标:{微信公众号:尊彩虹桥投资学习}DRAWTEXT_FIX(ISLASTBAR,0.01,0.2,0,GNBLOCK),COLORFF00FF;M5:=MA(C,5);M10:=MA(C,10);M30:=MA(C,30);MM:=MIN(M5,M30);MM2:=MIN(M10,M30);HM:=MAX(M5,M30);HM2:=MAX(M10,M30);TC1
RAWBAND(MM,RGB(255,0,0),MM2,0);MA5:MA(C,5),COLORWHITE;MA10:MA(C,10),COLORYELLOW;MA30:MA(C,30),COLORGREEN;MA60:MA(C,60),LINETHICK2,COLORFF00FF;MA120:MA(C,120),LINETHICK2,COLORCYAN,NODRAW;三角:=MA(C,5)>MA(C,10) AND MA(C,10)>MA(C,30) AND CROSS(MA(C,10),MA(C,30));DRAWTEXT(三角 AND MA(C,5)<MA(C,120),MA(C,30)-0.08,'银三角'),COLORMAGENTA;DRAWTEXT(三角 AND MA(C,30)>MA(C,120),MA(C,30)-0.08,'金三角'),COLORYELLOW;支撑位:IF(BARSLAST(三角),REF(M30,BARSLAST(三角)),DRAWNULL),LINETHICK2,COLORFF0000;DRAWTEXT(ISLASTBAR,支撑位-0.08,'回踩支撑位'),COLOR0000FF;UVW1:=0.9;UVW2:=1.2;{微信公众号:彩虹桥投资学习}M:=30;N:=15;ABC1:=HHV(H,M)=H;ABC1T:=BARSLAST(ABC1);ABC11:=LLV(L,N)=L;ABC11T:=BARSLAST(ABC11);ABC2:=HHV(H,M)=H;ABC2T:=BARSLAST(ABC2);ABC21T:=BARSLAST(ABC11);{STICKLINE((ABC2T=0,H,ABC21T=0) AND ABC11 AND FILTERX(ABC11,ABC2T+1) ,REF(L,ABC21T),REF(H,ABC2T),0,0)COLORBLUE,LINETHICK3;}OUT:=STICKLINE((ABC2T=0,H,ABC21T=0) AND ABC11 AND FILTERX(ABC11,ABC2T+1) ,REF(L,ABC21T),REF(H,ABC2T),0,0);{KDJ日金}日K:="KDJ.K#DAY"(9,3,3);日D:="KDJ.D#DAY"(9,3,3);{MACD日金}日DIF:="MACD.DIF#DAY"(12,26,9);日DEA:="MACD.DEA#DAY"(12,26,9);{RSI日}日RSI:="RSI.RSI1#DAY"(9);{KDJ周金}周K:="KDJ.K#WEEK"(9,3,3);周D:="KDJ.D#WEEK"(9,3,3);{MACD周金}周DIF:="MACD.DIF#WEEK"(12,26,9);周DEA:="MACD.DEA#WEEK"(12,26,9);{RSI周}周RSI:="RSI.RSI1#WEEK"(9);{KDJ月金}月K:="KDJ.K#MONTH"(9,3,3);月D:="KDJ.D#MONTH"(9,3,3);{MACD月金}月DIF:="MACD.DIF#MONTH"(12,26,9);月DEA:="MACD.DEA#MONTH"(12,26,9);{RSI月}月RSI:="RSI.RSI1#MONTH"(9); XYZ_1:=日K>日D;XYZ_2:=日DIF>日DEA;XYZ_3:=日RSI>50;XYZ_4:=周K>周D;XYZ_5:=周DIF>周DEA;XYZ_6:=周RSI>50;XYZ_7:=月K>月D;XYZ_8:=月DIF>月DEA;XYZ_9:=月RSI>50;尊重市场:=XYZ_1 AND XYZ_2 AND XYZ_3 AND XYZ_4 AND XYZ_5 AND XYZ_6 AND XYZ_7 AND XYZ_8 AND XYZ_9;月RSI1:="RSI.RSI1#MONTH"(9);A:=月RSI1>50;月共振:=CROSS(A>REF(A,1),0.5);{微信公众号:彩虹桥投资学习}周RSI1:="RSI.RSI1#WEEK"(9);AAAA:=周RSI1>50;周共振:=CROSS(AAAA>REF(AAAA,1),0.5);周K1:="KDJ.K#WEEK"(9,3,3),COLORBLUE;周D1:="KDJ.D#WEEK"(9,3,3),COLORBLUE;AAAAAA:=周K1>周D1;首周K:=CROSS(AAAAAA>REF(AAAAAA,1),0.5);微信:=IF(INBLOCK('创业板'),1,0);流通市值:=FINANCE(40)/100000000;公众号:=流通市值<=300 AND FINANCE(42)>10 AND C<=60;{流通市值小于300亿,上市天数大于10天,股价低于60元}AK:={微信 AND }公众号;尊重市场1:=月共振 AND NOT(周共振) AND AK;尊重市场2:=月共振 AND 周共振 AND AK;尊重市场3:=尊重市场1 AND 首周K;尊重市场4:=尊重市场2 AND 首周K;DRAWICON(尊重市场1,L*0.98,24);DRAWICON(尊重市场2,L*0.98,25);DRAWBMP(尊重市场1,H*1.2,'Q1A');DRAWBMP(尊重市场2,H*1.2,'15A');DRAWICON(尊重市场1,L*0.92,18);DRAWICON(尊重市场2,L*0.92,42);DRAWICON(尊重市场3,L*0.87,1);DRAWICON(尊重市场4,L*0.87,1);