第一.我们以MA20为买卖分水岭.以股价对于20天均线的乖离确定止盈止损.用四种颜色区分【1】紫色---卖出区.【2】蓝色---股价大于乖离线.【3】深蓝色---股价小于乖离线.【4】绿色----买入区.
第二.用CYC(3)成本线金黄s表示可持股.浅蓝色表示下跌可持币.
第三.用数字显示CROSS(RSI,80)的RSI大于80的具体数字.提醒你指标显示有卖出的需求.
第四.在今天的K线上显示RSI的今天的数字以提示当前距离RSI大于80还有多远.
第五.因为每个股票都有他自己的特性.这是由于.基本面.技术面.消息面.还有庄家的个性.操盘手的性格等等要素.各有不同.所以严格的讲不是一个指标一成不变会适用所有股票.所以指标里的参数也可以因股而改变.这就要求使用指标的人.学会指标内的调整参数.
A.指标参数是可变的比如MA(C,20)可改为MA(C,13).MA(C,18).MA(C,30).等等为了省事M20可不变.
B.止盈:乖离DM*1.06的1.06可改为1.05.1.04等等.同理止损:乖离DM*0.94可改为0.95.0.96
C.成本CYC(5)也可改为CYC(3).CYC(8)为了省事Y5可不变.
D.成本:=SMA(COST(97),3,1);线上立柱红绿显示其中97也是可变的.
E.换手牛熊线就是DMA(C,VOL/CAPITAL)用金黄和蓝立柱表示在线的下方.这个函数直接反映量价关系.说明在股价涨跌中有没有量的配合.因此他可以确认其涨跌的可靠程度.量价同升.则涨的可靠.反之量价同降.跌的可能性也可靠.不过此线仅仅用于参考.不能用于买卖的依据.
下面是源码:--------------------------------------
{买卖四色}
{20天均线乖离}
M20:MA(C,20),COLOR0000ff,LINETHICK0; {买卖分水岭}
DRAWTEXTABS(10,5,'▓分水岭MA20: '+NUMTOSTRN(MA(C,20),2)+'元'),Color0000FF,LINETHICK3;
DRAWTEXTABS(10,25,'▓十日内最高价: '+NUMTOSTRN(hhv(H,10),2)+'元'),Color0099FF,LINETHICK3;
DRAWTEXTABS(10,45,'▓十日内最低价: '+NUMTOSTRN(LLV(L,10),2)+'元'),ColorFF9900,LINETHICK3;
DRAWTEXTABS(10,65,'▓六十日最高价: '+NUMTOSTRN(HHV(H,60),2)+'元 ' ),Color00FFFF,LINETHICK3;
DRAWTEXTABS(10,85,'▓六十日最低价: '+NUMTOSTRN(LLV(L,60),2)+'元 ' ),Color00FF00,LINETHICK3;
{乖离止盈止损}
乖离20:=ABS((2*C+H+L)/4-M20)/M20;
乖离线:DMA(C,乖离20),COLORgray;
PARTLINE(乖离线 ,(乖离线>REF(乖离线,1))-1,rgb(0,255,0),1,rgb(255,0,0) ),DOTLINE,LAYER0;
止盈:乖离线*1.06,COLOR00ffff,LINETHICK1; {20天均线乖离+6%}
止损:乖离线*0.94,COLOR00ff00,LINETHICK1; {20天均线乖离-6%}
FILLRGN(止盈,乖离线,止盈>乖离线,RGB(0,0,255)),LAYER5;
FILLRGN(乖离线,止损,乖离线>止损,RGB(0,0,155)),LAYER5;
止盈*1.05,COLOR0077ff; 止损*0.95,COLORff9900;
FILLRGN(止盈,止盈*1.05,止盈<止盈*1.05,RGB(100,0,100)),LAYER7;
FILLRGN(止损,止损*0.95,止损>止损*0.95,RGB(0,80,0)),LAYER7;
{成本5}
Y5:CYC(5),COLORFFFFFF,LINETHICK1;
PARTLINE(Y5 ,(Y5>REF(Y5,1))-1,rgb(0,155,255),1,rgb(255,200,0) ),LINETHICK3,LAYER0;
{RSI=80}
LC:=REF(C,1);
RSI:((SMA(MAX((C - LC),0),3,1) / SMA(ABS((C - LC)),3,1)) * 100),LINETHICK0;
DRAWTEXT(CROSS(RSI,80) ,high*1.01,'RSI.'+NUMTOSTRN(RSI,0)+''),COLOR00ffFF,ALIGN1,LINETHICK1;
DRAWTEXT(DISPSTATUS=2,止盈*1.05,'【RSI:'+NUMTOSTRN(RSI,0)+'】'),COLOR0099FF,LINETHICK3,ALIGN1;
p:=BARSSINCE(DISPSTATUS=1)+1;
E:llvall(llv(l,p))*0.98;
{成本}
成本:=SMA(COST(97),3,1);
成本R:=(成本-REF(成本,1))*4;
STICKLINE(成本R>0,E+成本R,E,6,0),Color0000FF;
STICKLINE(成本R<0,E-成本R,E,6,0),ColorFF9900;;
{换手牛熊}
换手C:=SMA(DMA(C,VOL/CAPITAL),3,1);
换手R:=(换手C-REF(换手C,1))*6;
STICKLINE(换手R>0,E-换手R,E,6,0),Color0598FF;
STICKLINE(换手R<0,E+换手R,E,6,0),Color00FF00;
{K线}
STICKLINE(CLOSE>OPEN or CLOSE=OPEN and CLOSE>REF(CLOSE,1),LOW,HIGH,0.1,0),colorred;
STICKLINE(CLOSE<OPEN or CLOSE=OPEN and CLOSE<=REF(CLOSE,1),LOW,HIGH,0.1,0),colorcyan;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,8,0 ),COLOR008800;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,6,0 ),COLOR00AA00;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,5,0 ),COLOR00BB00;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,4,0 ),COLOR00CC00;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,3,0 ),COLOR00DD00;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,2,0 ),COLOR00EE00;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,1,0 ),COLOR00FF00;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,8,0) ,COLOR000066;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,7,0) ,COLOR000088;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,6,0) ,COLOR0000AA;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,5,0) ,COLOR0000BB;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,4,0) ,COLOR0000CC;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,3,0) ,COLOR0000DD;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,2,0) ,COLOR0000EE;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,1,0) ,COLOR0000FF;
|