飞狐寻庄乖离抓主升浪的应用源码
运用寻庄乖离抓主升,以及运用寻庄乖离确定是否进入主升,这里介绍寻庄乖离的二种用法,
先说第一种用法,就是用乖离K线上穿LXX线(即乖离K线收盘价,指标中的GC),就是图中的白色五角星和棕色五角星,但是需要一定的技术判断;
第二种用法,就是运用图中的虚线粘合寻找拐点
bc:=((H*0.5+L*0.5)*0.382+(O*0.382+C*0.618)*0.618);
FJc:=((EMA(c,6*8)+EMA(c,7*8))/2+MD(c,52))/2;
FJh:=((EMA(h,6*8)+EMA(h,7*8))/2+MD(h,52))/2;
FJl:=((EMA(l,6*8)+EMA(l,7*8))/2+MD(l,52))/2;
FJo:=((EMA(o,6*8)+EMA(o,7*8))/2+MD(o,52))/2;
lxX::((FJc*0.618+FJO*0.382)*0.618+(FJH*0.5+FJL*0.5)*0.382),COLORWHITE;
FILLRGN(FJC>REF(FJC,1),FJH,FJL),COLORBROWN;
FILLRGN(FJC<REF(FJC,1),FJH,FJL),COLORBLUE;
FILLRGN(FJC=REF(FJC,1),FJH,FJL),COLORWHITE;
go:=(O-lxX)*O;
gh:(h-lxX)*h,LINETHICK;
gl:(l-lxX)*L,LINETHICK;
gc:(c-lxX)*c,LINETHICK;
GK:((GH*0.5+GL*0.5)*0.382+(GO*0.382+GC*0.618)*0.618),COLORRED;
mGK:=EMA(GK,3),COLORGREEN;
FILLRGN(GK>mGK,GK,mGK),COLORBROWN;
FILLRGN(GK<mGK,GK,mGK),COLORGRAY;
DG:((hhv(Gk,12)+llv(Gk,14))/2+md(Gk,13))/2,COLORYELLOW;
WQFS:=if(INDEXC=C,56,SUMBARS(VOL,CAPITAL));
FSH:=md(HHV(bc,WQFS*0.618),1);
FSL:=md(LLV(bc,WQFS),1);
潮:=(bc-FSL)/((FSH+FSL)/2)*100,COLOR6600FF,LINETHICK2;
水:=(FSH-bc)/((FSL+FSH)/2)*100;
XP:=BARSLAST(cross(潮,水));
HGL:REF(HHV(gk,xp+1),1),COLORWHITE,LINEDOT;
LGL:REF(LLV(gk,xp+1),1),COLORAAAA00,LINEDOT;
MAv:=(MA(v,55*0.691)+MA(v,55)+MA(v,55*1.309))/3;
VGL:=if(INDEXC=c,(md(v,1)-mav)*((H+L+c+O)/4)/mav*100,(ma(v,1)-mav)*(AMOUNT/(V*100)*0.618)/mav);
GLV:=(MA(VGL,5*0.691)+MA(VGL,5)+MA(VGL,5*1.309))/3,COLORGREEN;
STICKLINE(GC>=GO,GL,GH,0.1,0),COLORRED;
STICKLINE(GC>GO,GO,GC,5,0),COLORRED;
STICKLINE(GC>GO,GO,GC,3,0),COLORCC66FF;
STICKLINE(GC<GO,GO,GC,5,0),COLORAAAA00,COLORBLUE;
STICKLINE(GC<GO,GO,GC,3,0),COLORFFCCAA,COLORAAAA00;
STICKLINE(GC<GO,GL,GH,0.1,0),COLOR00bb00;
KLINE(o,h,l,C,0);
DRAWTEXT(CROSS(gc,lxx),0,'★'),COLORBROWN,ALIGN0;
DRAWTEXT(CROSS(gc,lxx)AND DG>ref(DG,1),0,'★'),COLORWHITE,ALIGN0;
变线:0,COLORGRAY;