这是【舍得快乐】帮助把这个指标改编的我转给使用飞狐软件的同学(因为我根本不用飞狐软件)
-------谢谢jin老师的精彩分享,为了支持,特转成飞狐版如下:---------------------------
任意股:='600363'; {选择你要关心的股票代码.例如上证:SH000001}
DRAWGBK(DATE>900101,COLORRGB(0,50,0),COLORRGB(0,0,100),1);
DRAWTEXTEX(1,0,500,5,'===【'+STKNAMEEX(任意股)+'--PK--'+ STKNAME+'】==='),Color00FFFF,LINETHICK4;
ZSC:=STKINDI(任意股,'05引.CL',0,-1);
ZSO:=STKINDI(任意股,'05引.OL',0,-1);
ZSH:=STKINDI(任意股,'05引.HL',0,-1);
ZSL:=STKINDI(任意股,'05引.LL',0,-1);
收盘:ZSC,LINETHICK0,COLORFFFFCC;
开盘:ZSO,LINETHICK0,Color9DFFFF;
最高:ZSH,LINETHICK0,ColorABFF46;
最低:ZSL,LINETHICK0,COLORFFAA66;
{乖离止盈止损}
DRAWTEXTex(1,0,30,30,'【乖离红卖绿买】'),LINETHICK3,Color00FF00;
M20:=MA(ZSC,18);
乖离20:=ABS((2*ZSC+ZSH+ZSL)/4-M20)/M20;
乖离线:=DMA(ZSC,乖离20);
止盈:乖离线*1.06,COLOR00ffff,LINETHICK; {20天均线乖离+6%}
止损:乖离线*0.94,COLOR00ff00,LINETHICK; {20天均线乖离-6%}
FILLRGN(止盈>乖离线,止盈,乖离线),ColorA00000;
FILLRGN(乖离线>止损,乖离线,止损),Color323232;
FILLRGN(止盈<止盈*1.05,止盈,止盈*1.05),Color500050;
FILLRGN(止损>止损*0.95,止损,止损*0.95),Color003C00;
PARTLINE(1,止盈),COLOR00ffff;
PARTLINE(1,止损),COLOR00ff00;
止盈*1.05,COLOR0077ff;
止损*0.95,COLORff9900;
PARTLINE(1,乖离线),LINEDOT,COLORRED;
PARTLINE(乖离线<=REF(乖离线,1),乖离线),LINEDOT,COLORGREEN;
{股票的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;
{红股.绿币的趋势线}
{MA5}
重心:WMA((2*ZSC+ZSH+ZSL)/4,2),COLOR00FFFF,LINETHICK0;
MA5:WMA(重心,5),COLOR00FF00,LINEDOT;
PARTLINE(MA5>REF(MA5,1),MA5),linethick3,,Color00B4FF;
{.吸入抛出}
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;
drawicon(CROSS(AA,BB),(ZSL*0.99),'BU'),align0;
drawicon(CROSS(BB,AA),(ZSH*1.02),'SE'),align0;
==============================================================================================
这是引入文件【舍得快乐】已经放在压缩文件里了
{05引}
CL:C,LINETHICK0;
OL:O,LINETHICK0;
HL:H,LINETHICK0;
LL:L,LINETHICK0;
=====================================================================================================
下边是小图.和引入指标的文件
买卖图标附件下载后解压到飞狐的FmlDLL 文件夹下----→ FmlDLL.rar (1.14 KB)
不会自建指标的可以下载文件导入:
|