同花顺大机构仓位公式
在底部见到拉出蓝色的竖线表示有风险,拉出紫线表示顶部已经不远了。紫线加清仓的大绿柱一起出现清仓处理。在顶部拉出黄线表示主力正在抄底,由于公式有未来函数,在抄底时请结合其它指标
//大机构仓位:100*(1-WINNER(CLOSE)),colorred,LINETHICK1;
VAR2:=1/WINNER(CLOSE);
VAR3:=MA(CLOSE,13);
VAR4:=100-ABS((CLOSE-VAR3)/VAR3*100);
VAR5:=LLV(LOW,120);
VAR6:=HHV(HIGH,120);
VAR7:=(VAR6-VAR5)/100;
VAR8:=SMA((CLOSE-VAR5)/VAR7,20,1);
VAR9:=SMA((OPEN-VAR5)/VAR7,20,1);
VARA:=3*VAR8-2*SMA(VAR8,10,1);
VARB:=3*VAR9-2*SMA(VAR9,10,1);
VARC:=100-VARB;
//基金私募仓位: (100-VARA),colorgreen,LINETHICK1;
//DRAWTEXT ((100-VARA) 20 AND (100-VARA) 10,100,'○'),colorwhite;
//DRAWTEXT ((100-VARA) 10 AND (100-VARA) 0,100,'○'),colorlimagenta;
//DRAWTEXT ((100-VARA) 0,100,'●'),colorlimagenta;
DRAWTEXT ((100-VARA) 90 AND (100-VARA) 95,90,'□'),coloryellow;
DRAWTEXT ((100-VARA) 95,90,'□'),colorred;
DRAWTEXT ((100-VARA) 100,90,'■'),colorred;
VARE:=REF(LOW,1)*0.9;
VARF:=LOW*0.9;
VAR10:=(VARF*VOL+VARE*(CAPITAL-VOL))/CAPITAL;
VAR11:=EMA(VAR10,30);
VAR12:=CLOSE-REF(CLOSE,1);
VAR13:=MAX(VAR12,0);
VAR14:=ABS(VAR12);
VAR15:=SMA(VAR13,7,1)/SMA(VAR14,7,1)*100;
VAR16:=SMA(VAR13,13,1)/SMA(VAR14,13,1)*100;
VAR17:=BARSCOUNT(CLOSE);
VAR18:=SMA(MAX(VAR12,0),6,1)/SMA(ABS(VAR12),6,1)*100;
VAR19:=(-200)*(HHV(HIGH,60)-CLOSE)/(HHV(HIGH,60)-LLV(LOW,60))+100;
VAR1A:=(CLOSE-LLV(LOW,15))/(HHV(HIGH,15)-LLV(LOW,15))*100;
VAR1B:=SMA((SMA(VAR1A,4,1)-50)*2,3,1);
VAR1C:=(INDEXC-LLV(INDEXL,14))/(HHV(INDEXH,14)-LLV(INDEXL,14))*100;
VAR1D:=SMA(VAR1C,4,1);
VAR1E:=SMA(VAR1D,3,1);
VAR1F:=(HHV(HIGH,30)-CLOSE)/CLOSE*100;
VAR20:=VAR18 =25 AND VAR19 -95 AND VAR1F 20 AND VAR1B -30 AND VAR1E 30 AND VAR11-CLOSE =-0.25 AND VAR15 22 AND VAR16 28 AND VAR17
VAR21:=(HIGH+LOW+CLOSE)/3;
VAR22:=(VAR21-MA(VAR21,14))/(0.015*AVEDEV(VAR21,14));
VAR23:=(VAR21-MA(VAR21,70))/(0.015*AVEDEV(VAR21,70));
VAR24:=IF(VAR22 =150 AND VAR22 200 AND VAR23 =150 AND VAR23 200,10,0);
VAR25:=IF(VAR22 =-150 AND VAR22 -200 AND VAR23 =-150 AND VAR23 -200,-10,VAR24);
//STICKLINE(VAR20,0,56,5,0),LINETHICK5,colorred;
DRAWTEXT(CROSS(VAR20,0.5) AND COUNT(VAR20=1,10)=1,90,'') , colorred;
VARE:=MA(100*(CLOSE-LLV(CLOSE,34))/(HHV(HIGH,34)-LLV(LOW,34)),5)-20;
VARF:=100-3*SMA((CLOSE-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1)+2*SMA(SMA
((CLOSE-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1),15,1);
VAR10:=100-3*SMA((OPEN-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1)+2*SMA(SMA
((OPEN-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1),15,1);
VAR11:=VARF REF(VAR10,1) AND VOL REF(VOL,1) AND CLOSE REF(CLOSE,1);
V10:=PEAKBARS(3,15,1) V12:=IF(V10=1,50,0);
头部:= IF(V12=50,100,0);
卖:IF(IF(V12=50,100,0) REF(IF(V12=50,100,0),1),40,0),colorblue,LINETHICK1;
STICKLINE(卖,0,100,8,0),LINETHICK8,colorgreen;
DRAWTEXT(卖,60,'-主力清仓 '),colorgreen;
V9:=TROUGHBARS(3,15,1) V11:=IF(V9=1,50,0);
//底部:= IF(V11=50,50,0),colorblack,LINETHICK1;
//买:IF( 底部 REF(底部,1),40,0);
//STICKLINE(买,28,52,8,0),LINETHICK8,coloryellow;
//DRAWTEXT(买,50,'主力抄底 '),colorred;
v1:=(C*2+H+L)/4*10;
V2:=EMA(V1,13)-EMA(V1,34);
V3:=EMA(V2,5);
V4:=2*(V2-V3)*5.5;
V5:=(HHV(INDEXH,8)-INDEXC)/(HHV(INDEXH,8)-LLV(INDEXL,8))*8;
V6:=EMA(3*V5-2*SMA(V5,18,1),5);
V7:=(INDEXC-LLV(INDEXL,8))/(HHV(INDEXH,8)-LLV(INDEXL,8))*10;
V8:=(INDEXC*2+INDEXH+INDEXL)/4;
V9:=EMA(V8,13)-EMA(V8,34);
VA:=EMA(V9,3);
VB:=(V9-VA)/2;
V11:=3*SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100,5,1)-2*SMA(SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100,5,1),3,1);
V12:=(EMA(V11,3)-REF(EMA(V11,3),1))/REF(EMA(V11,3),1)*100;
CC:=(EMA(V11,3) =90 AND V12) AND FILTER((EMA(V11,3) =90 AND V12),10);
DD:=(EMA(V11,3) =120 AND V12) AND FILTER((EMA(V11,3) =120 AND V12),10);
STICKLINE(IF(V4 =0,V4,1) AND EMA(V11,3) 90,0,10,10,0),colorliblue,LINETHICK1;
//STICKLINE(a4 90 AND b4 70,82,94,6,0),colormagenta
VAR8:=VOL 2*MA(VOL,30);
VAR9:= DMI.ADX (10,6);
VARA:= DMI.ADXR (10,6);
VARB:=CLOSE MA(CLOSE,30) AND CLOSE MA(CLOSE,30)*1.04;
VARC:=MA(CLOSE,30) REF(MA(CLOSE,30),1);
VARD:=BARSLAST(CROSS(MA(CLOSE,5),MA(CLOSE,10))) BARSLAST(CROSS(MA(CLOSE,10),MA(CLOSE,5)));
VARE:=0- MACD.DIFF (7,21,3);
VARF:=TROUGHBARS(3,15,1)
VAR10:=EMA(CLOSE,30) REF(EMA(CLOSE,30),2);
VAR11:=IF(VARF=1,50,0);
多空:EMA((CLOSE-MA((2*CLOSE+HIGH+LOW)/4,30))/MA((2*CLOSE+HIGH+LOW)/4,30)*100,3),colorblack;
0,colorred;
STICKLINE(FILTER(VARF=1,5) AND 多空 -10,20,70,15,0),colorf00ff0,LINETHICK8;
STICKLINE(FILTER(VARF=1,5),20,70,8,0),coloryellow,LINETHICK8;
//DRAWTEXT(FILTER(VARF=1,3),60,'-主力潜伏' ),coloryellow;
//DRAWTEXT(FILTER(VARF=1,3),40,'□□谨慎'),colorred;
DRAWTEXT(FILTER(VARF=1,3),25,''),colorred ;
STICKLINE(多空 -10,0,10,5,0),coloryellow,LINETHICK2;
STICKLINE(多空 10,40,20,5,0),colorliblue,LINETHICK2;
//趋势: 5*SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1)-3*SMA(SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1),3,1)-SMA(SMA(SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1),3,1),2,1),LINETHICK0;
V1:= MA(CLOSE,5)=HHV(MA(CLOSE,5),20);
V2:= MA(CLOSE,5) MA(CLOSE,20);
V3:= COUNT(MA(CLOSE,1) REF(CLOSE,1),3)=3;
//风险: IF(V1 AND V2 AND V3,100,0),LINETHICK1,STICK,colorblack;
风险: IF(V1 AND V2 AND V3,40,0),LINETHICK4,STICK,colorliblue;
V11:= MA(CLOSE,5)=HHV(MA(CLOSE,5),120);
V21:= MA(CLOSE,5) MA(CLOSE,120);
V31:= COUNT(MA(CLOSE,1) REF(CLOSE,1),3)=3;
风险1: IF(V11 AND V21 AND V31,45,0),LINETHICK4,STICK,colorlimagenta;
//天线: 108,LINETHICK0,COLORFF9D00;
//STICKLINE(CROSS(天线,趋势),80,108,3,0),colorwhite,LINETHICK5;