{参数N,最小5,最大200,缺省30}
VAR2:=SUM(IF(CLOSE>OPEN,VOL,0),N)/SUM(VOL,N)*100;
VAR3:=100-SUM(IF(CLOSE>OPEN,VOL,0),N)/SUM(VOL,N)*100;
多头力量:=VAR2;
空头力量:=VAR3;
多空平衡:=50;
X_1:=(CLOSE-REF(CLOSE,1))/REF(CLOSE,1)*100;
X_2:=(CLOSE-REF(CLOSE,2))/REF(CLOSE,2)*100;
X_3:=(CLOSE-REF(CLOSE,3))/REF(CLOSE,3)*100;
X_4:=(CLOSE-REF(CLOSE,4))/REF(CLOSE,4)*100;
X_5:=(CLOSE-REF(CLOSE,5))/REF(CLOSE,5)*100;
X_6:=(CLOSE-REF(CLOSE,6))/REF(CLOSE,6)*100;
X_7:=(CLOSE-REF(CLOSE,7))/REF(CLOSE,7)*100;
X_8:=(CLOSE-REF(CLOSE,8))/REF(CLOSE,8)*100;
X_9:=(CLOSE-REF(CLOSE,9))/REF(CLOSE,9)*100;
X_10:=(CLOSE-REF(CLOSE,10))/REF(CLOSE,10)*100;
X_11:=(CLOSE-REF(CLOSE,11))/REF(CLOSE,11)*100;
X_12:=(CLOSE-REF(CLOSE,12))/REF(CLOSE,12)*100;
X_13:=(CLOSE-REF(CLOSE,13))/REF(CLOSE,13)*100;
X_14:=(CLOSE-REF(CLOSE,14))/REF(CLOSE,14)*100;
X_15:=(CLOSE-REF(CLOSE,15))/REF(CLOSE,15)*100;
X_16:=(CLOSE-REF(CLOSE,16))/REF(CLOSE,16)*100;
X_17:=(CLOSE-REF(CLOSE,17))/REF(CLOSE,17)*100;
X_18:=(CLOSE-REF(CLOSE,18))/REF(CLOSE,18)*100;
X_19:=(CLOSE-REF(CLOSE,19))/REF(CLOSE,19)*100;
X_20:=(CLOSE-REF(CLOSE,20))/REF(CLOSE,20)*100;
X_21:=X_1+X_2+X_3+X_4+X_5;
X_22:=X_1+X_2+X_3+X_4+X_5+X_6+X_7+X_8+X_9+X_10;
X_23:=X_1+X_2+X_3+X_4+X_5+X_6+X_7+X_8+X_9+X_10+X_11+X_12+X_13+X_14+X_15+X_16+X_17+X_18+X_19+X_20;
X_24:=(X_22-X_21*50)/100;
X_25:=(X_23-X_22*100)/100;
X_26:=(X_23-X_21*150)/100;
X_27:=(SUM(X_21,3)*30-MA(SUM(X_21,3),45))/10;
X_28:=(X_22*30-REF(SUM(X_22,3),1))/10;
X_29:=(X_21*30-REF(SUM(X_21,3),1))/10;
X_30:=(CLOSE-REF(CLOSE,1))/REF(CLOSE,1)*100;
X_31:=SUM(X_30,3)*30-MA(SUM(X_30,3),45);
X_32:=X_30*30-REF(SUM(X_30,3),1);
X_33:=(X_28+X_29+X_27+X_31+X_32)/5;
X_34:=SUM(X_32,WEEKDAY)/10;
X_35:=JFZX.多头力量#WEEK,NODRAW;
X_36:=MA(X_35,PERIOD)+2*STD(X_35,PERIOD);
X_37:=MA(X_35,3*PERIOD)+2*STD(X_35,3*PERIOD);
X_38:=MA(X_35,5*PERIOD)+2*STD(X_35,5*PERIOD);
X_39:=MA(X_35,6*PERIOD)+2*STD(X_35,6*PERIOD);
X_40:=MA(X_35,7*PERIOD)+2*STD(X_35,7*PERIOD);
X_41:=MA(X_36-REF(X_36,2*PERIOD),PERIOD)+2*STD(X_36-REF(X_36,3*PERIOD),PERIOD);
X_42:=MA(X_37-REF(X_37,2*PERIOD),PERIOD)+2*STD(X_37-REF(X_37,3*PERIOD),PERIOD);
X_43:=MA(X_38-REF(X_38,2*PERIOD),PERIOD)+2*STD(X_38-REF(X_38,3*PERIOD),PERIOD);
X_44:=MA(X_39-REF(X_39,2*PERIOD),PERIOD)+2*STD(X_39-REF(X_39,3*PERIOD),PERIOD);
X_45:=MA(X_40-REF(X_40,2*PERIOD),PERIOD)+2*STD(X_40-REF(X_40,3*PERIOD),PERIOD);
X_46:=REF(HHV(X_38,5),1);
X_47:=REF(HHV(X_38,5),6);
X_48:=REF(HHV(X_38,5),11);
X_49:=REF(HHV(X_38,5),16);
X_50:=REF(HHV(X_38,5),21);
X_51:=REF(HHV(X_38,5),26);
X_52:=IF(X_46<REF(MAX(X_47,X_48),BARSLAST(CROSS(X_38,MAX(X_47,X_48)))),REF(MAX(X_47,X_48),BARSLAST(CROSS(X_38,MAX(X_47,X_48)))),X_46);
X_53:=MA(X_35-REF(X_35,PERIOD),5*PERIOD)+2*STD(X_35-REF(X_35,PERIOD),5*PERIOD);
X_54:=REF(HHV(X_34,5),1);
X_55:=REF(HHV(X_34,5),6);
X_56:=REF(HHV(X_34,5),11);
X_57:=REF(HHV(X_34,5),16);
X_58:=REF(HHV(X_34,5),21);
X_59:=REF(HHV(X_34,5),26);
X_60:=IF(X_54<X_55,X_55,IF(X_55<X_56,X_56,IF(X_56<X_57,X_57,MAX(X_58,X_59))));
X_61:=IF(CROSS(X_34,X_60) AND REF(EXIST(CROSS(X_34,X_60),5),1),X_34,X_60);
X_62:=HHV(X_61,5);{分析家公式网http://www.70822.com}
X_63:=IF(X_62<REF(X_62,BARSLAST(CROSS(X_34,X_62))),REF(X_62,BARSLAST(CROSS(X_34,X_62))),X_62);
X_64:=IF(X_54<REF(MAX(X_55,X_56),BARSLAST(CROSS(X_32,MAX(X_55,X_56)))),REF(MAX(X_55,X_56),BARSLAST(CROSS(X_32,MAX(X_55,X_56)))),X_54);
X_65:=REF(HHV(X_41,5),1);
X_66:=REF(HHV(X_41,5),6);
X_67:=REF(HHV(X_41,5),11);
X_68:=REF(HHV(X_41,5),16);
X_69:=REF(HHV(X_41,5),21);
X_70:=REF(HHV(X_41,5),26);
HSL:=V/CAPITAL*100>5,STICK;
X_71:=IF(X_65<X_66,X_66,IF(X_66<X_67,X_67,IF(X_67<X_68,X_68,MAX(X_69,X_70))));
X_72:=IF(X_65<REF(MAX(X_66,X_67),BARSLAST(CROSS(X_41,MAX(X_66,X_67)))),REF(MAX(X_66,X_67),BARSLAST(CROSS(X_41,MAX(X_66,X_67)))),X_65);
XGD:=CROSS(X_33,100) AND X_41>X_72 AND X_38>X_52 AND X_39>X_52 AND X_40>X_52 AND BARSLAST(X_30>9)<30 AND HSL,NODRAW;
STICKLINE(XGD,80,100,2,0),COLORRED;
STICKLINE(XGD,40,60,2,0),COLORMAGENTA;
STICKLINE(XGD,60,80,2,0),COLORLIBLUE;
STICKLINE(XGD,0,40,2,0),COLORYELLOW;