全自动画线--有个TNE公式,谁能和谐下
{全自动画线}
{主图叠加}
下降压力线:DRAWLINE(HIGH =HHV(HIGH,10),HIGH,LOW =LLV(LOW,3),HHV(HIGH,3),1),COLORWHITE,LINETHICK2;
VAR1:=20;
VAR2:=10;
VAR3:=5;
VAR4:=(CLOSE+HIGH+LOW+OPEN)/4;
VAR5:=LOW+(VAR4-LOW)+(CLOSE-LOW);
VAR6:=LOW+(CLOSE-VAR4);
VAR7:=REF(VAR5,1);
VAR8:=REF(VAR6,1);
支:STICKLINE(ISLASTBAR AND CLOSE =VAR7,VAR7,VAR7,30,1),COLORRED;
压:STICKLINE(ISLASTBAR AND CLOSE VAR7,VAR7,VAR7,30,1),COLORGREEN;
支1:STICKLINE(ISLASTBAR AND CLOSE =VAR8,VAR8,VAR8,30,1),COLORMAGENTA;
压1:STICKLINE(ISLASTBAR AND CLOSE VAR8,VAR8,VAR8,30,1),COLORFF8800;
VAR9:=REF(HIGH,VAR1)=HHV(HIGH,2*VAR1+1);
VAR10:=BACKSET(VAR9,VAR1+1);
VAR11:=FILTER(VAR10,VAR1) AND HIGH=HHV(HIGH,VAR1+1);
VAR12:=BARSLAST(VAR11);
VAR13:=IF(VAR11,CURRBARSCOUNT,0);
VAR14:=IF(VAR12,REF(HIGH,VAR12),HIGH);
VAR15:=IF(VAR12,REF(VAR13,VAR12),VAR13);
VAR16:=REF(VAR14,VAR12+1);
VAR17:=CONST(VAR15);
VAR18:=REF(VAR15,VAR12+1);
VAR19:=CONST(VAR18);
VAR20:=REF(VAR16,VAR12+1);
VAR21:=IF(CURRBARSCOUNT VAR19,0,1);
VAR22:=DRAWLINE(CURRBARSCOUNT=VAR19,HIGH,CURRBARSCOUNT=VAR17,HIGH,1);
VAR23:=REF(LOW,VAR1)=LLV(LOW,2*VAR1+1);
VAR24:=BACKSET(VAR23,VAR1+1);
VAR25:=FILTER(VAR24,VAR1) AND LOW=LLV(LOW,VAR1+1);
VAR26:=BARSLAST(VAR25);
VAR27:=IF(VAR25,CURRBARSCOUNT,0);
VAR28:=IF(VAR26,REF(LOW,VAR26),LOW);
VAR29:=IF(VAR26,REF(VAR27,VAR26),VAR27);
VAR30:=CONST(VAR29);
VAR31:=REF(VAR28,VAR26+1);
VAR32:=REF(VAR29,VAR26+1);
VAR33:=CONST(VAR32);
低点支撑:DRAWLINE(CURRBARSCOUNT=VAR33,LOW,CURRBARSCOUNT=VAR30,LOW,1),COLORYELLOW;
DRAWLINE(CURRBARSCOUNT=VAR33,LOW,ISLASTBAR,REF(LOW,VAR33-1),1),POINTDOT,COLORYELLOW,LINETHICK2;
DRAWLINE(CURRBARSCOUNT=VAR30,LOW,ISLASTBAR,REF(LOW,VAR30-1),1),POINTDOT,COLORYELLOW,LINETHICK2;
VAR34:=REF(HIGH,VAR2)=HHV(HIGH,2*VAR2+1);
VAR35:=BACKSET(VAR34,VAR2+1);
VAR36:=FILTER(VAR35,VAR2) AND HIGH=HHV(HIGH,VAR2+1);
VAR37:=BARSLAST(VAR36);
VAR38:=IF(VAR36,CURRBARSCOUNT,0);
VAR39:=IF(VAR37,REF(HIGH,VAR37),HIGH);
VAR40:=IF(VAR37,REF(VAR38,VAR37),VAR38);
VAR41:=REF(VAR39,VAR37+1);
VAR42:=CONST(VAR40);
VAR43:=REF(VAR40,VAR37+1);
VAR44:=CONST(VAR43);
VAR45:=REF(VAR41,VAR37+1);
VAR46:=IF(CURRBARSCOUNT VAR44,0,1);
压力:DRAWLINE(CURRBARSCOUNT=VAR44,HIGH,CURRBARSCOUNT=VAR42,HIGH,1),COLORYELLOW;
DRAWLINE(CURRBARSCOUNT=VAR44,HIGH,ISLASTBAR,REF(HIGH,VAR44-1),1),POINTDOT,COLORYELLOW;
DRAWLINE(CURRBARSCOUNT=VAR42,HIGH,ISLASTBAR,REF(HIGH,VAR42-1),1),POINTDOT,COLORYELLOW;
VAR47:=REF(LOW,VAR2)=LLV(LOW,2*VAR2+1);
VAR48:=BACKSET(VAR47,VAR2+1);
VAR49:=FILTER(VAR48,VAR2) AND LOW=LLV(LOW,VAR2+1);
VAR50:=BARSLAST(VAR49);
VAR51:=IF(VAR49,CURRBARSCOUNT,0);
VAR52:=IF(VAR50,REF(LOW,VAR50),LOW);
VAR53:=IF(VAR50,REF(VAR51,VAR50),VAR51);
VAR54:=CONST(VAR53);
VAR55:=REF(VAR52,VAR50+1);
VAR56:=REF(VAR53,VAR26+1);
VAR57:=CONST(VAR56);
支撑:DRAWLINE(CURRBARSCOUNT=VAR57,LOW,CURRBARSCOUNT=VAR54,LOW,1);
VAR58:=(压力+支撑)/2;
VAR59:=CONST((压力+支撑)/2);
VAR60:=IF(VAR33 VAR19,VAR33,VAR19);
中轨:DRAWLINE(CURRBARSCOUNT=VAR60,VAR58,ISLASTBAR,VAR59,1),COLORYELLOW;
VAR61:=REF(HIGH,VAR3)=HHV(HIGH,2*VAR3+1);
VAR62:=BACKSET(VAR61,VAR3+1);
VAR63:=FILTER(VAR62,VAR3) AND HIGH=HHV(HIGH,VAR3+1);
VAR64:=BARSLAST(VAR63);
VAR65:=IF(VAR63,CURRBARSCOUNT,0);
VAR66:=IF(VAR64,REF(HIGH,VAR64),HIGH);
VAR67:=IF(VAR64,REF(VAR65,VAR64),VAR65);
VAR68:=REF(VAR66,VAR64+1);
VAR69:=CONST(VAR67);
VAR70:=REF(VAR67,VAR64+1);
VAR71:=CONST(VAR70);
VAR72:=REF(VAR68,VAR64+1);
VAR73:=IF(CURRBARSCOUNT VAR44,0,1);
L压力:DRAWLINE(CURRBARSCOUNT=VAR71,HIGH,CURRBARSCOUNT=VAR69,HIGH,1),COLORYELLOW;
DRAWLINE(CURRBARSCOUNT=VAR71,HIGH,ISLASTBAR,REF(HIGH,VAR71-1),1),POINTDOT,COLORYELLOW;
DRAWLINE(CURRBARSCOUNT=VAR69,HIGH,ISLASTBAR,REF(HIGH,VAR69-1),1),POINTDOT,COLORYELLOW;
VAR74:=REF(LOW,VAR3)=LLV(LOW,2*VAR3+1);
VAR75:=BACKSET(VAR74,VAR3+1);
VAR76:=FILTER(VAR75,VAR3) AND LOW=LLV(LOW,VAR3+1);
VAR77:=BARSLAST(VAR49);
VAR78:=IF(VAR76,CURRBARSCOUNT,0);
VAR79:=IF(VAR77,REF(LOW,VAR77),LOW);
VAR80:=IF(VAR77,REF(VAR78,VAR77),VAR51);
VAR81:=CONST(VAR80);
VAR82:=REF(VAR79,VAR77+1);
VAR83:=REF(VAR80,VAR26+1);
VAR84:=CONST(VAR83);
L支撑:DRAWLINE(CURRBARSCOUNT=VAR84,LOW,CURRBARSCOUNT=VAR81,LOW,1),COLORYELLOW;
VAR85:=(L压力+L支撑)/2;
VAR86:=CONST((L压力+L支撑)/2);
VAR87:=IF(VAR84 VAR71,VAR84,VAR71);
VAR88:=DRAWLINE(CURRBARSCOUNT=VAR87,VAR85,ISLASTBAR,VAR86,1);
MA0:MA(CLOSE,0),COLORYELLOW;
VAR89:=INTPART(3*8/5);
VAR90:=REF(HIGH,VAR89)=HHV(HIGH,2*VAR89+1);
VAR91:=FILTER(VAR90,VAR89);
VAR92:=BACKSET(VAR91,VAR89+1);
VAR93:=FILTER(VAR92,VAR89);
VAR94:=BACKSET(ISLASTBAR,BARSLAST(VAR93)+1);
VAR95:=VAR94 REF(VAR94,1);
DRAWLINE(VAR93,HIGH,VAR95,HIGH,1),POINTDOT,COLORYELLOW;
VAR96:=INTPART(3*5/5);
VAR97:=REF(HIGH,VAR96)=HHV(HIGH,2*VAR96+1);
VAR98:=BACKSET(VAR97,VAR96+1);
VAR99:=FILTER(VAR98,VAR96) AND HIGH=HHV(HIGH,VAR96+1);
VAR100:=BARSLAST(VAR99);
VAR101:=IF(VAR99,CURRBARSCOUNT,0);
VAR102:=IF(VAR100,REF(VAR101,VAR100),VAR101);
VAR103:=CONST(VAR102);
DINGBUTS11:REF(VAR102,VAR100+1),NODRAW;
VAR104:=CONST(DINGBUTS11);
高点压力M:DRAWLINE(CURRBARSCOUNT=VAR104,HIGH,CURRBARSCOUNT=VAR103,HIGH,1),COLORYELLOW;
VAR105:=REF(LOW,VAR96)=LLV(LOW,2*VAR96+1);
VAR106:=BACKSET(VAR105,VAR96+1);
VAR107:=FILTER(VAR106,VAR96) AND LOW=LLV(LOW,VAR96+1);
VAR108:=BARSLAST(VAR107);
VAR109:=IF(VAR107,CURRBARSCOUNT,0);
VAR110:=IF(VAR108,REF(VAR109,VAR108),VAR109);
VAR111:=CONST(VAR110);
VAR112:=REF(VAR110,VAR108+1);
VAR113:=CONST(VAR112);
低点支撑M:DRAWLINE(CURRBARSCOUNT=VAR113,LOW,CURRBARSCOUNT=VAR111,LOW,1),COLORYELLOW;
VAR114:=10;
VAR115:=10;
VAR116:=0;
VAR117:=0;
VAR118:=0;
VAR119:=0;
VAR120:=REF(HIGH,VAR114)=HHV(HIGH,2*VAR114+1);
VAR121:=BACKSET(VAR120,VAR114+1);
VAR122:=FILTER(VAR121,VAR114) AND HIGH=HHV(HIGH,VAR114+1);
VAR123:=BARSLAST(VAR122);
VAR124:=IF(VAR122,CURRBARSCOUNT,0);
VAR125:=IF(VAR123,REF(HIGH,VAR123),HIGH);
VAR126:=IF(VAR123,REF(VAR124,VAR123),VAR124);
VAR127:=REF(VAR125,VAR123+1);
VAR128:=CONST(VAR126);
VAR129:=REF(VAR126,VAR123+1);
VAR130:=CONST(VAR129);
VAR131:=REF(VAR127,VAR123+1);
高点压力1:DRAWLINE(CURRBARSCOUNT=VAR130,HIGH,CURRBARSCOUNT=VAR128,HIGH,1),COLORYELLOW;
DRAWLINE(CURRBARSCOUNT=VAR130,HIGH,ISLASTBAR,REF(HIGH,VAR130-1),1),POINTDOT,COLORYELLOW;
VAR132:=REF(LOW,VAR115)=LLV(LOW,2*VAR115+1);
VAR133:=BACKSET(VAR132,VAR115+1);
VAR134:=FILTER(VAR133,VAR115) AND LOW=LLV(LOW,VAR115+1);
VAR135:=BARSLAST(VAR134);
VAR136:=IF(VAR134,CURRBARSCOUNT,0);
VAR137:=IF(VAR135,REF(LOW,VAR135),LOW);
VAR138:=IF(VAR135,REF(VAR136,VAR135),VAR136);
VAR139:=CONST(VAR138);
VAR140:=REF(VAR137,VAR135+1);
VAR141:=REF(VAR138,VAR135+1);
VAR142:=CONST(VAR141);
低点支撑1:DRAWLINE(CURRBARSCOUNT=VAR142,LOW,CURRBARSCOUNT=VAR139,LOW,1),COLORYELLOW;
VAR143:=(高点压力1+低点支撑1)/2;
VAR144:=CONST((高点压力1+低点支撑1)/2);
VAR145:=IF(VAR142 VAR130,VAR142,VAR130);
DRAWLINE(CURRBARSCOUNT=VAR142,LOW,ISLASTBAR,REF(LOW,VAR142-1),1),POINTDOT,COLORYELLOW;
VAR146:=STRCAT(HYBLOCK,1);
VAR147:=STRCAT(VAR146,FGBLOCK);
VAR148:=STRCAT(VAR147,DYBLOCK);
VAR149:=STRCAT(VAR148,1);
DRAWTEXT_FIX(ISLASTBAR,0.03,0.99,0,STRCAT(VAR149,GNBLOCK)),COLORCYAN;