布林线开口缩口公式源码(主图指标公式)[通达信公式]
相关标签:
原理解析:
来源:程序化99( WWW.CXH99.COM )
源码:
MID:MA(CLOSE,21),COLORWHITE;
UPPER:MID + 1.96*STD(CLOSE,21),COLORYELLOW;
LOWER:MID - 1.96*STD(CLOSE,21),COLORYELLOW;
UP:MID + 2.58*STD(CLOSE,21),COLORFF00FF;
LOOW:MID - 2.58*STD(CLOSE,21),COLORFF00FF;
{1.96统计学中为95%可信区间,2.58为99%可信区间,故采用1.96和2.58作为参数}单边上升:=(C>MID);
单边下降:=(C<MID);
布林线开口:=UP-LOOW;
多头行情:=C>MA(C,5) AND MA(C,5)>MA(C,10);
股价在高位:=((C-LLV(C,30))/(HHV(C,30)-LLV(C,30))>0.6);
股价在低位:=((C-LLV(C,30))/(HHV(C,30)-LLV(C,30))<0.4);
布林线缩口:=((UPPER-MID)/MID<0.05);
STICKLINE(单边上升,MID,UP,6,0),COLOR330066;
STICKLINE(单边下降,LOOW,MID,6,0),COLOR545454;
DRAWTEXT(布林线缩口,MID,'▲'),COLORWHITE;STICKLINE((OPEN >= CLOSE),OPEN,CLOSE,3,0),COLORCYAN;
STICKLINE((OPEN >= CLOSE),HIGH,LOW,0,0),COLORCYAN;
STICKLINE((OPEN < CLOSE),OPEN,CLOSE,3,0),COLORRED;
STICKLINE((OPEN < CLOSE),HIGH,LOW,0,0),COLORRED;
MID,COLORWHITE;
UPPER,COLORYELLOW;
LOWER,COLORYELLOW;
UP,COLORFF00FF;
LOOW,COLORFF00FF;
DRAWTEXT(单边上升 AND REF(C,1)>REF(UP,1) AND C < UP ,UP*1.08,'减仓'),COLOR00FF00;
DRAWTEXT(REF(布林线开口,1)=HHV(布林线开口,20) AND 单边上升,UP*1.08,'卖出'),COLORWHITE;
空仓:=(CROSS(MID,AMOUNT/V/100));
DRAWTEXT(空仓,UP*1.05,'空仓'),COLORYELLOW;
DRAWTEXT(BARSLAST(布林线缩口)=1 AND C<MA(C,10),UP*1.08,'一轮跌势起'),COLOR00FF00;
适当建仓:=(单边上升 AND FILTER(多头行情,20) AND V>MA(V,3));
DRAWTEXT(适当建仓,LOOW,'适当建仓'),COLORRED;
加仓:=(单边上升 AND REF(C-MID,1)=LLV(C-MID,5));
DRAWTEXT(加仓 AND BARSLAST(适当建仓)<BARSLAST(空仓),LOOW,'加仓'),COLORFF00FF;
一波行情起:=(BARSLAST(布林线缩口)<=3 AND V>MA(V,3) AND 股价在低位 AND C>REF(C,1) AND C>MA(C,10));
DRAWTEXT(FILTER(一波行情起,5),LOWER,'一波行情起'),COLORRED;
一波跌势完:=(单边下降 AND BARSLAST(REF(布林线开口,1)=HHV(布林线开口,50))<=5 AND LOOW>REF(LOOW,1) AND C <MID) AND 股价在低位;
DRAWTEXT(FILTER(一波跌势完,5),LOWER,'抢反弹');
DRAWTEXT_FIX(C>O,0.01,0.9,0,' WWW.CXH99.COM '),COLORRED;
DRAWTEXT_FIX(C>O,1,1,0,'程序化交易模型'),COLORRED;
公式导入教程: 【通达信公式源码导入方法教程】 【同花顺公式源码导入方法教程】 【大智慧新一代公式源码导入方法教程】
有思路,想编写各种指标公式,程序化交易模型,选股公式,预警公式的朋友
可联系技术人员 QQ: 511411198 或微信:cxhjy888 进行 有偿 编写!(不贵!点击查看价格!)
相关文章
-
没有相关内容