㈠ 布林线选股公式
编写方法:
N:=20;
M:=2;
MID :=ma(CLOSE,N);
UPPER:=MID+M*stD(CLOSE,N);
UPPER/MID<1.2 AND C>O;
布林线指标的原理表示:
在股市分析软件中,BOLL指标一共由四条线组成,即上轨线UP、中轨线MB、下轨线DN和价格线。其中上轨线UP是UP数值的连线,用黄色线表示;中轨线MB是MB数值的连线,用白色线表示;下轨线DN是DN数值的连线,用紫色线表示;价格线是以美国线表示,颜色为浅蓝色。和其他技术指标一样,在实战中,投资者不需要进行BOLL指标的计算,主要是了解布林线指标公式,以便更加深入地掌握BOLL指标的原理,为运用指标打下基础。一般而言,股价的运动总是围绕某一价值中枢(如均线、成本线等)在一定的范围内变动,布林线指标正是在上述条件的基础上,引进了“股价通道”的概念,其认为股价通道的宽窄随着股价波动幅度的大小而变化,而且股价通道又具有变异性,它会随着股价的变化而自动调整。正是由于它具有灵活性、直观性和趋势性的特点,BOLL指标渐渐成为投资者广为应用的市场上热门指标。
一、在QR相对强弱技术分析指标中,BOLL指标属于比较特殊的一类指标。绝大多数技术分析指标都是通过数量的方法构造出来的,它们本身不依赖趋势分析和形态分析,而BOLL指标却与股价的形态和趋势有着密不可分的联系。BOLL指标中的“股价通道”概念正是股价趋势理论的直观表现形式。BOLL是利用“股价通道”来显示股价的各种价位,当股价波动很小,处于盘整时,股价通道就会变窄,这可能预示着股价的波动处于暂时的平静期;当股价波动超出狭窄的股价通道的上轨时,预示着股价的异常激烈的向上波动即将开始;当股价波动超出狭窄的股价通道的下轨时,同样也预示着股价的异常激烈的向下波动将开始。
二、宽客相对论认为,投资者常常会遇到两种最常见的交易陷阱,一是买低陷阱,投资者在所谓的低位买进之后,股价不仅没有止跌反而不断下跌;二是卖高陷阱,股票在所谓的高点卖出后,股价却一路上涨。布林线认为各类市场间都是互动的,市场内和市场间的各种变化都是相对性的,是不存在绝对性的,股价的高低是相对的,股价在上轨线以上或在下轨线以下只反映该股股价相对较高或较低,投资者作出投资判断前还须综合参考其他技术指标,包括价量配合,心理类指标,类比类指标,市场间的关联数据等。
三、总之,布林线指标中的原理中,股价通道对预测未来行情的走势起着重要的参考作用,QR量化社区指出,它也是布林线指标所特有的分析手段。布林线指标的原理在所有的指标计算中,布林线指标的原理的计算方法是最复杂的之一,其中引进了统计学中的标准差概念,涉及到中轨线(MB)、上轨线(UP)和下轨线(DN)的计算。
㈡ 通达信神奇公式怎么选股通达信神奇布林线股票指标公式如下:mid2:=m
{神奇布林线主图}
MID2 := MA(CLOSE,21),COLORWHITE;
UPPER2:=MID2 + 1.96*STD(CLOSE,21),COLORYELLOW;
LOWER2:=MID2 - 1.96*STD(CLOSE,21),COLORYELLOW;
UP2:=MID2 + 2.56*STD(CLOSE,21),COLORFF00FF;
LOOW2:=MID2 - 2.56*STD(CLOSE,21),COLORFF00FF;
{上升趋势}
STICKLINE(C>=MID2,MID2,UP2,2,0),COLOR330066;
{下降趋势}
STICKLINE(C<MID2,MID2,LOOW2,2,0),COLOR545454;
MID:MID2,COLORWHITE;
UPPER:UPPER2,COLORYELLOW;
UP:UP2,COLORFF00FF;
LOWER:LOWER2,COLORYELLOW;
LOOW:LOOW2,COLORFF00FF;
开口:=UP-LOOW;
相离:=C-MID;
DRAWTEXT(C>=MID AND REF(开口,1)=HHV(开口,20),UPPER,'减仓'),COLOR00FF00;
DRAWTEXT(C>=MID AND REF(相离,1)=LLV(相离,5),MID,'加仓');
股价多头:=C>MA(C,5) AND MA(C,5)>MA(C,10) AND MA(C,10)>MA(C,20);
DRAWTEXT(FILTER(股价多头,20),LOOW*0.95,'开始建仓'),COLORRED;
DRAWICON(FILTER(股价多头,20),LOWER,1),COLORRED;
DRAWTEXT(CROSS(MID,C),UP,'空仓观望'),COLORYELLOW;
DRAWICON(CROSS(MID,C),UPPER,2),COLORYELLOW;
{K线}
{STICKLINE((CLOSE > OPEN),CLOSE,OPEN,5.2,0),COLOR070084;}
STICKLINE((CLOSE > OPEN),CLOSE,OPEN,4,1),COLOR0000A3;
STICKLINE((CLOSE > OPEN),CLOSE,OPEN,3.5,0),COLOR000033;
STICKLINE((CLOSE > OPEN),CLOSE,OPEN,3,0),COLOR000066;
STICKLINE((CLOSE > OPEN),CLOSE,OPEN,2.0,0),COLOR000099;
STICKLINE((CLOSE > OPEN),CLOSE,OPEN,1.5,0),COLOR0000CC;
STICKLINE((CLOSE > OPEN),CLOSE,OPEN,1.0,0),COLOR0000FF;
STICKLINE((CLOSE > OPEN),CLOSE,OPEN,0.5,0),COLORCC66FF;
STICKLINE((CLOSE > OPEN),OPEN,LOW,0.3,0),COLORRED;
STICKLINE((CLOSE > OPEN),CLOSE,HIGH,0.3,0),COLORRED;
{STICKLINE((CLOSE = OPEN AND C>REF(C,1)),CLOSE,OPEN,5.2,0),COLOR070084;}
STICKLINE((CLOSE = OPEN AND C>REF(C,1)),CLOSE,OPEN,4,1),COLOR0000A3;
STICKLINE((CLOSE = OPEN AND C>REF(C,1)),CLOSE,OPEN,3.5,0),COLOR0000B7;
STICKLINE((CLOSE = OPEN AND C>REF(C,1)),CLOSE,OPEN,3,0),COLOR0000CD;
STICKLINE((CLOSE = OPEN AND C>REF(C,1)),CLOSE,OPEN,2.0,0),COLOR0000E9;
STICKLINE((CLOSE = OPEN AND C>REF(C,1)),CLOSE,OPEN,1.5,0),COLOR0754E9;
STICKLINE((CLOSE = OPEN AND C>REF(C,1)),CLOSE,OPEN,1.0,0),COLOR076EF3;
STICKLINE((CLOSE = OPEN AND C>REF(C,1)),CLOSE,OPEN,0.5,0),COLOR077BF3;
STICKLINE((CLOSE = OPEN AND C>REF(C,1)),OPEN,LOW,0.3,0),COLOR0000CD;
STICKLINE((CLOSE = OPEN AND C>REF(C,1)),CLOSE,HIGH,0.3,0),COLOR0000CD;
{STICKLINE((OPEN > CLOSE),CLOSE,OPEN,5.2,0),COLORFF5B00;}
STICKLINE((OPEN > CLOSE),CLOSE,OPEN,4,1),COLORFF6C00;
STICKLINE((OPEN > CLOSE),CLOSE,OPEN,3.5,0),COLORFF7B00;
STICKLINE((OPEN > CLOSE),CLOSE,OPEN,2,0),COLORFF9C00;
STICKLINE((OPEN > CLOSE),CLOSE,OPEN,1.5,0),COLORFFBE00;
STICKLINE((OPEN > CLOSE),CLOSE,OPEN,1,0),COLORFFCC00;
STICKLINE((OPEN > CLOSE),CLOSE,OPEN,0.5,0),COLORFFFF00;
STICKLINE((OPEN > CLOSE),CLOSE,LOW,0.3,0),COLORFF9C00;
STICKLINE((OPEN > CLOSE),OPEN,HIGH,0.3,0),COLORFF9C00;
{STICKLINE((OPEN = CLOSE AND C<REF(C,1)),CLOSE,OPEN,5.2,0),COLORFF5B00;}
STICKLINE((OPEN = CLOSE AND C<REF(C,1)),CLOSE,OPEN,4,1),COLORFF6C00;
STICKLINE((OPEN = CLOSE AND C<REF(C,1)),CLOSE,OPEN,3.5,0),COLORFF7B00;
STICKLINE((OPEN = CLOSE AND C<REF(C,1)),CLOSE,OPEN,2,0),COLORFF9C00;
STICKLINE((OPEN = CLOSE AND C<REF(C,1)),CLOSE,OPEN,1.5,0),COLORFFBE00;
STICKLINE((OPEN = CLOSE AND C<REF(C,1)),CLOSE,OPEN,1,0),COLORFFCC00;
STICKLINE((OPEN = CLOSE AND C<REF(C,1)),CLOSE,OPEN,0.5,0),COLORFFFF00;
STICKLINE((OPEN = CLOSE AND C<REF(C,1)),CLOSE,LOW,0.3,0),COLORFF9C00;
STICKLINE((OPEN = CLOSE AND C<REF(C,1)),OPEN,HIGH,0.3,0),COLORFF9C00;
====================
{选股}
MID := MA(CLOSE,21);
相离:=C-MID;
加仓:=C>=MID AND REF(相离,1)=LLV(相离,5);
股价多头:=C>MA(C,5) AND MA(C,5)>MA(C,10) AND MA(C,10)>MA(C,20);
开始建仓:=FILTER(股价多头,20);
XG:加仓 OR 开始建仓;