手机端
当前位置:爱约股 > 公式技巧 > 把买卖量指标改成飞狐用的

把买卖量指标改成飞狐用的

请老师帮忙把买卖指标改成飞狐用的,谢谢 以下是源码: AA:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN)); 买量:=IF(CLOSE>OPEN,AA*(HIGH-LOW),IF(CLOSE<OPEN,AA*((HIGH-OPEN)+(CLOSE-LOW)),VOL/2)),LINETHICK0,COLORRED; 卖量:=IF(CLOSE>OPEN,0-AA*((HIGH-CLOSE)+(OPEN-LOW)),IF(CLOSE<OPEN,0-AA*(HIGH-LOW),0-VOL/2)),LINETHICK0,COLORGREEN; 进出量:=买量+卖量,COLOR00FFFF;STICKLINE(进出量<0,0,进出量,1,0),COLORFF6600; STICKLINE(进出量<0,0,进出量,3,0),COLORFF9900; STICKLINE(进出量<0,0,进出量,1.5,0),COLORFFCC00; STICKLINE(进出量<0,0,进出量,0.5,0),COLORCYAN; STICKLINE(进出量>0,0,进出量,3,0),COLOR000099; STICKLINE(进出量>0,0,进出量,3,0),COLOR0000CC; STICKLINE(进出量>0,0,进出量,1.0,0),COLOR0000FF; STICKLINE(进出量>0,0,进出量,0.5,0),COLORCC66FF;N:=1;QJ0:=(HIGH+LOW+CLOSE)/3; QJ1:=IF(HIGH=LOW,1,HIGH-MAX(OPEN,CLOSE)); QJ2:=IF(HIGH=LOW,1,MAX(CLOSE,OPEN)-QJ0); QJ3:=IF(HIGH=LOW,1,MIN(OPEN,CLOSE)-LOW); QJ4:=IF(HIGH=LOW,1,QJ0-MIN(CLOSE,OPEN)); QJ5:=VOL/(IF(HIGH=LOW,4,HIGH-LOW)); QJ6:="MACD.DIF">"MACD.DEA" AND "MACD.DEA"<0; QJ7:="KDJ.K">"KDJ.D" AND "KDJ.D"<30; QJ8:="MACD.DIF"<"MACD.DEA"; QJ9:="KDJ.K"<"KDJ.D" AND "KDJ.K">80; 特大:QJ4*QJ5,NODRAW;大单:QJ3*QJ5,NODRAW; 中单:QJ1*QJ5,NODRAW;小单:QJ2*QJ5,NODRAW; W1:=SUM(大单,N)+SUM(特大,N);W2:=SUM(小单,N)+SUM(中单,N); 量振1:=特大>大单 AND 大单>小单; 量振2:=特大<小单 AND 大单<小单; 标振1:=QJ6 AND QJ7; 标振2:=QJ8 AND QJ9; A:=W1-W2;A0:=IF(A>0,A,0);B0:=IF(A<0,A,0); STICKLINE(A0,0,A0,1,0),COLOR000044; 主力持仓:EMA(100*(CLOSE-LLV(LOW,34))/(HHV(HIGH,34)-LLV(LOW,34)),3),COLORFF00FF; 主力筹码集中度:WINNER(C)*100,COLORRED;

爱约股解答:

aa:=vol/((high-low)*2-abs(close-open));

买量:=if(close>open,aa*(high-low),if(close<open,aa*((high-open)+(close-low)),vol/2)),linethick0,colorred;

卖量:=if(close>open,0-aa*((high-close)+(open-low)),if(close<open,0-aa*(high-low),0-vol/2)),linethick0,colorgreen;

进出量:=买量+卖量,color00ffff;stickline(进出量<0,0,进出量,1,0),colorff6600;

stickline(进出量<0,0,进出量,3,0),colorff9900;

stickline(进出量<0,0,进出量,1.5,0),colorffcc00;

stickline(进出量<0,0,进出量,0.5,0),colorcyan;

stickline(进出量>0,0,进出量,3,0),color000099;

stickline(进出量>0,0,进出量,3,0),color0000cc;

stickline(进出量>0,0,进出量,1.0,0),color0000ff;

stickline(进出量>0,0,进出量,0.5,0),colorcc66ff;n:=1;qj0:=(high+low+close)/3;

qj1:=if(high=low,1,high-max(open,close));

qj2:=if(high=low,1,max(close,open)-qj0);

qj3:=if(high=low,1,min(open,close)-low);

qj4:=if(high=low,1,qj0-min(close,open));

qj5:=vol/(if(high=low,4,high-low));

qj6:="macd.dif">"macd.dea" and "macd.dea"<0;

qj7:="kdj.k">"kdj.d" and "kdj.d"<30;

qj8:="macd.dif"<"macd.dea";

qj9:="kdj.k"<"kdj.d" and "kdj.k">80;

特_大:qj4*qj5,linethick;

大_单:qj3*qj5,linethick;

中_单:qj1*qj5,linethick;

小_单:qj2*qj5,linethick;

w1:=sum(大_单,n)+sum(特_大,n);w2:=sum(小_单,n)+sum(中_单,n);

量振1:=特_大>大_单 and 大_单>小_单;

量振2:=特_大<小_单 and 大_单<小_单;

标振1:=qj6 and qj7;

标振2:=qj8 and qj9;

a:=w1-w2;a0:=if(a>0,a,0);b0:=if(a<0,a,0);

stickline(a0,0,a0,1,0),color000044;主力持仓:ema(100*(close-llv(low,34))/(hhv(high,34)-llv(low,34)),3),colorff00ff;主力筹码集中度:winner(c)*100,colorred;

TAG:
分享至:

相关推荐