您现在的位置:程序化交易>> 股票公式>> 其他>> 其他软件公式>>正文内容

优化了的宝塔加布林指标公式,很漂亮哦(公式、源码)[其他软件公式]

相关标签:

 

N:=20;
DRAWBKBMP(C,'龙1');
{RSI顶底}
LC:=REF(CLOSE,1);
RSI:=SMA(MAX(CLOSE-LC,0),6,1)/SMA(ABS(CLOSE-LC),6,1)*100;
DRAWICON(CROSS(84,RSI) ,h*1.1,5),ALIGN1;
DRAWICON(CROSS(RSI,11) ,l*0.99,4),ALIGN1;
{布林}
中:MA(C,N),COLORRED,LINETHICK0;
PARTLINE(C>=中,中),COLORRED,LINETHICK1;
PARTLINE(C<中,中),COLORWHITE,LINETHICK1;
上A:中+2.1*STD(C,N),Color00FFFF,LINETHICK0;
STICKLINE(C,上A,上A,4,0),Color00FFFF,LINETHICK2;
下A:中-2.1*STD(C,N),COLORGREEN,LINETHICK0;
STICKLINE(C,下A,下A,4,0),COLORGREEN,LINETHICK2;
上B:中+1.3*STD(C,N),COLORCYAN,LINETHICK0;
STICKLINE(C,上B,上B,4,0),COLORCYAN,LINETHICK1;
下B:中-1.3*STD(C,N),COLORFF00FF,LINETHICK0;
STICKLINE(C,下B,下B,4,0),COLORFF00FF,LINETHICK1;
{宝塔}
CXH1:=barscount(c);{宝塔两平底见红}
CXH2:=(hhv(h,200)-llv(l,200))/40;
stickline(CXH1/30=floor(CXH1/30),h+CXH2,h+CXH2*4,10,0),colorwhite;
关注?:stickline(CXH1/30=floor(CXH1/30),h+CXH2,h+CXH2*3,10,1),coloryellow;
DRAWTEXT(CXH1/30=floor(CXH1/30),H+CXH2*3,'关注?'),COLORYELLOW;
CXH3:=ref(c,1);
CXH4:=ref(c,2);
CXH5:=ref(c,3);
CXH6:=ref(c,4);
CXH7:=hhv(c,4);
CXH8:=llv(c,4);
CXH9:=c=CXH7 and (CXH3>=CXH4 or CXH3>=CXH5) or CXH3=CXH7 and close>=CXH4 or CXH4=CXH7 and CXH5=CXH8 and c>=CXH3 or CXH5=CXH7 and c>=CXH3 and c>=CXH4;
{stickline(c,h,l,10,0),colorBLACK};
红持:stickline(CXH9,CXH3,c,8,1),colorred;
CXHa:=c=CXH7 and CXH3=CXH8;
粉变:stickline(CXHa,CXH4,c,8,1),colorff00ff;
CXHb:=c=CXH8 and (CXH3<CXH4 or CXH3<CXH5) or CXH3=CXH8 and c<CXH4 or CXH4=CXH8 and CXH3<>CXH7 and c<CXH3 or CXH5=CXH8 and c<CXH3 and c<CXH4;
灰跌:stickline(CXHb,CXH3,c,8,0),colorCYAN;
CXHc:=CXH3=CXH8 and c>=CXH4 or CXH4=CXH8 and CXH3<=CXH5 and CXH4<CXH6 and c>=CXH3;
绿买:stickline(CXHc,CXH3,CXH4,8,0),COLORGREEN;{http://www.cxh99.com}
CXHd:=CXH3=CXH7 and c<CXH4 or (CXH4=CXH7 and CXH3>CXH5 or CXH5=CXH7 and CXH3>CXH4) and CXH4>=CXH6 and c<CXH3;
蓝抛:stickline(CXHd,CXH3,CXH4*1.01,8,0),colorblue;
SQ1:=SMA(MAX(C-REF(C,2),0),7,1)/SMA(ABS(C-REF(C,2)),7,1)*100;
SQ2:=SMA(MAX(C-REF(C,1),0),7,1)/SMA(ABS(C-REF(C,1)),7,1)*100;
CM1:=IF(SQ1<12,30,0);
CM2:=IF(SQ2<12,30,0);
超卖一:STICKLINE(CM1,l-0.2,l-0.4,8,1),Color0089FF;{超卖一:橙}
超卖二:STICKLINE(CM2,l-0.4,l-0.6,8,0),Color00FF00;{超卖二:绿};

{天眼通li_yung0053自用}
a1:=cost(95);
a2:=cost(5);
天眼通:=(a1-a2)*100/(a1+a2);
drawicon(天眼通>ref(天眼通,1), l*0.98,8)ALIGN5;
{买入提示}
CXHV1:=(HIGH+LOW+OPEN+2*CLOSE)/5;
CXHV2:=REF(CXHV1,1);
CXHV3:=SMA(MAX(CXHV1-CXHV2,0),10,1)/SMA(ABS(CXHV1-CXHV2),10,1)*100;
HY3:=IF(COUNT(CXHV3<20,5)>=1 AND COUNT(CXHV1=LLV(CXHV1,10),10)>=1 AND CLOSE>=OPEN*1.038 AND VOL>MA(VOL,5)*1.2,1,0);
DRAWTEXT(hy3,LOW,'▲买入'),coloryellow;
{卖娃}
卖娃: DRAWICON((FILTER(CROSS(79,(SMA(MAX(C-REF(C,1),0),7,1)/SMA(ABS(C-REF(C,1)),7,1)*100)),4)),H*1.08,2),ALIGN4;{顶底背离}
DIFF:=EMA(CLOSE,12) - EMA(CLOSE,26);
DEA:=EMA(DIFF,9);
MACD:=2*(DIFF-DEA);
A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));
B1:=REF(C,A1+1)>C AND REF(DIFF,A1+1)<DIFF AND CROSS(DIFF,DEA);
DRAWICON(FILTER(B1>0,5),L*0.94,10);
DRAWTEXT(FILTER(B1>0,5),L*0.94,'M底'),COLORGREEN;{http://www.cxh99.com}{MACD底背离}
A2:=BARSLAST(REF(CROSS("KDJ.K","KDJ.D"),1));
B2:=REF(C,A2+1)>C AND REF("KDJ.K",A2+1)<"KDJ.K" AND CROSS("KDJ.K","KDJ.D");
DRAWICON(FILTER(B2>0,5),L*0.96,10);
DRAWTEXT(FILTER(B2>0,5),L*0.96,'K底'),COLORYELLOW;{KDJ底背离}
A3:=BARSLAST(REF(CROSS("RSI.RSI1","RSI.RSI2"),1));
B3:=REF(C,A3+1)>C AND REF("RSI.RSI1",A3+1)<"RSI.RSI1" AND CROSS("RSI.RSI1","RSI.RSI2");
DRAWICON(FILTER(B3>0,5),L*0.98,10);
DRAWTEXT(FILTER(B3>0,5),L*0.98,'R底'),COLORCYAN;{RSI底背离}C1:=BARSLAST(REF(CROSS(DEA,DIFF),1));
D1:=REF(C,C1+1)<C AND REF(DIFF,C1+1)>DIFF AND CROSS(DEA,DIFF);
DRAWICON(FILTER(D1>0,5),H*1.07,12);
DRAWTEXT(FILTER(D1>0,5),H*1.07,'M顶'),COLOR0066FF;{MACD顶背离}
C2:=BARSLAST(REF(CROSS("KDJ.D","KDJ.K"),1));
D2:=REF(C,C2+1)<C AND REF("KDJ.K",C2+1)>"KDJ.K" AND CROSS("KDJ.D","KDJ.K");
DRAWICON(FILTER(D2>0,5),H*1.05,12);
DRAWTEXT(FILTER(D2>0,5),H*1.05,'K顶'),COLORRED;{KDJ顶背离}
C3:=BARSLAST(REF(CROSS("RSI.RSI2","RSI.RSI1"),1));
D3:=REF(C,C3+1)<C AND REF("RSI.RSI1",C3+1)>"RSI.RSI1" AND CROSS("RSI.RSI2","RSI.RSI1");
DRAWICON(FILTER(D3>0,5),H*1.03,12),;
DRAWTEXT(FILTER(D3>0,5),H*1.03,'R顶'),COLORMAGENTA,;;{RSI顶背离}

 

公式导入教程: 【通达信公式源码导入方法教程】 【同花顺公式源码导入方法教程】 【大智慧新一代公式源码导入方法教程

 

 

有思路,想编写各种指标公式,交易模型,选股公式,还原公式的朋友

可联系技术人员 QQ: 262069696  点击在线交流或微信:cxhjy888 进行 有偿收费 编写!(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)

怎么收费,代编流程等详情请点击查阅!

(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)

 


【字体: 】【打印文章】【查看评论

相关文章

    没有相关内容