如何将布林线和均线结合在一张图上使用?
N:=88;
MID :=MA(CLOSE,N);
UPPER:((MID +2*STD(CLOSE,N))+ma(c,24))/2;
LOWER:(( MID - 2*STD(CLOSE,N))+ma(c,60))/2;
MIDD: (UPPER+LOWER)/2;
布林线(Boll)指标是通过计算股价的“标准差”,再求股价的“信赖区间”。该指标在图形上画出三条线,其中上下两条线可以分别看成是股价的压力线和支撑线,而在两条线之间还有一条股价平均线,布林线指标的参数最好设为20。一般来说,股价会运行在压力线和支撑线所形成的通道中。
移动平均线,Moving Average,简称MA,原本的意思是移动平均,由于我们将其制作成线形,所以一般称之为移动平均线,简称均线。它是将某一段时间的收盘价之和除以该周期。 比如日线MA5指5天内的收盘价除以5 。
移动平均线是由著名的美国投资专家Joseph E.Granville(葛兰碧,又译为格兰威尔)于20世纪中期提出来的。均线理论是当今应用最普遍的技术指标之一,它帮助交易者确认现有趋势、判断将出现的趋势、发现过度延生即将反转的趋势。按你的意思我尝试了一下,觉得不错。你试一下吧,N:=88 这个数值你可以任意改动。
N:=88;
MID :=MA(CLOSE,N);
UPPER:((MID +2*STD(CLOSE,N))+ma(c,24))/2;
LOWER:(( MID - 2*STD(CLOSE,N))+ma(c,60))/2;
MIDD: (UPPER+LOWER)/2;非常准确的布林买卖主图副图(通达信),看看合适不?图片演示在源码下面网址里.
VAR1:=1;
VAR2:=REF(CLOSE-OPEN, 2);
VAR3:=REF(CLOSE, 1);
VAR4:=REF(CLOSE, 2);
VAR5:=REF(CLOSE, 3);
VAR6:=REF(CLOSE, 4);
VAR7:=MAX(MAX(MAX(CLOSE, VAR3), VAR4), VAR5);
VAR8:=MIN(MIN(MIN(CLOSE, VAR3), VAR4), VAR5);
{红持股:STICKLINE(CLOSE=VAR7 AND (VAR3>=VAR4 OR VAR3>=VAR5) OR VAR3=VAR7 AND (VAR4=VAR8 OR VAR5=VAR8) AND CLOSE>=VAR4 OR VAR4=VAR7 AND VAR5=VAR8 AND CLOSE>=VAR3 OR VAR5=VAR7 AND CLOSE>=VAR3 AND CLOSE>=VAR4, VAR3, CLOSE, 5, 1), COLORRED;}
{品红变盘:STICKLINE(CLOSE=VAR7 AND VAR3=VAR8, VAR4, CLOSE, 5, 1), COLORMAGENTA;}
{黄下跌:STICKLINE(CLOSE=VAR8 AND (VAR3=VAR4 OR (VAR4=VAR8 AND VAR3<=VAR5 OR VAR5=VAR8 AND VAR3<=VAR4) AND VAR4=VAR3, VAR3, VAR4, 5, 0), COLORGREEN;}
蓝卖:STICKLINE(VAR3=VAR7 AND CLOSEVAR5 OR VAR5=VAR7 AND VAR3>VAR4) AND VAR4>=VAR6 AND CLOSE450, 8, IF(CLOSE>=20 AND CLOSE<150, 0.200, IF(CLOSE<20 AND CLOSE>=10, 0.070, IF(CLOSE<10, 0.030, 0.070))));
{变色龙:STICKLINE(CLOSE>VAR9, VAR10, VAR10+VAR11, 6, 0), COLORMAGENTA;}
STICKLINE(CLOSE60 AND HIGH>阻力,HIGH,'★警'), COLORYELLOW;
突破:DRAWTEXT(VARE<15 AND CROSS(VAR55,通道),LOW,'★突破'), COLORAAAAAA;
MA5:MA(C,5);
BB5:=MA5-REF(MA5,1);
MA10:MA(C,10);
BB10:=MA10-REF(MA10,1);
MA20:=EMA(C,20);
A1:=FILTER(MA5>REF(MA5,1)AND MA10>REF(MA10,1)AND MA20>REF(MA20,1)AND MA5A8),H+0.08,' 卖'),COLORGREEN;
副图源码:
VAR1:=CLOSE>REF(CLOSE,1) AND CLOSE>REF(CLOSE,2);
VAR2:=REF(VAR1,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VAR3:=REF(VAR2,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VAR4:=REF(VAR3,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VAR5:=REF(VAR4,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VAR6:=REF(VAR5,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VAR7:=REF(VAR6,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VAR8:=REF(VAR7,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VAR9:=REF(VAR8,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VARA:=REF(VAR9,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VARB:=REF(VARA,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VARC:=REF(VARB,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
STICKLINE(VAR1 OR VAR2 OR VAR3 OR VAR4 OR VAR5 OR VAR6 OR VAR7 OR VAR8 OR VAR9 OR VARA OR VARB OR VARC,CLOSE,REF(CLOSE,1),3,1),COLOR0000FF;
VARD:=CLOSE=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VARF:=REF(VARE,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VAR10:=REF(VARF,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VAR11:=REF(VAR10,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VAR12:=REF(VAR11,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VAR13:=REF(VAR12,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VAR14:=REF(VAR13,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VAR15:=REF(VAR14,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VAR16:=REF(VAR15,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VAR17:=REF(VAR16,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VAR18:=REF(VAR17,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
STICKLINE(VARD OR VARE OR VARF OR VAR10 OR VAR11 OR VAR12 OR VAR13 OR VAR14 OR VAR15 OR VAR16 OR VAR17 OR VAR18,CLOSE,REF(CLOSE,1),3,0),COLORC08000;
VAR19:=REF(VARD OR VARE OR VARF OR VAR10 OR VAR11 OR VAR12 OR VAR13 OR VAR14 OR VAR15 OR VAR16 OR VAR17 OR VAR18,1) AND VAR1;
STICKLINE(VAR19,REF(CLOSE,1),REF(CLOSE,2),3,0),COLORFF00FF;
VAR1A:=REF(VAR1 OR VAR2 OR VAR3 OR VAR4 OR VAR5 OR VAR6 OR VAR7 OR VAR8 OR VAR9 OR VARA OR VARB OR VARC,1) AND VARD;
STICKLINE(VAR1A,REF(CLOSE,1),REF(CLOSE,2),3,0) ,COLOR00FF00;
涨家数:INDEXADV,NODRAW,COLORLIMAGENTA ;
跌家数:INDEXDEC,NODRAW,COLORGREEN;
BOLL:MA(CLOSE,20),COLORWHITE;
UPPER:BOLL+2*STD(CLOSE,20),COLORYELLOW;
LOWER:BOLL-2*STD(CLOSE,20),COLORRED;不知道你所谓的“结合”指的是什么
如果只是把布林和两条均线同时在主图上显示,就很简单了:
N 2 100 11
M 2 100 6
CV:=CLOSE;
BBIBOLL:(MA(CV,3)+MA(CV,6)+MA(CV,12)+MA(CV,24))/4;
UPR:BBIBOLL+M*STD(BBIBOLL,N);
DWN:BBIBOLL-M*STD(BBIBOLL,N);
MA1:MA(CLOSE,24),COLORCYAN;
MA2:MA(CLOSE,60),COLORLIGREEN;
如果你所谓的“结合”基于某种组合算法,那么加入相关定义也就实现了。1、布林线(boll)是一个股票的趋势走势指标,有上轨(压力)和下轨(支撑)和中轨构成,表示股价的走势趋向,如果开口向上表示上升趋势,相反则表示下降趋势。
2、平均线(ma)则是一个价格的成本平均线指标,其:5日均线、10日均线、30日均线,分别表示5、10、30日的价格平均成本,它们的排列方式表示多头或空头趋势。
要是想把主图指标改为均线,就直接在键盘上按ma或者ma2然后回车,要是想改为布林线,就按boll再回车就可以了。
求教同花顺软件上在K线图上添加BOLL线的方法
很简单的操作,右键--窗口--三到四(选择)--然后选中一栏(鼠标在栏里点一下)--输入BOLL(布林线)--回车,这雅马哈盘面就多了一个小窗口,窗口里心事的就是BOLL(布林线)了。05+回车是很多炒股软件通用的切换法
同花顺,你可以看最下面的选项,有k线和分时走势的切换。用鼠标点也可以。
同花顺的boll叠加不到k线上,只能在下面以boll+宝塔线的模式显示(那个是叫宝塔线吧?)用鼠标点击BOLL(不要松开),直接把他拉到K线图上就行了。