VAR1:=CLOSE>REF(CLOSE,1) AND CLOSE>REF(CLOSE,2);
VAR2:=REF(VAR1,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VAR3:=REF(VAR2,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VAR4:=REF(VAR3,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VAR5:=REF(VAR4,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VAR6:=REF(VAR5,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VAR7:=REF(VAR6,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VAR8:=REF(VAR7,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VAR9:=REF(VAR8,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VARA:=REF(VAR9,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VARB:=REF(VARA,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VARC:=REF(VARB,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VARD:=CLOSE
VARE:=REF(VARD,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VARF:=REF(VARE,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VAR10:=REF(VARF,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VAR11:=REF(VAR10,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VAR12:=REF(VAR11,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VAR13:=REF(VAR12,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VAR14:=REF(VAR13,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VAR15:=REF(VAR14,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VAR16:=REF(VAR15,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VAR17:=REF(VAR16,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VAR18:=REF(VAR17,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VAR19:=REF(VARD OR VARE OR VARF OR VAR10 OR VAR11 OR VAR12 OR VAR13 OR VAR14 OR VAR15 OR VAR16 OR VAR17 OR VAR18,1) AND VAR1;
STICKLINE(CLOSE>=REF(C,1),CLOSE,REF(C,1),2.8,1),colorred;
STICKLINE(CLOSE
STICKLINE(VARD OR VARE OR VARF OR VAR10 OR VAR11 OR VAR12 OR VAR13 OR VAR14 OR VAR15 OR VAR16 OR VAR17 OR VAR18,CLOSE,REF(CLOSE,1),2.8,0),colorgreen;
STICKLINE(VAR1 OR VAR2 OR VAR3 OR VAR4 OR VAR5 OR VAR6 OR VAR7 OR VAR8 OR VAR9 OR VARA OR VARB OR VARC,CLOSE,REF(CLOSE,1),2.8,0),colorred;
VAR1A:=REF(VAR1 OR VAR2 OR VAR3 OR VAR4 OR VAR5 OR VAR6 OR VAR7 OR VAR8 OR VAR9 OR VARA OR VARB OR VARC,1) AND VARD;
抬高买:STICKLINE(VAR19,REF(CLOSE,1),REF(CLOSE,2),2,0),COLOR33AacC;
DRAWTEXT(VAR19,REF(CLOSE,1),'←高买'),COLOR33FFCC;
低损:STICKLINE(VAR1A,REF(CLOSE,1),REF(CLOSE,2),2,0),colorblue;
DRAWTEXT(VAR1A,REF(CLOSE,1),'←低损'),COLORFF99FF;
DRAWTEXT_FIX(1,0,0.01,0,'超跌比高黄托底买进,超买蓝压顶比低卖出。'),COLORFFFF00;
ZF:=(C-REF(C,BArslAST(VAR19)))/REF(C,BARSLAST(VAR19))*100;
DF:=(C-REF(C,BARSLAST(VAR1A)))/REF(C,BARSLAST(VAR1A))*100;
LS:=VARD OR VARE OR VARF OR VAR10 OR VAR11 OR VAR12 OR VAR13 OR VAR14 OR VAR15 OR VAR16 OR VAR17 OR VAR18;
HS:=VAR1 OR VAR2 OR VAR3 OR VAR4 OR VAR5 OR VAR6 OR VAR7 OR VAR8 OR VAR9 OR VARA OR VARB OR VARC;
KK:=LS AND REF(HS,1);
kd:=HS AND REF(LS,1);
LL:=MIN(C,REF(C,1));
HH:=MAX(C,REF(C,1));
DRAWLINE(KK,HH,KD,LL,0),colorcyan,LINETHICK2;
DRAWLINE(KD,LL,KK,HH,0),colormagenta,LINETHICK2;
PLOYLINE(VAR19,LL),coloryellow,LINETHICK2;
PLOYLINE(VAR1A,HH),colorblue,LINETHICK2;
VAR19JL:=CONST(BARSLAST(VAR19));
VAR1AJL:=CONST(BARSLAST(VAR1A));
STICKLINE(CURRBARSCOUNT<=VAR19JL,REF(LL,BARSLAST(VAR19)),REF(LL,BARSLAST(VAR19)),12,0),colorlired,LINETHICK2;
STICKLINE(CURRBARSCOUNT<=VAR1AJL,REF(HH,BARSLAST(VAR1A)),REF(HH,BARSLAST(VAR1A)),12,0),colorliblue,LINETHICK2;
STICKLINE(VAR1A,REF(CLOSE,1),REF(CLOSE,1),80,1),colorgreen,LINETHICK4;
STICKLINE(VAR19,REF(CLOSE,1),REF(CLOSE,1),80,1),colorred,LINETHICK4;
PL:=REF(C,1)=REF(C,1);
DRAWTEXT(PL,L,'←底'),colorred;
PH:=REF(C,1)>=REF(C,2) AND C
DRAWTEXT(PH,C+0.1,'←顶'),colorgreen;
GET:zig(3,5),coloryellow;
PL5:=ZIG(3,5);
EN1:=ZIG(3,5)>REF(ZIG(3,5),1) AND REF(ZIG(3,5),1)<=REF(ZIG(3,5),2) AND REF(ZIG(3,5),2)<=REF(ZIG(3,5),3);
EX1:=ZIG(3,5)=REF(ZIG(3,5),2) AND REF(ZIG(3,5),2)>=REF(ZIG(3,5),3);
PL10:=ZIG(3,10);
EN2:=ZIG(3,10)>REF(ZIG(3,10),1) AND REF(ZIG(3,10),1)<=REF(ZIG(3,10),2) AND REF(ZIG(3,10),2)<=REF(ZIG(3,10),3);
EX2:=ZIG(3,10)=REF(ZIG(3,10),2) AND REF(ZIG(3,10),2)>=REF(ZIG(3,10),3);
PL20:=ZIG(3,20);
EN3:=ZIG(3,20)>REF(ZIG(3,20),1) AND REF(ZIG(3,20),1)<=REF(ZIG(3,20),2) AND REF(ZIG(3,20),2)<=REF(ZIG(3,20),3);
EX3:=ZIG(3,20)=REF(ZIG(3,20),2) AND REF(ZIG(3,20),2)>=REF(ZIG(3,20),3);
PL40:=ZIG(3,40);
走强1:=BARSLAST(PL5
走弱1:=BARSLAST(PL5>REF(PL5,1));
走强2:=BARSLAST(PL10
走弱2:=BARSLAST(PL10>REF(PL10,1));
走强3:=BARSLAST(PL20
走弱3:=BARSLAST(PL20>REF(PL20,1));
ZTJZ5:=IF(PL10>REF(PL10,1),COUNT(EN1,走强2),0);
ZTJD5:=IF(PL10>REF(PL10,1),COUNT(EX1,走强2),0);
DTJZ5:=IF(PL10
DTJD5:=IF(PL10
ZTJZ10:=IF(PL20>REF(PL20,1),COUNT(EN2,走强3),0);
ZTJD10:=IF(PL20>REF(PL20,1),COUNT(EX2,走强3),0);
DTJZ10:=IF(PL20
DTJD10:=IF(PL20
DRAWTEXT(EN1 AND DTJZ5=1,L*0.98,'㈠'),COLORFFFF00;
DRAWTEXT(EX1 AND DTJD5=2,H*1.02,'㈡'),COLORFFFF00;
DRAWTEXT(EN2 AND ZTJZ5=1,L*0.90,'㈢买'),COLORFFFF00;
DRAWTEXT(EX1 AND PL10>REF(PL10,1) AND ZTJD5=1,H*1.02,'⑴'),COLOR0000FF;
DRAWTEXT(EN1 AND PL10>REF(PL10,1) AND ZTJZ5=2,L*0.98,'⑵抬高坚决买'),COLOR0000FF;
DRAWTEXT(EX1 AND PL10>REF(PL10,1) AND ZTJZ5=2,H*1.02,'⑶高抛'),COLOR0000FF;
DRAWTEXT(EN1 AND PL10>REF(PL10,1) AND ZTJZ5=3,L*0.98,'⑷回调坚决买'),COLOR0000FF;
DRAWTEXT(EX2 AND PL20>REF(PL20,1) AND ZTJD10=1,H*1.02,'⑸顶坚决抛'),COLOR0000FF;
DRAWTEXT(EN2 AND DTJZ10=1,L*0.94,'Ⅰ短线'),COLORFF6000;
DRAWTEXT(EX2 AND DTJD10=2,H*1.06,'Ⅱ'),COLORFF6000;
DRAWTEXT(EN3 AND ZTJZ10=1,L*0.94,'Ⅲ买'),COLORFF6000;
DRAWTEXT(EX2 AND PL20>REF(PL20,1) AND ZTJD10=1,H*1.06,'①卖出'),LINETHICK3,COLOR00FFFF;
DRAWTEXT(EN2 AND PL20>REF(PL20,1) AND ZTJZ10=2,L*0.94,'②补仓'),LINETHICK3,COLOR00FFFF;
DRAWTEXT(EX2 AND PL20>REF(PL20,1) AND ZTJD10=2 OR (ZTJD10=0 OR ZTJD10=2) AND EX2,H*1.06,'③清仓'),LINETHICK3,COLOR00FFFF;
DRAWTEXT(EN2 AND PL20>REF(PL20,1) AND ZTJZ10=3,L*0.94,'④持股'),LINETHICK3,COLOR00FFFF;
DRAWTEXT(EN2 AND DTJZ10=1,L*0.94,'【A】'),COLOR00FF00;
DRAWTEXT(EX2 AND DTJD10=2,H*1.03,'【B】'),COLOR00FF00;
DRAWTEXT(EN3 AND ZTJZ10=1,L*0.94,'【C】'),COLOR00FF00;
折线:ZIG(3,20);
前波峰值:=PEAK(3,20,1);
前波谷值:=TROUGH(3,20,1);
DRAWNUMBER(折线>REF(折线,1) AND REF(折线,1)
DRAWNUMBER(折线REF(折线,2),REF(C,1),(REF(C,1)-前波谷值)/前波谷值*100);