飞狐超买超卖指标公式

[复制链接]
查看189 | 回复0 | 2021-8-21 11:31:22 | 显示全部楼层 |阅读模式

A1:=REF(C,1);
A2:=SMA(MAX(C-A1,0),5,1)/SMA(ABS(C-A1),5,1)*1000;
A3:=BARSLAST(REF(CROSS("RSI.RSI1"(6,12,24),"RSI.RSI2"(6,12,24)),1));
A4:=A2-LLV(A2,10);
A5:=(MA(A4,2)*3+A4*13)/16;
A6:=IF(A5>13,MA(A5,2),A5)/6;
RSI1:=SMA(MAX(C-A1,0),6,1)/SMA(ABS(C-A1),6,1)*100;
RSI2:=SMA(MAX(C-A1,0),12,1)/SMA(ABS(C-A1),12,1)*100;
RSI3:=SMA(MAX(C-A1,0),24,1)/SMA(ABS(C-A1),24,1)*100;
压力:=HHV(MA(RSI2,3),12);
支撑:=LLV(MA(RSI2,3),12);
中间:(HHV(MA(RSI2,3),12)+LLV(MA(RSI2,3),12))/2,COLORRED,LINETHICK2;
STICKLINE(RSI2<支撑,中间,RSI2,1,0)colorff00;
STICKLINE(RSI2<支撑,中间,RSI2,8,0)color113300;
STICKLINE(RSI2<支撑,中间,RSI2,7,0)color224400;
STICKLINE(RSI2<支撑,中间,RSI2,6,0)color335500;
STICKLINE(RSI2<支撑,中间,RSI2,5,0)color447700;
STICKLINE(RSI2<支撑,中间,RSI2,4,0)color559900;
STICKLINE(RSI2<支撑,中间,RSI2,3,0)color66aa00;
STICKLINE(RSI2<支撑,中间,RSI2,2,0)color77dd00;
STICKLINE(RSI2<支撑,中间,RSI2,1,0)color88FF00;
STICKLINE(RSI2>=支撑 AND RSI2<中间,中间,RSI2,1,0)colorff00;
STICKLINE(RSI2>=支撑 AND RSI2<中间,中间,RSI2,8,0)color113300;
STICKLINE(RSI2>=支撑 AND RSI2<中间,中间,RSI2,7,0)color224400;
STICKLINE(RSI2>=支撑 AND RSI2<中间,中间,RSI2,6,0)color335500;
STICKLINE(RSI2>=支撑 AND RSI2<中间,中间,RSI2,5,0)color447700;
STICKLINE(RSI2>=支撑 AND RSI2<中间,中间,RSI2,4,0)color559900;
STICKLINE(RSI2>=支撑 AND RSI2<中间,中间,RSI2,3,0)color66aa00;
STICKLINE(RSI2>=支撑 AND RSI2<中间,中间,RSI2,2,0)color77dd00;
STICKLINE(RSI2>=支撑 AND RSI2<中间,中间,RSI2,1,0)color88FF00;
STICKLINE(RSI2>=中间 AND RSI2<压力,中间,RSI2,2,0)colorred;
STICKLINE(RSI2>=中间 AND RSI2<压力,中间,RSI2,9,0)color1133;
STICKLINE(RSI2>=中间 AND RSI2<压力,中间,RSI2,8,0)color2244;
STICKLINE(RSI2>=中间 AND RSI2<压力,中间,RSI2,7,0)color3355;
STICKLINE(RSI2>=中间 AND RSI2<压力,中间,RSI2,6,0)color4477;
STICKLINE(RSI2>=中间 AND RSI2<压力,中间,RSI2,5,0)color5599;
STICKLINE(RSI2>=中间 AND RSI2<压力,中间,RSI2,4,0)color66aa;
STICKLINE(RSI2>=中间 AND RSI2<压力,中间,RSI2,3,0)color77dd;
STICKLINE(RSI2>=中间 AND RSI2<压力,中间,RSI2,2,0)color88ff;
STICKLINE(RSI2>=压力,中间,RSI2,2,0)colorred;
STICKLINE(RSI2>=压力,中间,RSI2,8,0)color1133;
STICKLINE(RSI2>=压力,中间,RSI2,7,0)color2244;
STICKLINE(RSI2>=压力,中间,RSI2,6,0)color3355;
STICKLINE(RSI2>=压力,中间,RSI2,5,0)color4477;
STICKLINE(RSI2>=压力,中间,RSI2,4,0)color5599;
STICKLINE(RSI2>=压力,中间,RSI2,3,0)color66aa;
STICKLINE(RSI2>=压力,中间,RSI2,2,0)color77dd;
STICKLINE(RSI2>=压力,中间,RSI2,1,0)color88ff;
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));
DRAWTEXT(B3,RSI2,'底背');
B1:=RSI1>=RSI2 AND RSI2>=RSI3;
S1:=RSI1<RSI2 AND RSI2<RSI3;
BS1:=NOT(RSI1>=RSI2 AND RSI2>=RSI3)AND NOT(RSI1<RSI2 AND RSI2<RSI3);
STICKLINE(B1,80,82,2,1)COLORRED;
STICKLINE(S1,80,82,2,1)COLORGREEN;
STICKLINE(BS1,80,82,2,1)COLORYELLOW;
短线:IF(CROSS(A6,1) AND (A6<30)AND RSI2<35 AND RSI2>=支撑 AND RSI2<中间,30,20),COLORMAGENTA,LINETHICK2;
AA:=VOL/((HIGH-LOW)*2-(ABS(CLOSE-OPEN)))*100;
主动买盘:=IF(CLOSE>OPEN,AA*(HIGH-LOW),IF(CLOSE<OPEN,AA*(HIGH-OPEN+CLOSE-LOW),VOL/2));
主动卖盘:=IF(CLOSE>OPEN,-AA*(HIGH-CLOSE+OPEN-LOW),IF(CLOSE<OPEN,-AA*(HIGH-LOW),-VOL/2));
买卖比:=主动买盘/主动卖盘;
卖盘:=VOL-主动买盘;
卖盘大:=(卖盘-主动买盘)/卖盘>0.6;
买盘大:=(主动买盘-卖盘)/主动买盘>0.6;
WJ:=(HIGH+LOW+CLOSE)/3;
VD1:=IF(HIGH=LOW,1,HIGH-MAX(OPEN,CLOSE));
VD2:=IF(HIGH=LOW,1,MAX(CLOSE,OPEN)-WJ);
VD3:=IF(HIGH=LOW,1,MIN(OPEN,CLOSE)-LOW);
VD4:=IF(HIGH=LOW,1,WJ-MIN(CLOSE,OPEN));
VD5:=VOL/(IF(HIGH=LOW,4,HIGH-LOW));
VD6:=VD1*VD5;
VD7:=VD2*VD5;
VD8:=VD3*VD5;
VD9:=VD4*VD5;
买入量:=VD9+VD8;
卖出量:=VD6+VD7;
卖量:=VOL-买入量;
卖量大:=(卖量-买入量)/卖量>0.4;
买量大:=(买入量-卖量)/买入量>0.4;
买入资金:=买入量*CLOSE/100;
卖出资金:=卖出量*CLOSE/100;
资金进出:=买入资金-卖出资金;
买卖资金比:=买入资金/卖出资金;
DRAWTEXTEX(CLOSE,1,1,100,'当日买量:'+NUMTOSTR(买入量[SYSPARAM(1)],2)+'\n'+'当日卖量:'+NUMTOSTR(卖出量[SYSPARAM(1)],2)+'\n'+'当日买卖量:'+NUMTOSTR(VOL,2)+'\n'+'资金进出万元:'+NUMTOSTR(资金进出[SYSPARAM(1)],2)+'\n'+'买入资金累计万元:'+NUMTOSTR(买入资金[SYSPARAM(1)],2)+'\n'+'卖出资金累计万元:'+NUMTOSTR(卖出资金[SYSPARAM(1)],2)),ALIGN4,COLORYELLOW;
AA:=SUM(IF(CLOSE>REF(CLOSE,1) AND VOL>REF(VOL,1),VOL,0),2);
BB:=SUM(IF(CLOSE<REF(CLOSE,1) AND VOL<REF(VOL,1),VOL,0),2);
DD:=AA-BB;
X0:=IF(DD>0 AND (CLOSE/REF(CLOSE,1)-1)*100>0,AMOUNT/10000,0);
X1:=IF(DD<0 AND (CLOSE/REF(CLOSE,1)-1)*100<0,AMOUNT/10000,0);
DDX:(X0-X1)/FINANCE(7)*CLOSE/100,LINETHICK0;
DDX1:EMA(DDX,0)*15.367;
DDX2:MA(DDX1,0);
DDX3:MA(DDX1,0);
天:=COUNT(X0-X1>0,5);
DRAWTEXTEX(CLOSE,1,380,30,'一周内翻红:'+NUMTOSTR(天,0)+' 天'),colorFFDD00;
DRAWTEXTEX(DD>=0,1,200,30,'大单动向:'+'↑'),colorFFDD00;
DRAWTEXTEX(DD<0,1,200,30,'大单动向:'+'↓'),colorFFDD00;
VARIABLE:WDAY[7]='星期六';
WDAY[1]:='星期日';
WDAY[2]:='星期一';
WDAY[3]:='星期二';
WDAY[4]:='星期三';
WDAY[5]:='星期四';
WDAY[6]:='星期五';
FY:=YEAR;
FM:=MONTH;
FD:=DAY;
WD:=WEEKDAY;
P:=SYSPARAM(1);
STR1:=''+NUMTOSTR(FY[P],0)+'年'+NUMTOSTR(FM[P],0)+'月'+NUMTOSTR(FD[P],0)+'日 '+WDAY[WD[P]+1];
DRAWTEXTEX(CLOSE>0,1,650,30,STR1),colorFFDD00;
DRAWTEXTEX(CLOSE,1,10,30,STKLABEL+' '+STKNAME+''),colorFFBF00;

202108211127.jpg

202108211127.jpg

 

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则