为了保证指标的正确率,揉合了4种不同算法,每种算法都经得起检验,关键是无未来函数;感谢各位前辈老师的无私分享,让我们少走了许多弯路,也加快了进步的脚步,这不是原创,是揉合了目前分享出来的公式源码精心选择后并按自己交易习惯加工出来的,再重新按自己的学习的感悟优化出来的 {背景色} DRAWGBK(O>0,RGB(33,47,58),RGB(0,0,0),0,'02',0); {现价游标} 现价:CONST(C),COLORCYAN,DOTLINE; {持股线} 持币:=MA(C,5);持股:IF(持币>=REF(持币,1),持币,DRAWNULL),COLORRED; {标缺口} LL:=REF(L,1);HH:=REF(H,1);上跳:=L>HH;下跳:=H<LL; STICKLINE(L>REF(H,1),L,REF(H,1),2.1,-1),COLORRED; STICKLINE(REF(L,1)>H,REF(L,1),H,1.8,-1),COLORGREEN; {多空波段分界线} 买线:=EMA(C,2);多空:EMA(SLOPE(C,30)*20+C,51),COLORWHITE; 涨家数:INDEXADV,NODRAW,COLORLIMAGENTA; 跌家数:INDEXDEC,NODRAW,COLORGREEN; {阳K线} STICKLINE(买线>=多空,L,H,0,0),COLORWHITE; STICKLINE(买线>=多空,C,O,2.1,1),COLORWHITE; {阴K线} STICKLINE(买线<多空,L,H,0,0),COLOR668800; STICKLINE(买线<多空,C,O,2.1,1),COLOR668800; {线上阳K线} STICKLINE(CROSS(买线,多空*0.991),O,C,2.1,0),COLOR000066; STICKLINE(CROSS(买线,多空*0.991),O,C,1.9,0),COLOR000088; STICKLINE(CROSS(买线,多空*0.991),O,C,1.6,0),COLOR0000AA; STICKLINE(CROSS(买线,多空*0.991),O,C,1.2,0),COLOR0000BB; STICKLINE(CROSS(买线,多空*0.991),O,C,0.6,0),COLOR0000CC; STICKLINE(CROSS(买线,多空*0.991),O,C,0.1,0),COLOR0000DD; {线上阴K线} STICKLINE(CROSS(多空*1.009,买线),O,C,2.1,0),COLOR006600; STICKLINE(CROSS(多空*1.009,买线),O,C,1.9,0),COLOR008800; STICKLINE(CROSS(多空*1.009,买线),O,C,1.6,0),COLOR00AA00; STICKLINE(CROSS(多空*1.009,买线),O,C,1.2,0),COLOR00BB00; STICKLINE(CROSS(多空*1.009,买线),O,C,0.6,0),COLOR00CC00; STICKLINE(CROSS(多空*1.009,买线),O,C,0.1,0),COLOR00DD00; {线下阳K线} STICKLINE(CROSS(买线,多空*0.999),O,C,2.1,0),COLOR000066; STICKLINE(CROSS(买线,多空*0.999),O,C,1.9,0),COLOR000088; STICKLINE(CROSS(买线,多空*0.999),O,C,1.6,0),COLOR0000AA; STICKLINE(CROSS(买线,多空*0.999),O,C,1.2,0),COLOR0000BB; STICKLINE(CROSS(买线,多空*0.999),O,C,0.6,0),COLOR0000CC; STICKLINE(CROSS(买线,多空*0.999),O,C,0.1,0),COLOR0000DD; {线下阴K线} STICKLINE(CROSS(多空*1.001,买线),O,C,2.1,0),COLOR006600; STICKLINE(CROSS(多空*1.001,买线),O,C,1.9,0),COLOR008800; STICKLINE(CROSS(多空*1.001,买线),O,C,1.6,0),COLOR00AA00; STICKLINE(CROSS(多空*1.001,买线),O,C,1.2,0),COLOR00BB00; STICKLINE(CROSS(多空*1.001,买线),O,C,0.6,0),COLOR00CC00; STICKLINE(CROSS(多空*1.001,买线),O,C,0.1,0),COLOR00DD00; {主图标释} DRAWTEXT_FIX(1,0.6,0.02,0,'【名称】'),COLORGREEN; DRAWTEXT_FIX(1,0.675,0.02,0,STKNAME),COLORYELLOW; DRAWTEXT_FIX(1,0.6,0.07,0,'【代码】'),COLORGREEN; DRAWTEXT_FIX(1,0.675,0.07,0,CODE),COLOR0080FF; DRAWTEXT_FIX(1,0.6,0.12,0,'【现价】'),COLORGREEN; DRAWNUMBER_FIX(1,0.675,0.12,0,现价),COLORCYAN; DRAWTEXT_FIX(1,0.6,0.17,0,'【均价】'),COLORGREEN; DRAWNUMBER_FIX(1,0.675,0.17,0,DYNAINFO(11)),COLORWHITE; {多空转换点} FX1:=100*(HHV(H,25)-C)/(HHV(H,25)-LLV(L,25));FX2:=100*(HHV(H,60)-C)/(HHV(H,60)-LLV(L,60)); VARBT:=EMA((C-LLV(L,15))/(HHV(H,25)-LLV(L,15))*4,5);DY:=CROSS(90,FX1) AND CROSS(90,FX2) AND COUNT(ABS(FX1-FX2)/FX2<0.15,1)=1,NODRAW; {紫色空方关键点} STICKLINE(CROSS(3,VARBT),O,(O+C)/2,2.1,0),COLOR5E005E; STICKLINE(CROSS(3,VARBT),O,(O+C)/2,1.9,0),COLOR750075; STICKLINE(CROSS(3,VARBT),O,(O+C)/2,1.6,0),COLOR930093; STICKLINE(CROSS(3,VARBT),O,(O+C)/2,1.2,0),COLORAE00AE; STICKLINE(CROSS(3,VARBT),O,(O+C)/2,0.6,0),COLORD200D2; STICKLINE(CROSS(3,VARBT),O,(O+C)/2,0.1,0),COLORE800E8; {红色多方关键点} STICKLINE(DY,O,(O+C)/2,1.9,0),COLOR000055; STICKLINE(DY,O,(O+C)/2,1.6,0),COLOR000077; STICKLINE(DY,O,(O+C)/2,1.3,0),COLOR000099; STICKLINE(DY,O,(O+C)/2,0.9,0),COLOR0000BB; STICKLINE(DY,O,(O+C)/2,0.6,0),COLOR0000DD; STICKLINE(DY,O,(O+C)/2,0.1,0),COLOR0000FF; {波段顶底预警} N2:=7;LC:=REF(C,1);RSI:=SMA(MAX(C-LC,0),N2,1)/SMA(ABS(C-LC),N2,1)*100; {青顶预警} STICKLINE((REF(RSI,1)>=80 AND RSI<80),H,(O+H)/2,2.1,0),COLOR999900; STICKLINE((REF(RSI,1)>=80 AND RSI<80),H,(O+H)/2,1.6,0),COLORAAAA00; STICKLINE((REF(RSI,1)>=80 AND RSI<80),H,(O+H)/2,1.2,0),COLORBBBB00; STICKLINE((REF(RSI,1)>=80 AND RSI<80),H,(O+H)/2,0.8,0),COLORCCCC00; STICKLINE((REF(RSI,1)>=80 AND RSI<80),H,(O+H)/2,0.2,0),COLORDDDD00; {橘底预警} STICKLINE((REF(RSI,1)<=20 AND RSI>20),L,(O+L)/2,1.9,0),COLOR002288; STICKLINE((REF(RSI,1)<=20 AND RSI>20),L,(O+L)/2,1.6,0),COLOR0033AA; STICKLINE((REF(RSI,1)<=20 AND RSI>20),L,(O+L)/2,1.2,0),COLOR0044CC; STICKLINE((REF(RSI,1)<=20 AND RSI>20),L,(O+L)/2,0.8,0),COLOR0055EE; STICKLINE((REF(RSI,1)<=20 AND RSI>20),L,(O+L)/2,0.2,0),COLOR0088FF; {顶底K线分型} ZXX:=(H+L+O+C*3)/6;NX:=(3*C+L+O+H)/6; ZNX:=(20*NX+19*REF(NX,1)+18*REF(NX,2)+17*REF(NX,3)+16*REF(NX,4) +15*REF(NX,5)+14*REF(NX,6)+13*REF(NX,7)+12*REF(NX,8)+11*REF(NX,9) +10*REF(NX,10)+9*REF(NX,11)+8*REF(NX,12)+7*REF(NX,13)+6*REF(NX,14) +5*REF(NX,15)+4*REF(NX,16)+3*REF(NX,17)+2*REF(NX,18)+REF(NX,20))/210; NXX:=MA(ZNX,6); GD:=H>REF(H,1) AND REF(H,1)<REF(H,2) AND L>REF(L,1) AND REF(L,1)<REF(L,2); GT:=H<REF(H,1) AND REF(H,1)>REF(H,2) AND L<REF(L,1) AND REF(L,1)>REF(L,2); BH1:=REF(H,1)>=REF(H,2) AND REF(L,1)<=REF(L,2); BH2:=REF(H,1)<=REF(H,2) AND REF(L,1)>=REF(L,2); BD1:=H>REF(H,2) AND REF(H,2)<REF(H,3) AND L>REF(L,1) AND REF(L,1)<REF(L,3); BD2:=H>REF(H,1) AND REF(H,1)<REF(H,3) AND L>REF(L,2) AND REF(L,2)<REF(L,3); BT1:=H<REF(H,1) AND REF(H,1)>REF(H,3) AND L<REF(L,2) AND REF(L,2)>REF(L,3); BT2:=H<REF(H,2) AND REF(H,2)>REF(H,3) AND L<REF(L,1) AND REF(L,1)>REF(L,3); FD:=IF(BH1,BD1,IF(BH2,BD2,GD));FT:=IF(BH1,BT1,IF(BH2,BT2,GT)); DFX:=IF(BARSLAST(CROSS(NXX,ZXX))>3,FILTER(BACKSET(FILTER(FD AND ZXX<NXX,3),2),1),0); TFX:=IF(BARSLAST(CROSS(ZXX,NXX))>3,FILTER(BACKSET(FILTER(FT AND ZXX>NXX,3),2),1),0); {深绿顶分型} STICKLINE(TFX,H,L,0,0),COLOR668800; STICKLINE(TFX,C,O,2.1,10),COLOR113300; STICKLINE(TFX,C,O,1.9,10),COLOR224400; STICKLINE(TFX,C,O,1.6,10),COLOR335500; STICKLINE(TFX,C,O,1.2,10),COLOR446600; STICKLINE(TFX,C,O,0.6,10),COLOR557700; STICKLINE(TFX,C,O,0.1,0),COLOR668800; {暗黄底分型} STICKLINE(DFX,H,L,0,0),COLOR4499CC; STICKLINE(DFX,O,C,1.9,10),COLOR225588; STICKLINE(DFX,O,C,1.6,10),COLOR226699; STICKLINE(DFX,O,C,1.2,10),COLOR3377AA; STICKLINE(DFX,O,C,0.6,10),COLOR3388BB; STICKLINE(DFX,O,C,0.1,0),COLOR4499CC; {压力支撑位} VAR1111:=BACKSET(REF(H,2)=HHV(H,5),3); VAR2222:=CROSS(VAR1111,0.9); VAR3333:=BACKSET(REF(L,2)=LLV(L,5),3); VAR4444:=CROSS(VAR3333,0.9); 波段顶:= REF(H,BARSLAST(VAR2222)); STICKLINE(C,REF(H,BARSLAST(VAR2222)),REF(H,BARSLAST(VAR2222)),0.5,1),COLORGREEN; 波段底:= REF(L,BARSLAST(VAR4444)); STICKLINE(C,REF(L,BARSLAST(VAR4444)),REF(L,BARSLAST(VAR4444)),0.5,1),COLORRED;
|
评论内容只代表网友观点,与本站立场无关!
本网提供的公式文件说明:
* alg格式飞狐股票公式,可以用飞狐交易师或者交易师软件导入;
* fnc格式大智慧新一代公式指标,可以用大智慧股票软件使用,少部分可以用分析家股票软件引入使用;
* exp格式大智慧经典版股票公式,仅可以用大智慧经典版股票软件引入使用;
* tni和tnc格式通达信股票公式,仅可以用通达信新引入使用,例如可以用通达信股票软件引入使用;
* tne,tn6格式通达信公式,可以用通达信公式编辑器5.0版导入,推荐通达信金融终端版本;
* hxf格式同花顺股票公式,仅可以用同花顺股票软件引入使用。
以上的各种软件都可以在本网股票软件栏目找到!
* 关于股票公式时间限制,如果在引入大智慧公式,交易师公式或者飞狐公式的时候,发现公式名称栏是空白的,这时候调整电脑时间到1997年,又能出现公式名称,并且能正常显示,可能是公式使用期限已过。
* 关于还原公式源码如果你忘记了自己编写的大智慧公式,通达信公式,同花顺公式,操盘手公式,飞狐公式,博易大师公式,金字塔公式,文华公式和交易师公式等等公式的密码,本网可帮恢复源码,有.偿.服.务无意勿扰,点击在线咨询联系我。
* 关于股票公式源码编辑
本网提供的源码,一般都可以编辑成公式,如果不明白公式的编辑,在本页右侧教程录像可参考,或者找公式教程资料学习,请搜索:教程
* 如果您发现软件内容或者链接错误,请点击报告错误谢谢!
* 站内提供的所有软件包含源码均是由网上搜集,若侵犯了你的版权利益,请联系通知我们!