飞狐四合一背离指标公式,飞狐趋势环主图指标公式
admin888
|飞狐四合一背离指标公式,飞狐趋势环主图指标公式
飞狐四合一背离指标公式
difF :=ema(CLOSE,12) - Ema(CLOSE,26);
DEA :=EMA(DIFF,9);
macd:=2*(DIFF-DEA), COLORstICK,LINETHICK2;
TRTR := SUM(MAX(MAX(HIGH-LOW,Abs(HIGH-REF(CLOSE,1))),ABS(LOW-REF(CLOSE,1))),14);
HD := HIGH-REF(HIGH,1);
LD := REF(LOW,1)-LOW;
PDM:= SUM(IF(HD>0 AND HD>LD,HD,0),14);
MDM:= SUM(IF(LD>0 AND LD>HD,LD,0),14);
pdi:= PDM*100/TRTR;
mdi:= MDM*100/TRTR;
A1:=BArslAST(ref(cross("macd.diff"(12,26,9),"macd.dea"(12,26,9)),1));
B1:=ref(c,A1+1)>c and ref("macd.diff"(12,26,9),A1+1)<"macd.diff"(12,26,9) and cross("macd.diff"(12,26,9),"macd.dea"(12,26,9));
A2:=BARSLAST(ref(cross("kdj.k"(9,3,3),"kdj.d"(9,3,3)),1));
B2:=ref(c,A2+1)>c and ref("kdj.k"(9,3,3),A2+1)<"kdj.k"(9,3,3) and cross("kdj.k"(9,3,3),"kdj.d"(9,3,3));
A3:=BARSLAST(ref(cross("rsi.RSI1"(6,12,24),"RSI.RSI2"(6,12,24)),1));
B3:=ref(c,A3+1)>c and ref("RSI.RSI1"(6,12,24),A3+1)<"RSI.RSI1"(6,12,24) and cross("RSI.RSI1"(6,12,24),"RSI.RSI2"(6,12,24));
C1:=BARSLAST(ref(cross("macd.dea"(12,26,9),"macd.diff"(12,26,9)),1));
D1:=ref(c,C1+1)
C2:=BARSLAST(ref(cross("kdj.d"(9,3,3),"kdj.k"(9,3,3)),1));
D2:=ref(c,C2+1)
C3:=BARSLAST(ref(cross("RSI.RSI2"(6,12,24),"RSI.RSI1"(6,12,24)),1));
D3:=ref(c,C3+1)
C4:=BARSLAST(ref(cross(mdi,pdi),1));
D4:=ref(c,C+1)
A4:=BARSLAST(ref(cross(PDI,MDI),1));
B4:=ref(c,A4+1)>c and ref(pdi,A4+1) dmi底背:IF(B4>0,-0.1,0),COLOR0099FF,POINTDOT; MACD底背:if(B1>0,-0.1,0),colorred,pointdot; KDJ底背:if(B2>0,-0.1,0),colorff00ff,pointdot; RSI底背:if(B3>0,-0.1,0),coloryellow,pointdot; DMI顶背:IF(D4>0,0.1,0),COLORBLUE,POINTDOT; MACD顶背:if(D1>0,0.1,0),color00ff00,pointdot; KDJ顶背:if(D2>0,0.1,0),colorffcc66,pointdot; RSI顶背:if(D3>0,0.1,0),colorwhote,pointdot; STICKLINE(B1>0,-0.1,0,6,0),colorred; STICKLINE(B2>0,-0.1,0,6,0),colorff00ff; STICKLINE(B3>0,-0.1,0,6,0),coloryellow; STICKLINE(d1>0,0.1,0,6,0),color00ff00; STICKLINE(d2>0,0.1,0,6,0),colorffcc66; STICKLINE(d3>0,0.1,0,6,0),colorwhite; STICKLINE(B4>0,-0.1,0,6,0),color0099ff; STICKLINE(D4>0,0.1,0,6,0),colorblue; 飞狐趋势环主图指标公式 input: n(13,6,40); fo:=if(checkuser(1),o,0); fh:=if(checkuser(1),h,0); fl:=if(checkuser(1),l,0); fc:=if(checkuser(1),c,0); <%vo=ffl.vardata("fo") vh=ffl.vardata("fh") vl=ffl.vardata("fl") vc=ffl.vardata("fc") last=ubound(vc) vc(0)=(vh(0)+vl(0)+2*vc(0))/4 for i=1 to last vo(i)=(vo(i-1)+vc(i-1))/2 if vo(i)>vh(i) then vh(i)=vo(i) else vh(i)=vh(i) if vo(i) vc(i)=(2*vc(i)+vh(i)+vl(i))/4next ffl.vardata("fo")=vo ffl.vardata("fh")=vh ffl.vardata("fl")=vl ffl.vardata("fc")=vc%> kk:=if(fc>=fo and (fc>=ref(fc,1) or ref(fc,1)>=ref(fo,1)),1,if(fc 明:(fo+fc)/2,shift1,colorff00; 转:=if(kk=1,min(fc,fo),if(kk=-1, max(fc,fo),if(ref(kk,1)=1,min(fc,fo),if(ref(kk,1)=-1,max(fc,fo),(fc+fo)/2)))); drawnumber(islastbar,明,明,2),shift1; drawnumber(islastbar,if(fc>fo,明*0.97,明*1.03),转,2),shift1; 中:=ma(c,n); 天:=中+2*stdp(c,n); 罗:=中+stdp(c,n); 地:=中-stdp(c,n); 网:=中-2*stdp(c,n); mk:=if(kk=1,h,if(kk=-1,c,if(ref(kk,1)=1,h,c))); cir1:if(max(c,o)>中 and l>地 and 明>地,明+0.2*sqrt(ma((mk+中)*(mk-中),3)),明),colorff00ff; cir2:if(max(c,o)>中 and l>地 and 明>地,明-0.2*sqrt(ma((mk+中)*(mk-中),3)),明),colorff00ff; stickline(kk=1,min(fo,fc),min(fo,fc)+abs(fc-fo)*1/8,8,0),colorff; stickline(kk=1,min(fo,fc)+abs(fc-fo)*1/8,min(fo,fc)+abs(fc-fo)*2/8,8,0),color33ff; stickline(kk=1,min(fo,fc)+abs(fc-fo)*2/8,min(fo,fc)+abs(fc-fo)*3/8,8,0),color66ff; stickline(kk=1,min(fo,fc)+abs(fc-fo)*3/8,min(fo,fc)+abs(fc-fo)*4/8,8,0),color99ff; stickline(kk=1,min(fo,fc)+abs(fc-fo)*4/8,min(fo,fc)+abs(fc-fo)*5/8,8,0),colorbbff; stickline(kk=1,min(fo,fc)+abs(fc-fo)*5/8,min(fo,fc)+abs(fc-fo)*6/8,8,0),colorccff; stickline(kk=1,min(fo,fc)+abs(fc-fo)*6/8,min(fo,fc)+abs(fc-fo)*7/8,8,0),coloreeff; stickline(kk=1,min(fo,fc)+abs(fc-fo)*7/8,min(fo,fc)+abs(fc-fo)*8/8,8,0),colorffff; stickline(kk=-1,min(fo,fc),min(fo,fc)+abs(fc-fo)*1/8,8,0),colorffff; stickline(kk=-1,min(fo,fc)+abs(fc-fo)*1/8,min(fo,fc)+abs(fc-fo)*2/8,8,0),colorffee00; stickline(kk=-1,min(fo,fc)+abs(fc-fo)*2/8,min(fo,fc)+abs(fc-fo)*3/8,8,0),colorffcc00; stickline(kk=-1,min(fo,fc)+abs(fc-fo)*3/8,min(fo,fc)+abs(fc-fo)*4/8,8,0),colorffaa00; stickline(kk=-1,min(fo,fc)+abs(fc-fo)*4/8,min(fo,fc)+abs(fc-fo)*5/8,8,0),colorff8800; stickline(kk=-1,min(fo,fc)+abs(fc-fo)*5/8,min(fo,fc)+abs(fc-fo)*6/8,8,0),colorff6600; stickline(kk=-1,min(fo,fc)+abs(fc-fo)*6/8,min(fo,fc)+abs(fc-fo)*7/8,8,0),colorff3300; stickline(kk=-1,min(fo,fc)+abs(fc-fo)*7/8,min(fo,fc)+abs(fc-fo)*8/8,8,0),colorff0000; stickline(fc>fo,fh,fc,0.4,0),colorff; stickline(fc>fo,fo,fl,0.4,0),colorff; stickline(fo>fc,fh,fo,0.4,0),colorffff00; stickline(fo>fc,fc,fl,0.4,0),colorffff00; stickline(kk=0 and fc>=fo,fo,fc,8,1),colorff00ff; stickline(kk=0 and fc 牛市通网是一个牛股推荐网与低风险投资知识网,可以在线联系客服领取牛股。牛市通网从权威的投资专家、金融分析师等投资信息中挑选优质的文章进行发布。牛市通网主要为投资者提供股票知识、股票观点、股票分析和明智金融投资讨论等信息。