[转载]特发加密指标(源码 主图)
[attach]18423[/attach]【自选股】固定的副图可以PK任意主图(源码.通道副图.副图.说明)
【自选股】
是个固定的副图可以PK任意主图.就是只要填入你想要固定的副图股票代码.就可以配合任意的主图.对比他们的趋势变化.副图可以是你的自选股.大盘.对应板块.等等
小图的买卖是超级短线必然有失误.仅供参考.不是还有MA5配合.还有通道配合.把问题综合起来看就没用问题了.历来我们都不要你【只看头不看尾】.还是要【兼听则明偏信则暗】.不妨看看其他指标如何再【三思而后行】
其中两个小图引入的大智慧文件夹userdata/bmp里
如果你没有【05引】你必需建立个引入文件如下:------------
[code]
{05引}
CL:C,LINETHICK0;
OL:O,LINETHICK0;
HL:H,LINETHICK0;
LL:L,LINETHICK0;
[/code]
源码如下:
[code]
任意股:='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;
[/code] [size=19.2px]任意主图公式中加入代码: 大智慧[/size]
[size=19.2px][code]
zt:=1.1*REF(C,1)-C<=0.01;
STICKLINE(zt=1,C,O,2,0),COLORYELLOW;
涨停观察:SELFDATA('涨停观察'),LINETHICK0;
DRAWTEXT(涨停观察>0,涨停观察,'↖涨停观察'),COLORRED;
STICKLINE(涨停观察>0,涨停观察,涨停观察,22,0),COLORYELLOW;
[/code][/size]
[size=19.2px][attach]18424[/attach]
[/size] 【自由副图】副图 源码 贴图 不错的通道公式[attach]18425[/attach]
【自由副图】
[code]
ZSC:="05引.cl#day";
ZSO:="05引.ol#day";
ZSH:="05引.hl#day";
ZSL:="05引.ll#day";
{股票的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.01;
BB:=BM-BM1<-0.01;
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;
[/code]
页:
[1]