通达信日BS公式源码测试图

N:=5;
 A0:=(L+H+C*2)/4;
 A1:=EMA(A0,N);
 A1X:=(A1-REF(A1,1))/REF(A1,1)*100;
 {多头买入}买:IF(A1X>=0 AND REF(A1X,1)<0,1,0),COLOR0000FF,STICK,LINETHICK5;
 DRAWTEXT(买>0,1.5,'买'),COLORFFFFFF;
 {多头卖出}卖:IF(A1X<0 AND REF(A1X,1)>=0 ,1,0),COLORDCC705,STICK,LINETHICK5;
 DRAWTEXT(卖>0,1.2,'卖'),COLORFFFFFF;
 DIF1:=EMA(DCLOSE,12)-EMA(DCLOSE,26);
 DEA1:=EMA(DIF1,9);
 AAA1:=(DIF1-DEA1)*2*60;
不贪:CROSS(AAA1-REF(AAA1,1),5),COLOR8080FF,STICK,LINETHICK3;
 DRAWTEXT(不贪>0,1.9,'不贪'),COLORFFFFFF;
 J1:=3*SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27)),5,1)-2*SMA(SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27)),5,1),3,1);
底买:CROSS(J1,-0.02) OR CROSS(J1,0.03),COLOR00F0F0,STICK,LINETHICK6;
 DRAWTEXT(底买>0,1.3,'底买'),COLORFFFFFF;
 LC:=REF(CLOSE,1);
RSI1:=SMA(MAX(CLOSE-LC,0),6,1)/SMA(ABS(CLOSE-LC),6,1)*100;
底:CROSS(RSI1,25),COLOR00F0F0,STICK,LINETHICK6;
 DRAWTEXT(底>0,1.3,'底'),COLORFFFFFF;
 
KDJ_K:="KDJ.K"(9,3,3);KDJ_D:="KDJ.D"(9,3,3);KDJ_J:="KDJ.J"(9,3,3);
买1:=CROSS(KDJ_J,0) OR (CROSS(KDJ_J,KDJ_K) AND KDJ_D<26);
买2:=CROSS("RSI.RSI1"(6,2,2),20) OR CROSS("RSI.RSI1"(6,12,24),"RSI.RSI2"(6,12,24));
买3:=CROSS("MACD.DIF","MACD.DEA") OR CROSS("MACD.MACD",0);
买0:=买1+买2+买3;
底背买:IF(买0>1,买0,0),COLOR28FFFF,STICK,LINETHICK1;
 DRAWTEXT(底背买>0,1.7,'底背买'),COLORFFFFFF;
 D1:=(L+H+C*2)/4;
 D2:= MA(D1,4);
 D3:=HHV(D2,10);
 D4:=MA(D3,3);
 D5:=1.25*D4-0.25*D3;
 A:=IF(D5>D3,D3,D5);
 F1:=LLV(D2,10);
 F2:=MA(F1,3); F3:=1.25*F2-0.25*F1;
 B:=IF(F3<F1,F1,F3);
 MA13:=MA(C,13);
擎天买:CROSS(C,B) AND CROSS(C,MA13) AND CROSS(C,A),COLOR0000FF,STICK,LINETHICK5;
 DRAWTEXT(擎天买>0,0.7,'擎天买'),COLORFFFFFF;
 VAR1:=4*SMA((CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100,5,1)-
 3*SMA(SMA((CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100,5,1),3.2,1),COLORYELLOW,LINETHICK0;
 VAR2:=8,COLORGREEN,LINETHICK0;
 V3:=(CLOSE-LLV(LOW,8))/(HHV(HIGH,8)-LLV(LOW,8))*100;
操盘线:=SMA(V3,2,1);
 V5:=SMA(操盘线,2,1);
抄底:IF(操盘线>REF(操盘线,1) AND REF(操盘线,1)<REF(操盘线,2) AND 操盘线<23 ,25,0) AND CROSS(VAR1,VAR2),COLOR00FFFF,STICK,LINETHICK5;
 DRAWTEXT(抄底>0,0.5,'抄底'),COLORFFFFFF;
 RSV:=(C-LLV(LOW,9))/(HHV(H,9)-LLV(L,9))*100;
 K:=SMA(RSV,3,1);
 D:=SMA(K,3,1);
 J:=3*K-2*D;
 VA:=(2*C+H+L)/4;
 VB:=LLV(L,5);
 VC:=HHV(H,5);
 HX:=EMA((VA-VB)/(VC-VB)*100,5);
 LX:=EMA(HX,3);
乖离买:CROSS(K,D) AND CROSS(HX,LX),COLOR00FFFF,STICK,LINETHICK5;
 DRAWTEXT(乖离买>0,1.5,'乖离买'),COLORFFFFFF;
 N1:=IF(BARSCOUNT(C)>=10,10,BARSCOUNT(C));
短线持股:C>=MA(C,N1),COLOR0000FF;




未来函数检测结果如下:
该公式包含未来函数:DCLOSE
解密、定制、编写股票指标请联系QQ或微信同号:88652583
相关股票指标公式

联系我们  |  股票指标网  |  指标网   |  指标公式  |   加入收藏   |  设为主页

@2005-2023 粤ICP备2023063687号-2 股票指标网别名指标网仅为互联网文章,所有股票指标公式及文章仅供学习研究,并不构成投资建议,请勿以此为依据进行股票交易,由此引起的投资亏损与本站无关。股票指标网均来源互联网收集整理,如不慎侵犯了你的权益,请联系我们告知,我们将做删除处理
QQ:88652583 微信 88652583
sitemap站点地图