{黑马红牛}
VARR_1:=MA(100*(CLOSE-LLV(CLOSE,34))/(HHV(HIGH,34)-LLV(LOW,34)),5)-20;
VARR_2:=2*ABS(VARR_1);
VARR_3:=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);
VARR_4:=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);
VARR_5:=(HIGH+LOW+CLOSE)/3;
VARR_6:=(VARR_5-MA(VARR_5,14))/(0.015*AVEDEV(VARR_5,14));
VARR_7:=(VARR_5-MA(VARR_5,70))/(0.015*AVEDEV(VARR_5,70));
VARR_8:=IF(VARR_6 =150 AND VARR_6 200 AND VARR_7 =150 AND VARR_7 200,10,0);
VARR_9:=IF(VARR_6 =-150 AND VARR_6 -200 AND VARR_7 =-150 AND VARR_7 -200,-10,VARR_8);
VARR_A:=(CLOSE-MA(CLOSE,13))/MA(CLOSE,13)*100;
VARR_B:=100-ABS(VARR_A);
DRAWTEXT_FIX(C 0,0,0.1,0,'黑马红牛:【巴菲鱼专属】'),COLORMAGENTA;
VARR_C:=3*SMA((INDEXC-LLV(INDEXL,75))/(HHV(INDEXH,75)-LLV(INDEXL,75))*100,20,1)-2*SMA(SMA((INDEXC-LLV(INDEXL,75))/(HHV(INDEXH,75)-LLV(INDEXL,75))*100,20,1),15,1);
VARR_D:=3*SMA((INDEXO-LLV(INDEXL,75))/(HHV(INDEXH,75)-LLV(INDEXL,75))*100,20,1)-2*SMA(SMA((INDEXO-LLV(INDEXL,75))/(HHV(INDEXH,75)-LLV(INDEXL,75))*100,20,1),15,1);
VARR_E:=REF(LOW,1)*0.9;
VARR_F:=LOW*0.9;
VARR_10:=(VARR_F*VOL+VARR_E*(CAPITAL-VOL))/CAPITAL;
VARR_11:=EMA(VARR_10,30);
VARR_12:=VARR_11-CLOSE;
VARR_13:=REF(CLOSE,1);
VARR_14:=SMA(MAX(CLOSE-VARR_13,0),7,1)/SMA(ABS(CLOSE-VARR_13),7,1)*100;
VARR_15:=SMA(MAX(CLOSE-VARR_13,0),13,1)/SMA(ABS(CLOSE-VARR_13),13,1)*100;
VARR_16:=BARSCOUNT(CLOSE);
VARR_17:=SMA(MAX(CLOSE-REF(CLOSE,1),0),6,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),6,1)*100;
VARR_18:=((-100)*(HHV(HIGH,60)-CLOSE)/(HHV(HIGH,60)-LLV(LOW,60))+50)*2;
VARR_19:=(CLOSE-LLV(LOW,15))/(HHV(HIGH,15)-LLV(LOW,15))*100;
VARR_1A:=(SMA(VARR_19,4,1)-50)*2;
VARR_1B:=SMA(VARR_1A,3,1);
VARR_1C:=(INDEXC-LLV(INDEXL,14))/(HHV(INDEXH,14)-LLV(INDEXL,14))*100;
VARR_1D:=SMA(VARR_1C,4,1);
VARR_1E:=SMA(VARR_1D,3,1);
VARR_1F:=(HHV(HIGH,30)-CLOSE)/CLOSE*100;
VARR_20:=IF(VARR_17 =25 AND VARR_18 -95 AND VARR_1F 20 AND VARR_1B -30 AND VARR_1E 30 AND VARR_12 =-0.25 AND VARR_14 22 AND VARR_15 28 AND VARR_16 50,80,0);
情报:ABS(100-VARR_3),LINETHICK3;
天线: IF(VARR_B 90,VARR_B,100);
红军: IF(VARR_1 0,VARR_1,0),COLORRED, LINESTICK;
绿军: IF(VARR_1 0,VARR_2,0),COLORGREEN,LINESTICK;
导弹: VARR_20;
预警系统: IF(VARR_7 =200 AND VARR_6 =150,15,IF(VARR_7 =-200 AND VARR_6 =-150,-15,VARR_9))+60;
VARR_21:=CLOSE MA(CLOSE,20) AND MA(CLOSE,20) =REF(MA(CLOSE,20),1);
VARR_22:=CLOSE MA(CLOSE,20) AND MA(CLOSE,20) REF(MA(CLOSE,20),1);
VARR_23:=红军 50 AND 预警系统 60 AND 天线=100;
VARR_24:=红军 48 AND 预警系统 60 AND 天线
VARR_25:=绿军 38 AND 预警系统
VARR_26:=导弹 50 AND 天线
VARR_27:=VARR_3 REF(VARR_4,1) AND VOL REF(VOL,1) AND CLOSE REF(CLOSE,1);
VARR_28:=VARR_3 =REF(VARR_4,1) AND CLOSE REF(CLOSE,1) AND 预警系统=60 AND 导弹=0 AND 绿军 =REF(绿军,1) AND VARR_C REF(VARR_D,1);
DRAWTEXT(VARR_21 AND COUNT(VARR_21,30)=1,100,'上升通道,持股待升或高抛低吸!');
DRAWTEXT(VARR_22 AND COUNT(VARR_22,30)=1,90,'下降通道,小心无量阴跌!');
DRAWTEXT(VARR_23 AND COUNT(VARR_23,30)=1,70,'上涨过急,需要调整,短线先抛出!')COLORRED;
DRAWTEXT(VARR_24 AND COUNT(VARR_24,30)=1,80,'庄家出货,大跌在即,中线抛出!')COLORGREEN;
DRAWTEXT(VARR_25 AND COUNT(VARR_25,30)=1,50,'不必杀跌,应有小反弹 ,跌停除外!');
DRAWTEXT(VARR_26 AND COUNT(VARR_26,30)=1,30,'');
DRAWTEXT(VARR_27 AND COUNT(VARR_27,30)=1,60,'??红牛'),COLORYELLOW;
DRAWTEXT(VARR_27 AND COUNT(VARR_27,30)=1,50,'??大资金入场!'),COLORYELLOW;
DRAWTEXT(VARR_28 AND COUNT(VARR_28,30)=1,20,'见顶回落');
买入:IF(VARR_27 AND COUNT(VARR_27,30)=1,100,0),STICK,LINETHICK7,COLORRED;
STICKLINE(买入,0,100,3,0),COLORRED;