X_1:=400;
X_2:=90;
X_3:=79;
X_4:=IF(X_2 10,10,X_3);
X_5:=CURRBARSCOUNT;
X_6:=REF(HIGH,X_2)=HHV(HIGH,2*X_2+1);
X_7:=BACKSET(X_6,X_2+1);
X_8:=FILTER(X_7,X_2) AND HIGH=HHV(HIGH,X_2+1);
X_9:=BARSLAST(X_8);
X_10:=IF(X_8,X_5,0);
X_11:=IF(X_9,REF(HIGH,X_9),HIGH);
X_12:=IF(X_9,REF(X_10,X_9),X_10);
X_13:=REF(X_11,X_9+1);
X_14:=CONST(X_12);
X_15:=REF(X_12,X_9+1);
X_16:=CONST(X_15);
X_17:=REF(LOW,X_2)=LLV(LOW,2*X_2+1);
X_18:=BACKSET(X_17,X_2+1);
X_19:=FILTER(X_18,X_2) AND LOW=LLV(LOW,X_2+1);
X_20:=BARSLAST(X_19);
X_21:=IF(X_19,X_5,0);
X_22:=IF(X_20,REF(X_21,X_20),X_21);
X_23:=CONST(X_22);
STICKLINE(OPEN CLOSE,CLOSE,OPEN,3,1),COLOR00CC00;
X_24:=BARSLAST(LOW=LLV(LOW,180));
X_25:=REF(LOW,X_24);
X_26:=BARSLAST(HIGH=HHV(HIGH,X_24));
X_27:=REF(HIGH,X_26);
X_28:=BARSLAST(LOW=LLV(LOW,X_26));
X_29:=REF(LOW,X_28);
X_30:=INTPART((X_26+1)/2);
X_31:=REFDATE(X_27,DATE);
X_32:=REFDATE(CLOSE,DATE);
X_33:=REFDATE(X_29,DATE);
C线:DRAWLINE(CURRBARSCOUNT=CONST(X_26+1),X_33,CURRBARSCOUNT=CONST(X_30),X_32,0),COLORBLACK;
D线:DRAWLINE(CURRBARSCOUNT=CONST(X_30),X_32,CURRBARSCOUNT=CONST(1),X_33,0),COLORBLACK;
FFG1:DRAWBAND(C线,RGB(255,0,0),X_33,RGB(255,0,0));
FFG2:DRAWBAND(D线,RGB(50,205,50),X_33,RGB(50,205,50));
DRAWKLINE(HIGH,OPEN,LOW,CLOSE);
STICKLINE(OPEN CLOSE,CLOSE,OPEN,3,1),COLOR00CC00;
X_34:=CONST(X_28+X_28);
X_35:=CONST(CLOSE+0.01);
X_36:=REFDATE(X_35,DATE);
X_37:=REF(X_22,X_20+1);
X_38:=CONST(X_37);
X_39:=REF(HIGH,X_4)=HHV(HIGH,2*X_4+1);
X_40:=CONST((X_31+X_33)/2);
X_41:=CONST((X_31+X_40)/2);
X_42:=CONST((X_40+X_33)/2);
NOTEXTC区界线:IF(CURRBARSCOUNT =CONST(3),CONST(IF(1,X_41,X_41)),DRAWNULL),COLORCYAN;
NOTEXTB区界线:IF(CURRBARSCOUNT =CONST(3),CONST(IF(1,X_40,X_40)),DRAWNULL),COLORCYAN;
NOTEXTA区界线:IF(CURRBARSCOUNT =CONST(3),CONST(IF(1,X_42,X_42)),DRAWNULL),COLORCYAN;
X_43:=IF(CURRBARSCOUNT =CONST(X_26+1),CONST(IF(1,X_35+X_35*0.2,X_35+X_35*0.2)),DRAWNULL);
X_44:=IF(CURRBARSCOUNT =CONST(X_26+1),CONST(IF(1,X_35+X_35*0.1,X_35+X_35*0.1)),DRAWNULL);
X_45:=IF(CURRBARSCOUNT =CONST(X_26+1),CONST(IF(1,X_35,X_35)),DRAWNULL);
NOTEXT高:IF(CURRBARSCOUNT =CONST(X_26+1),CONST(IF(1,X_31,X_31)),DRAWNULL),COLORMAGENTA;
NOTEXT低:IF(CURRBARSCOUNT =CONST(X_26+1),CONST(IF(1,X_29,X_29)),DRAWNULL),COLORGREEN;
新势力A:IF(CURRBARSCOUNT =CONST(X_28+1),MA(CLOSE,X_28),DRAWNULL),COLORRED;
新势力V:IF(CURRBARSCOUNT =CONST(X_28+1),IF(新势力A REF(新势力A,1),新势力A,DRAWNULL),DRAWNULL),COLORGREEN;
X_46:=BACKSET(X_39,X_4+1);{www.9m8.cn 九毛八公式指标网}
X_47:=FILTER(X_46,X_4) AND HIGH=HHV(HIGH,X_4+1);
X_48:=BARSLAST(X_47);
X_49:=IF(X_47,X_5,0);
X_50:=IF(X_48,REF(HIGH,X_48),HIGH);
X_51:=IF(X_48,REF(X_49,X_48),X_49);
X_52:=REF(X_50,X_48+1);
X_53:=CONST(X_51);
X_54:=REF(X_51,X_48+1);
X_55:=CONST(X_54);
X_56:=REF(LOW,X_4)=LLV(LOW,2*X_4+1);
X_57:=BACKSET(X_56,X_4+1);
X_58:=FILTER(X_57,X_4) AND LOW=LLV(LOW,X_4+1);
X_59:=BARSLAST(X_58);
X_60:=CONST(X_41);
X_61:=CONST(X_40);
X_62:=CONST(X_42);
X_63:=IF(CLOSE =X_60,AMOUNT,DRAWNULL);
X_64:=IF(CLOSE =X_60,VOL,DRAWNULL);
X_65:=0.01*SUM(X_63,X_26)/SUM(X_64,X_26);
X_66:=REFDATE(X_65,DATE);
NOTEXTD区成本:IF(CURRBARSCOUNT =CONST(13),CONST(IF(1,X_65,X_65)),DRAWNULL),DOTLINE,COLORLIGRAY;
X_67:=IF(CLOSE =X_60 AND CLOSE =X_61,AMOUNT,DRAWNULL);
X_68:=IF(CLOSE =X_60 AND CLOSE =X_61,VOL,DRAWNULL);
X_69:=0.01*SUM(X_67,X_26)/SUM(X_68,X_26);
X_70:=REFDATE(X_69,DATE);
NOTEXTC区成本:IF(CURRBARSCOUNT =CONST(13),CONST(IF(1,X_69,X_69)),DRAWNULL),DOTLINE,COLORLIGRAY;
X_71:=IF(CLOSE =X_61 AND CLOSE =X_62,AMOUNT,DRAWNULL);
X_72:=IF(CLOSE =X_61 AND CLOSE =X_62,VOL,DRAWNULL);
X_73:=0.01*SUM(X_71,X_26)/SUM(X_72,X_26);
X_74:=REFDATE(X_73,DATE);
NOTEXTB区成本:IF(CURRBARSCOUNT =CONST(13),CONST(IF(1,X_73,X_73)),DRAWNULL),DOTLINE,COLORLIGRAY;
X_75:=IF(CLOSE =X_62,AMOUNT,DRAWNULL);
X_76:=IF(CLOSE =X_62,VOL,DRAWNULL);
X_77:=0.01*SUM(X_75,X_26)/SUM(X_76,X_26);
X_78:=REFDATE(X_77,DATE);
NOTEXTA区成本:IF(CURRBARSCOUNT =CONST(13),CONST(IF(1,X_77,X_77)),DRAWNULL),DOTLINE,COLORLIGRAY;
X_79:=IF(CLOSE =X_36,AMOUNT,DRAWNULL);
X_80:=IF(CLOSE =X_36,VOL,DRAWNULL);
X_81:=0.01*SUM(X_79,X_26)/SUM(X_80,X_26);
X_82:=REFDATE(X_81,DATE);
X_83:=IF(X_58,X_5,0);
X_84:=IF(X_59,REF(X_83,X_59),X_83);
X_85:=CONST(X_84);
X_86:=REF(X_84,X_59+1);
X_87:=CONST(X_86);
X_88:=REF(HIGH,X_3)=HHV(HIGH,2*X_3+1);
X_89:=BACKSET(X_88,X_3+1);
X_90:=FILTER(X_89,X_3) AND HIGH=HHV(HIGH,X_3+1);
X_91:=BARSLAST(X_90);
NOTEXT上区成本:IF(CURRBARSCOUNT =CONST(X_26+1),CONST(IF(1,X_81,X_81)),DRAWNULL),DOTLINE,COLORRED;
X_92:=IF(CLOSE =X_36,AMOUNT,DRAWNULL);
X_93:=IF(CLOSE =X_36,VOL,DRAWNULL);
X_94:=0.01*SUM(X_92,X_26)/SUM(X_93,X_26);
X_95:=REFDATE(X_94,DATE);
NOTEXT下区成本:IF(CURRBARSCOUNT =CONST(X_26+1),CONST(IF(1,X_94,X_94)),DRAWNULL),DOTLINE,COLORYELLOW;
X_96:=100*VOL/(FINANCE(7)/100);
X_97:=IF(CLOSE =X_60,X_96,DRAWNULL);
X_98:=CONST(INTPART(SUM(X_97,X_26)));
VB143:DRAWTEXT(CURRBARSCOUNT=CONST(13),X_66,1),COLORLIGRAY;
VB144:DRAWNUMBER(CURRBARSCOUNT=CONST(6),X_66*1.007,X_98),COLORYELLOW;
X_99:=IF(CLOSE =X_60 AND CLOSE =X_61,X_96,DRAWNULL);
X_100:=CONST(INTPART(SUM(X_99,X_26)));
VB148:DRAWTEXT(CURRBARSCOUNT=CONST(13),X_70,2),COLORRED;
VB149:DRAWNUMBER(CURRBARSCOUNT=CONST(6),X_70*1.007,X_100),COLORYELLOW;
X_101:=IF(CLOSE =X_61 AND CLOSE =X_62,X_96,DRAWNULL);
X_102:=CONST(INTPART(SUM(X_101,X_26)));
VB153:DRAWTEXT(CURRBARSCOUNT=CONST(13),X_74,3),COLORMAGENTA;
X_103:=IF(X_90,X_5,0);
X_104:=IF(X_91,REF(HIGH,X_91),HIGH);
X_105:=IF(X_91,REF(X_103,X_91),X_103);
X_106:=REF(X_104,X_91+1);
X_107:=CONST(X_105);
X_108:=REF(X_105,X_91+1);
X_109:=CONST(X_108);
X_110:=REF(X_106,X_91+1);
VB154:DRAWNUMBER(CURRBARSCOUNT=CONST(6),X_74*1.007,X_102),COLORYELLOW;
X_111:=IF(CLOSE =X_62,X_96,DRAWNULL);
X_112:=CONST(INTPART(SUM(X_111,X_26)));
VB158:DRAWTEXT(CURRBARSCOUNT=CONST(13),X_78,4),COLORCYAN;
VB159:DRAWNUMBER(CURRBARSCOUNT=CONST(6),X_78*1.007,X_112),COLORYELLOW;
X_113:=IF(CLOSE =X_36,X_96,DRAWNULL);
X_114:=CONST(INTPART(SUM(X_113,X_26)));
VB163:DRAWTEXT(CURRBARSCOUNT=CONST(X_26),X_82,5),COLORYELLOW;
VB164:DRAWNUMBER(CURRBARSCOUNT=CONST(X_26-7),X_82*1.007,X_114),COLORYELLOW;
X_115:=IF(CLOSE =X_36,X_96,DRAWNULL);
X_116:=CONST(INTPART(SUM(X_115,X_26)));
VB168:DRAWTEXT(CURRBARSCOUNT=CONST(X_26),X_95,6),COLORYELLOW;
VB169:DRAWNUMBER(CURRBARSCOUNT=CONST(X_26-7),X_95*1.007,X_116),COLORYELLOW;
X_117:=REF(LOW,X_3)=LLV(LOW,2*X_3+1);
X_118:=BACKSET(X_117,X_3+1);
X_119:=FILTER(X_118,X_3) AND LOW=LLV(LOW,X_3+1);
X_120:=BARSLAST(X_58);
X_121:=IF(X_119,X_5,0);
X_122:=IF(X_120,REF(X_121,X_120),X_83);
X_123:=CONST(X_122);
X_124:=REF(X_122,X_120+1);
X_125:=CONST(X_124);