以下源码是大智慧2的(叫分时买卖),飞狐也能通过,但在分时上却不显示,请各位帮忙解决一下好吗? 以下是源码:OBV:=SUM(IF(CLOSE>REF(CLOSE,1),VOL,IF(CLOSE<REF(CLOSE,1),-VOL,0)),0);
RSV:=(OBV-LLV(OBV,34))/(HHV(OBV,34)-LLV(OBV,34))*100; K:SMA(RSV,5,1); D:SMA(K,3,1); Jj:=3*K-2*D; j:if(jj>100,100,jj); AA1:=(EMA(CLOSE,12)-EMA(CLOSE,26))*100+50; AA2:=EMA(AA1,9); AA3:=(HHV(HIGH,21)-CLOSE)/(HHV(HIGH,21)-LLV(LOW,21))*100-10; AA4:=(CLOSE-LLV(LOW,34))/(HHV(HIGH,34)-LLV(LOW,34))*100; AA5:=SMA(AA4,13,8); OBV走势:CEILING(SMA(AA5,13,8)); AA6:=SMA(AA3,21,8); 买观注: STICKLINE(OBV走势-AA6<-65,0,5,15,1); 买进:LONGCROSS(AA1,AA2*1.05,15) AND AA1<40; 卖观注: STICKLINE(OBV走势-AA6>85,95,90,15,1); 卖出:STICKLINE(LONGCROSS(AA2,AA1*0.95,7) AND AA1>0,100,80,6,0); 黄s:=SMA(L,21,2)*0.95; 绿色:=SMA(C,2,1); 买:CROSS(绿色,黄s)*60; 80; 20; 45; 下面是飞狐的源码 {分时试验-飞狐} rc:DYNAINFO( 3); hh:=DYNAINFO(5);//最高 q:=DATACOUNT; LL:=DYNAINFO(6);//最低 f:=MAX(hh-rc,rc-LL); ff:=f/rc*100; q2h:IF(ff<1,0.9797*rc,rc-2*f*1.016); q2l:IF(ff<1,0.9697*rc,rc-3*f*1.011); FILLRGN(CLOSE,q2h,q2l),COLORBLACK; czzz:=(q2h-q2l)/10; q2l+1*czzz,POINTDOT,COLORBLUE; q2l+2*czzz,POINTDOT,COLORBLUE; q2l+5*czzz,POINTDOT,COLORWHITE; q2l+8*czzz,POINTDOT,COLORGREEN; q2l+9*czzz,POINTDOT,COLORGREEN; OBV:=SUM(IF(CLOSE>REF(CLOSE,1),VOL,IF(CLOSE<REF(CLOSE,1),-VOL,0)),0); RSV:=(OBV-LLV(OBV,34))/(HHV(OBV,34)-LLV(OBV,34))*100; K:=SMA(RSV,5,1); D:=SMA(K,3,1); Jj:=3*K-2*D; j:=if(jj>100,100,jj); AA1:=(EMA(CLOSE,12)-EMA(CLOSE,26))*100+50; AA2:=EMA(AA1,9); AA3:=(HHV(HIGH,21)-CLOSE)/(HHV(HIGH,21)-LLV(LOW,21))*100-10; AA4:=(CLOSE-LLV(LOW,34))/(HHV(HIGH,34)-LLV(LOW,34))*100; AA5:=SMA(AA4,13,8); OBV走势:=CEILING(SMA(AA5,13,8)); AA6:=SMA(AA3,21,8); 买进:STICKLINE(LONGCROSS(AA1,AA2*1.05,15) AND AA1<40,q2l,q2l+3*czzz,6,0),LINETHICK5,COLORRED; 卖出:STICKLINE(LONGCROSS(AA2,AA1*0.95,7) AND AA1>0,q2h,q2l+7*czzz,6,0),LINETHICK5,COLORBLUE; 卖观注:IF(OBV走势-AA6>85,q2l+7*czzz,q2h),LINETHICK1,COLORCYAN; 买观注:IF(OBV走势-AA6<-65,q2l+3*czzz,q2l),LINETHICK1,COLOR0066CC; 黄s:=SMA(L,21,2)*0.95; 绿色:=SMA(C,2,1); 买:CROSS(绿色,黄s)*60,LINETHICK0; IF(买,q2l+5*czzz,q2l),COLORYELLOW,,LINETHICK2; //80; //20; //45; mh00:=HHV(MAX(MAX(MAX(K,D),J),OBV走势),0); mL00:=LLV(MIN(MIN(MIN(D,K),J),OBV走势),0); mb00:=(q2h-q2l)/(mH00[q]-mL00[q]); my00:=(q2h+q2l-mb00*(mH00[q]+mL00[q]))/2; K2:K*mb00+my00,COLORWHITE; D2:D*mb00+my00,COLORYELLOW; J2:J*mb00+my00,COLORMAGENTA; OBV走势2:OBV走势*mb00+my00,COLORGREEN; |
