1、组合买卖,修改黑马线 组合买卖,原黑马线又时候太高,其他信号就显示不好,所以修改了一下黑马线 VAR3:=LLV(HIGH,240); VAR4:=100*(CLOSE-VAR3)/VAR3; VAR5:=(CLOSE-LLV(LOW,528))/(HHV(HIGH,528)-LLV(LOW,528))*100; VAR6:=(CLOSE-LLV(CLOSE,530))/(HHV(CLOSE,530)-LLV(CLOSE,530))*100; VAR8:=SMA(MAX(CLOSE-REF(CLOSE,1),0),34,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),7,1)*100; VAR9:=SMA(MAX(CLOSE-REF(CLOSE,1),0),13,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),13,1)*100; VARA:=BARSCOUNT(CLOSE); VARB:=VAR8<20 AND VAR9<23 AND VARA>35; VARC:=VARB AND COUNT(VARB,1)=1; VARD:=EMA(CLOSE,21)-EMA(CLOSE,8); VARE:=EMA(VARD,5); VARF:=TROUGHBARS(3,6,1)<4 AND CROSS(VARD,VARE); VAR10:=IF(TROUGHBARS(3,16,1)=0 AND HIGH>LOW+0.04,4,0); VAR11:=ZIG(3,6)>REF(ZIG(3,6),1) AND REF(ZIG(3,6),1)<=REF(ZIG(3,6),2) AND REF(ZIG(3,6),2)<=REF(ZIG(3,6),3); VAR12:=ZIG(3,6)<REF(ZIG(3,6),1) AND REF(ZIG(3,6),1)>=REF(ZIG(3,6),2) AND REF(ZIG(3,6),2)>=REF(ZIG(3,6),3); VAR13:=ZIG(3,22)>REF(ZIG(3,22),1) AND REF(ZIG(3,22),1)<=REF(ZIG(3,22),2) AND REF(ZIG(3,22),2)<=REF(ZIG(3,22),3); VAR14:=ZIG(3,22)<REF(ZIG(3,22),1) AND REF(ZIG(3,22),1)>=REF(ZIG(3,22),2) AND REF(ZIG(3,22),2)>=REF(ZIG(3,22),3); VAR15:=ZIG(3,51)>REF(ZIG(3,51),1) AND REF(ZIG(3,51),1)<=REF(ZIG(3,51),2) AND REF(ZIG(3,51),2)<=REF(ZIG(3,51),3); VAR16:=ZIG(3,51)<REF(ZIG(3,51),1) AND REF(ZIG(3,51),1)>=REF(ZIG(3,51),2) AND REF(ZIG(3,51),2)>=REF(ZIG(3,51),3); VAR17:=ZIG(3,72)>REF(ZIG(3,72),1) AND REF(ZIG(3,72),1)<=REF(ZIG(3,72),2) AND REF(ZIG(3,72),2)<=REF(ZIG(3,72),3); VAR18:=ZIG(3,72)<REF(ZIG(3,72),1) AND REF(ZIG(3,72),1)>=REF(ZIG(3,72),2) AND REF(ZIG(3,72),2)>=REF(ZIG(3,72),3); VAR19:=EMA(CLOSE,2)-EMA(CLOSE,150); VAR1A:=EMA(VAR19,100); VAR1B:=2*(VAR19-VAR1A); VAR1C:=POW(VAR1B,3)*0.1+POW(VAR1B,1); VAR1D:=SQRT(SQRT(LOW*HIGH*OPEN*CLOSE)); VAR1E:=EMA(VAR1D*0.97,3); VAR1F:=(HIGH+LOW+CLOSE)/3; VAR20:=(VAR1F-MA(VAR1F,14))/(0.015*AVEDEV(VAR1F,14)); VAR21:=CROSS(VAR1E,LOW); 选股买点: VAR10,COLORYELLOW; www58188com:=VAR10, , COLORYELLOW; 组合买: (VAR11+VAR13+VAR15+VAR17), , COLORRED; 组合卖: (VAR12+VAR14+VAR16+VAR18), , COLORGREEN; 黑马线: IF(VAR1B>0.1,IF(VAR1C<5,VAR1C,5),0)*1, , COLOR6699CC; 黑马信号介入点: 选股买点 AND VARF AND VARC AND VAR21 AND VAR4<0 AND VAR5<2 AND VAR6=0, , COLORFFFF99; DRAWTEXT(VAR13,0.6,'●'), ,COLORRED; DRAWICON(组合买,组合买,1); DRAWICON(组合卖,组合卖,9); DRAWTEXT(黑马信号介入点>0,4.5,'●我的黑马介入点'), , COLORRED; DRAWICON(选股买点>0,4.2,1); DRAWTEXT(选股买点 AND VARF AND VARC,2.8,' 30%下单莫错过!'), , COLORMAGENTA; DRAWTEXT(VAR18,3,'空仓'), , COLORGREEN; DRAWTEXT(VAR20<-110 AND 选股买点>0,2,'选股买点'), ,COLORYELLOW; DRAWTEXT(VAR17,1.3,'发现黑马'), , COLORFF6600; DRAWTEXT(选股买点 AND VAR20<-100 AND VARF AND VARC>0,4.1,'★组合5分钟线选股思路获利5%以上'), , COLORRED; 2、港资+融资指标 自用的港资+融资的指标 ~需要更新专业财务数据!~ {港资占流通比} 持股量(万):GPJYVALUE(6,1,1)/10000,NODRAW,COLORCYAN; 占总股比(%):(GPJYVALUE(6,1,1)/FINANCE(1))*100,NODRAW; 占流通比(%):(GPJYVALUE(6,1,1)/FINANCE(7))*100,LINETHICK2,COLORRED; 增减万股(万):(GPJYVALUE(6,1,1)-REF(GPJYVALUE(6,1,1),1))/10000,NODRAW,COLORGREEN; 持股金额(亿):(GPJYVALUE(6,1,1)*CLOSE)/100000000,NODRAW,COLORMAGENTA; 净买入(亿):(GPJYVALUE(6,1,1)*CLOSE-REF(GPJYVALUE(6,1,1),1)*CLOSE)/100000000,NODRAW,COLORWHITE; {港资日买入} BSZJ:=(GPJYVALUE(6,1,1)*CLOSE-REF(GPJYVALUE(6,1,1),1)*CLOSE)/100000000; STICKLINE(BSZJ>=0,BSZJ,0,2.5,0),COLORRED; STICKLINE(BSZJ<0,BSZJ,0,2.5,0),COLORGREEN; {分析家公式网} 持股量(万):GPJYVALUE(6,1,1)/10000,NODRAW,COLORCYAN; 增减万股(万):(GPJYVALUE(6,1,1)-REF(GPJYVALUE(6,1,1),1))/10000,NODRAW; 净买入(亿):(GPJYVALUE(6,1,1)*CLOSE-REF(GPJYVALUE(6,1,1),1)*CLOSE)/100000000,NODRAW; 三日买入(亿):(GPJYONE(7,1,0,0)+GPJYONE(7,1,0,1)+GPJYONE(7,1,0,2))/10000,NODRAW,COLORYELLOW; {融资买入} BSZJ:=(GPJYVALUE(3,1,1)-REF(GPJYVALUE(3,1,1),1))/10000; STICKLINE(BSZJ>=0,BSZJ,0,2.5,0),COLORRED; STICKLINE(BSZJ<0,BSZJ,0,2.5,0),COLORGREEN; 融资余额(亿):GPJYVALUE(3,1,1)/10000,NODRAW,COLORRED; 净买卖额(万):(GPJYVALUE(3,1,1)-REF(GPJYVALUE(3,1,1),1)),NODRAW,COLORCYAN; {融资占比曲线 顶尖财经网} 融资余额(亿):GPJYVALUE(3,1,1)/10000,LINETHICK2,COLORRED; 融券余量(万):GPJYVALUE(3,2,1)/10000,NODRAW,COLORMAGENTA; 融券余额(万):(GPJYVALUE(3,2,1)*CLOSE)/10000,NODRAW,COLORLIMAGENTA; 占流通比(%):((GPJYVALUE(3,1,1)*10000)/FINANCE(40))*100,NODRAW,COLORGREEN; 净买卖额(万):(GPJYVALUE(3,1,1)-REF(GPJYVALUE(3,1,1),1)),NODRAW,COLORCYAN; 3、多指标叠加,同图显示 快速编辑指标公式的小窍门-模块叠加法( 顶尖财经 股票学院: http://www.58188.com ) 编辑一个靓丽的指标公式看似很难,但只要掌握一部分技巧,便会化难为简,前期向大家介绍的模块叠加方法就是其中的一例。这就需要平时多多积攒一些好的资料,到时就会有用处。 现在就把平时积攒的8个模块奉献给感兴趣的学友们,希望能从中受益!!! 奉献给大家的模块是: 1主图均线模块; 2主图宝塔线模块; 3KDJ彩带模块; 4CCI彩带模块 ; 5主图底部显示KDJ+MACD 的月、周、日彩条模块; 6显示威廉顶底模块; 7数显KDJ+MACD+CCI模块; 8主图标识文字模块。可以分别用其中的几种叠加成自己实用的指标公式来。 源码如下: {1主图均线模块} MA5:MA(CLOSE,5),COLOR0000FF,LINETHICK3; MA10:MA(CLOSE,10),COLORFF00FF,LINETHICK1; MA30:MA(CLOSE,30),COLORFFFF00,LINETHICK1; MA60:MA(CLOSE,60),COLOR00FFFF,LINETHICK1; DRAWKLINE(H,O,L,C); {2主图宝塔线模块} VAR1:=CLOSE>REF(CLOSE,1) AND CLOSE>REF(CLOSE,2); VAR2:=REF(VAR1,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2); VAR3:=REF(VAR2,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2); VAR4:=REF(VAR3,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2); VAR5:=REF(VAR4,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2); VAR6:=REF(VAR5,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2); VAR7:=REF(VAR6,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2); VAR8:=REF(VAR7,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2); VAR9:=REF(VAR8,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2); VARA:=REF(VAR9,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2); VARB:=REF(VARA,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2); VARC:=REF(VARB,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2); STICKLINE(VAR1 OR VAR2 OR VAR3 OR VAR4 OR VAR5 OR VAR6 OR VAR7 OR VAR8 OR VAR9 OR VARA OR VARB OR VARC,CLOSE,REF(CLOSE,1),2.0,0),COLORRED; VARD:=CLOSE<REF(CLOSE,1) AND CLOSE<REF(CLOSE,2); VARE:=REF(VARD,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2); VARF:=REF(VARE,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2); VAR10:=REF(VARF,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2); VAR11:=REF(VAR10,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2); VAR12:=REF(VAR11,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2); VAR13:=REF(VAR12,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2); VAR14:=REF(VAR13,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2); VAR15:=REF(VAR14,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2); VAR16:=REF(VAR15,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2); VAR17:=REF(VAR16,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2); VAR18:=REF(VAR17,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2); STICKLINE(VARD OR VARE OR VARF OR VAR10 OR VAR11 OR VAR12 OR VAR13 OR VAR14 OR VAR15 OR VAR16 OR VAR17 OR VAR18,CLOSE,REF(CLOSE,1),2.0,1),COLORCYAN;{ 收阴} VAR19:=REF(VARD OR VARE OR VARF OR VAR10 OR VAR11 OR VAR12 OR VAR13 OR VAR14 OR VAR15 OR VAR16 OR VAR17 OR VAR18,1) AND VAR1; STICKLINE(VAR19,REF(CLOSE,1),REF(CLOSE,2),3.6,0),COLORFF00FF;{ 买入} DRAWICON(VAR19,LOW*0.97,1); VAR1A:=REF(VAR1 OR VAR2 OR VAR3 OR VAR4 OR VAR5 OR VAR6 OR VAR7 OR VAR8 OR VAR9 OR VARA OR VARB OR VARC,1) AND VARD; STICKLINE(VAR1A,REF(CLOSE,1),REF(CLOSE,2),3.6,0),COLOR00FFFF;{ 卖出 } DRAWICON(VAR1A,HIGH*1.02,2); {3KDJ彩带模块} 零轴:=DYNAINFO(3)*1.05,COLOR0000FF; STICKLINE(1,90/200+零轴,90/200+零轴,2,0),COLOR00BBBB; STICKLINE(1,10/200+零轴,10/200+零轴,2,0),COLORBBBBBB; RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100+50/200; K:=SMA(RSV,3,1); D:=SMA(K,3,1); J:=3*K-2*D; KK:=零轴+K/200; DDK:=零轴+D/200; JJ:=零轴+J/200; EEK:=50/200+零轴; DRAWBAND(KK,RGB(255,170,0),EEK,RGB(0,80,80)); DRAWBAND(JJ,RGB(240,0,240),KK,RGB(120,120,120)); IF(JJ>=REF(JJ,1),JJ,DRAWNULL),COLOR00FF00; DRAWKLINE(H,O,L,C); {4CCI彩带模块} 零轴2:=DYNAINFO(3)*0.6,COLOR0000FF; VARDS:50/200+零轴2,COLOR00DD00; VARDX:-50/200+零轴2,COLORDDDD00; RTYP:=(HIGH+LOW+CLOSE)/3; CCI14:=(RTYP-MA(RTYP,14))/(0.015*AVEDEV(RTYP,14))/2; CCI84:=(RTYP-MA(RTYP,84))/(0.015*AVEDEV(RTYP,94))/2; CCIA84:零轴2+CCI84 /200,COLOR00FFFF; CCIB14:零轴2+CCI14 /200,COLORFFFFFF; {5主图底部显示KDJ+MACD 的月、周、日彩条模块} TT:=IF(ISLASTBAR,240/FROMOPEN,1); NN:=120; HH:=HHV(V*TT,NN); LL:=LLV(V,NN); 最高:=CONST(HH); 最低:=CONST(LL); 最高2:=CONST(HHV(H,NN)); 最低2:=CONST(LLV(L,NN)); PP:=IF((最高2*0.9-(最高2-最低2)*0.5)>CONST(LLV(L,20)),0.9,IF((最高2*0.9-(最高2-最低2)*0.5)>CONST(LLV(L,50)),0.7,0.6)),NODRAW; RCC1:=最高2*0.9-(最高2-最低2)*PP; 最低3:=MIN(RCC1,最低2); AAD:=最低3; 日K:="KD.K"(9,3,3); 日D:="KD.D"(9,3,3); 月K:="KDJ.K#MONTH"(9,3,3); 月D:="KDJ.D#MONTH"(9,3,3); 周K:="KDJ.K#WEEK"(9,3,3); 周D:="KDJ.D#WEEK"(9,3,3); {MACD} 月DIF:="MACD.DIF#MONTH"(12,26,9); 月DEA:="MACD.DEA#MONTH"(12,26,9); 周DIF:="MACD.DIF#WEEK"(12,26,9); 周DEA:="MACD.DEA#WEEK"(12,26,9); 日DIF:="MACD.DIF"(12,26,9); 日DEA:="MACD.DEA"(12,26,9); AA:=日K>=日D; BB:=日K<日D; DD:=周K>=周D; EE:=月K>=月D; MAA:=日DIF>=日DEA; MBB:=周DIF>=周DEA; MDD:=月DIF>=月DEA; STICKLINE(1,AAD-0.000*AAD,AAD-0.024*AAD,4,1),COLOR464646; STICKLINE(1,AAD-0.030*AAD,AAD-0.054*AAD,4,1),COLOR464646; STICKLINE(1,AAD-0.060*AAD,AAD-0.084*AAD,4,1),COLOR464646; STICKLINE(1,AAD-0.090*AAD,AAD-0.114*AAD,4,1),COLOR464646; STICKLINE(1,AAD-0.120*AAD,AAD-0.144*AAD,4,1),COLOR464646; STICKLINE(1,AAD-0.150*AAD,AAD-0.174*AAD,4,1),COLOR464646; STICKLINE(AA,AAD-0.000*AAD,AAD-0.024*AAD,4,0),COLORRED; STICKLINE(DD,AAD-0.030*AAD,AAD-0.054*AAD,4,0),COLOR00FFFF; STICKLINE(EE,AAD-0.060*AAD,AAD-0.084*AAD,4,0),COLORFFFF00; STICKLINE(MAA,AAD-0.090*AAD,AAD-0.114*AAD,4,0),COLORFF00FF; STICKLINE(MBB,AAD-0.120*AAD,AAD-0.144*AAD,4,0),COLOR00BB00; STICKLINE(MDD,AAD-0.150*AAD,AAD-0.174*AAD,4,0),COLORBBBB00; {6显示威廉顶底模块} 威廉波段:=100-(HHV(HIGH,34)-CLOSE)/(HHV(HIGH,34)-LLV(LOW,34))*100; 威廉风险:=IF(威廉波段>95,(100/100+零轴)-(100/100+零轴)*0.009,100/100+零轴),COLOR00FFFF,LINETHICK0; DRAWBAND(100/100+零轴,RGB(255,255,0),威廉风险,RGB(0,0,0)); WLDB:=IF(威廉波段<5,(0/100+零轴)+(0/100+零轴)*0.009,0/100+零轴),COLORFFFF00,LINETHICK1; DRAWBAND(WLDB,RGB(255,0,0),0/100+零轴,RGB(0,0,0)); DRAWRECTREL(0,580,100,960,RGB(150,0,0)); DRAWRECTREL(100,580,200,960,RGB(0,150,150)); DRAWRECTREL(200,725,300,960,RGB(150,0,150)); DRAWTEXT_FIX(ISLASTBAR,0.04,0.60,0,'KDJ '),COLOR00FFFF; DRAWTEXT_FIX(ISLASTBAR,0.01,0.65,0,'月K= '),COLORFFFFFF; DRAWNUMBER_FIX(ISLASTBAR,0.05,0.65,0, 月K),COLORFFFFFF; DRAWTEXT_FIX(ISLASTBAR,0.01,0.7,0,'月D='),COLORFFFFFF; DRAWNUMBER_FIX(ISLASTBAR,0.05,0.7,0,月D),COLORFFFFFF; DRAWTEXT_FIX(ISLASTBAR,0.01,0.75,0,'周K='),COLORFFFFFF; DRAWNUMBER_FIX(ISLASTBAR,0.05,0.75,0,周K),COLORFFFFFF; DRAWTEXT_FIX(ISLASTBAR,0.01,0.8,0,'周D='),COLORFFFFFF; DRAWNUMBER_FIX(ISLASTBAR,0.05,0.8,0,周D),COLORFFFFFF; DRAWTEXT_FIX(ISLASTBAR,0.01,0.85,0,'日K='),COLORFFFFFF; DRAWNUMBER_FIX(ISLASTBAR,0.05,0.85,0,日K),COLORFFFFFF; DRAWTEXT_FIX(ISLASTBAR,0.01,0.9,0,'日D='),COLORFFFFFF; DRAWNUMBER_FIX(ISLASTBAR,0.05,0.9,0,日D),COLORFFFFFF; DRAWTEXT_FIX(ISLASTBAR,0.13,0.60,0,'MACD '),COLOR00FFFF; DRAWTEXT_FIX(ISLASTBAR,0.11,0.65,0,'月DIF= '),COLORFFFFFF; DRAWNUMBER_FIX(ISLASTBAR,0.155,0.65,0, 月DIF),COLORFFFFFF; DRAWTEXT_FIX(ISLASTBAR,0.11,0.7,0,'月DEA='),COLORFFFFFF; DRAWNUMBER_FIX(ISLASTBAR,0.155,0.7,0,月DEA),COLORFFFFFF; DRAWTEXT_FIX(ISLASTBAR,0.11,0.75,0,'周DIF='),COLORFFFFFF; DRAWNUMBER_FIX(ISLASTBAR,0.155,0.75,0,周DIF),COLORFFFFFF; DRAWTEXT_FIX(ISLASTBAR,0.11,0.8,0,'周DEA='),COLORFFFFFF; DRAWNUMBER_FIX(ISLASTBAR,0.155,0.8,0,周DEA),COLORFFFFFF; DRAWTEXT_FIX(ISLASTBAR,0.11,0.85,0,'日DIF='),COLORFFFFFF; DRAWNUMBER_FIX(ISLASTBAR,0.155,0.85,0,日DIF),COLORFFFFFF; DRAWTEXT_FIX(ISLASTBAR,0.11,0.9,0,'日DEA='),COLORFFFFFF; DRAWNUMBER_FIX(ISLASTBAR,0.155,0.9,0,日DEA),COLORFFFFFF; {CCI84、21、9} TYP:=(HIGH+LOW+CLOSE)/3; WWW58188COM:=(HIGH+LOW+CLOSE)/3; CCI21:=(TYP-MA(TYP,21))/(0.015*AVEDEV(TYP,21)); CCI9:=(TYP-MA(TYP,9))/(0.015*AVEDEV(TYP,9)); DRAWTEXT_FIX(ISLASTBAR,0.235,0.75,0,'CCI'),COLOR00FFFF; DRAWTEXT_FIX(ISLASTBAR,0.206,0.80,0,'CC9='),COLORFFFFFF; DRAWNUMBER_FIX(ISLASTBAR,0.250,0.80,0,CCI9),COLORFFFFFF; DRAWTEXT_FIX(ISLASTBAR,0.206,0.85,0,'CCI21='),COLORFFFFFF; DRAWNUMBER_FIX(ISLASTBAR,0.250,0.85,0,CCI21),COLORFFFFFF; DRAWTEXT_FIX(ISLASTBAR,0.206,0.90,0,'CCI84='),COLORFFFFFF; DRAWNUMBER_FIX(ISLASTBAR,0.250,0.90,0,CCI84),COLORFFFFFF; {8主图标识文字模块} DRAWTEXT_FIX(1,0.05,0.04,0,'【彩色三角型标识】★★红色三角形---威廉底部★★黄色三角形--威廉顶部★★ '),COLORFFFF00; DRAWTEXT_FIX(ISLASTBAR,0.4,0.70,0,'★【红色-日KDJ金叉】【黄色-周KDJ金叉】【青色-月KDJ金叉】★'),COLORFF00FF; DRAWTEXT_FIX(ISLASTBAR,0.4,0.73,0,'★【粉色-日MACD金叉】【绿色-周MACD金叉】【深灰-月MACD金叉】★'),COLOR00FFFF; |