自选股 固定的副图可以PK任意主图 副图 源码
【自选股】是个固定的副图可以PK任意主图.就是只要填入你想要固定的副图股票代码.就可以配合任意的主图.对比他们的趋势变化.副图可以是你的自选股.大盘.对应板块.等等
小图的买卖是超级短线必然有失误.仅供参考.不是还有MA5配合.还有通道配合.把问题综合起来看就没用问题了.历来我们都不要你【只看头不看尾】.还是要【兼听则明偏信则暗】.不妨看看其他指标如何再【三思而后行】
其中两个小图引入的大智慧文件夹userdata/bmp里
如果你没有【05引】你必需建立个引入文件如下:------------
{05引}
CL:C,LINETHICK0;
OL:O,LINETHICK0;
HL:H,LINETHICK0;
LL:L,LINETHICK0;
源码如下:-------------------------------------------------------------------------------------------------------------------------
任意股:='600363'; {选择你要关心的股票代码.例如上证:SH000001}
DRAWGBKlast(DATE>900101,strip(RGB(0,50,0),RGB(0,0,100),0));
DRAWTEXTABS(500,5,'===【'+任意股+'--PK--'+ STKNAME+'】==='),Color00FFFF,LINETHICK4;
ZSC:=STKINDI(任意股,'05引.CL');
ZSO:=STKINDI(任意股,'05引.OL');
ZSH:=STKINDI(任意股,'05引.HL');
ZSL:=STKINDI(任意股,'05引.LL');
{股票的k线}
STICKLINE(ZSC>ZSO,ZSO,ZSH,0.5 ,0 ),COLOR0000FF;
STICKLINE(ZSO>=ZSC,ZSO,ZSH,0.5 ,0 ),COLOR00FF00;
STICKLINE((ZSC <= ZSO),ZSC,ZSO,8,0),color004400;
STICKLINE((ZSC <= ZSO),ZSC,ZSO,7,0),color006600;
STICKLINE((ZSC <= ZSO),ZSC,ZSO,5,0),color008800;
STICKLINE((ZSC <= ZSO),ZSC,ZSO,3,0),COLOR00BB00;
STICKLINE((ZSC <= ZSO),ZSC,ZSO,1,0),COLOR00FF00;
STICKLINE(ZSC>ZSO,ZSC,ZSO,8,0) ,COLOR000044;
STICKLINE(ZSC>ZSO,ZSC,ZSO,7,0) ,COLOR000066;
STICKLINE(ZSC>ZSO,ZSC,ZSO,5,0) ,COLOR000088;
STICKLINE(ZSC>ZSO,ZSC,ZSO,3,0) ,COLOR0000BB;
STICKLINE(ZSC>ZSO,ZSC,ZSO,1,0) ,COLOR0000FF;
收盘:ZSC,LINETHICK0,COLORFFFFCC;
开盘:ZSO,LINETHICK0,Color9DFFFF;
最高:ZSH,LINETHICK0,ColorABFF46;
最低:ZSL,LINETHICK0,COLORFFAA66;
{红股.绿币的趋势线}
{MA5}
重心:WMA((2*ZSC+ZSH+ZSL)/4,2),COLOR00FFFF,LINETHICK0;
MA5:WMA(重心,5),COLOR00FF00,DOTLINE;
PARTLINE(MA5 ,(MA5>REF(MA5,1)),rgb(255,180,0) ),linethick3,LAYER0;
{.吸入抛出}
Var6:=(2*ZSC+ZSH+ZSL)/4;
Var8:=LLV(ZSL,34);
VarA:=HHV(ZSH,34);
BM:=EMA((Var6-Var8)/(VarA-Var8)*100,3);
BM1:=EMA(BM,3);
AA:=BM-BM1>=0;
BB:=BM-BM1<0;
drawbmp(CROSS(AA,BB),(ZSL*0.99),'BU.bmp'),align1,valign0,LAYER0;
drawbmp(CROSS(BB,AA),(ZSH*1.02),'SE.bmp'),align1,valign0,LAYER0;
{乖离止盈止损}
DRAWTEXTABS(30,30,'【乖离红卖绿买】'),LINETHICK3,Color00FF00;
M20:=MA(ZSC,18);
乖离20:=ABS((2*ZSC+ZSH+ZSL)/4-M20)/M20;
乖离线:=DMA(ZSC,乖离20);
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%}
止盈*1.05,COLOR0077ff;
止损*0.95,COLORff9900;
FILLRGN(止盈,乖离线,止盈>乖离线,RGB(0,0,160)),LAYER7;
FILLRGN(乖离线,止损,乖离线>止损,RGB(50,50,50)),LAYER7;
FILLRGN(止盈,止盈*1.05,止盈<止盈*1.05,RGB(80,0,80)),LAYER7;
FILLRGN(止损,止损*0.95,止损>止损*0.95,RGB(0,60,0)),LAYER7;