SHORT:=12;
LONG:=26;
MID:=9;
DIF:EMA(CLOSE,SHORT)-EMA(CLOSE,LONG);
DEA:EMA(DIF,MID);
MACD:(DIF-DEA)*2,COLORSTICK;
右红起N:=BARSLASTCOUNT(MACD>0),NODRAW;
右红股高:=HHV(H,右红起N),NODRAW;
左红股高:=REF(右红股高,BARSLAST(CROSS(0,MACD))+1),NODRAW;
右红柱高:=HHV(MACD,右红起N),NODRAW;
左红柱高:=REF(右红柱高,BARSLAST(CROSS(0,MACD))+1),NODRAW;
HZDB:=MACD>0&&右红股高>左红股高&&右红柱高<左红柱高&&REF(BARSLASTCOUNT(MACD<0),右红起N)>=3,NODRAW;
STICKLINE(REFX(HZDB&&MACD<REF(MACD,1),1)&&MACD>REF(MACD,1),0,MACD,2,0),COLORFF00FF;
STICKLINE(HZDB&&MACD<REF(MACD,1)&&BARSLASTCOUNT(MACD<REF(MACD,1))=1,0,MACD,2,0),COLORFF00FF;
STICKLINE(HZDB&&MACD<REF(MACD,1)&&BARSLASTCOUNT(MACD<REF(MACD,1))=2,0,MACD,2,0),COLORFF00FF;
STICKLINE(HZDB&&MACD<REF(MACD,1)&&BARSLASTCOUNT(MACD<REF(MACD,1))=3,0,MACD,2,0),COLORFF00FF;
DRAWNUMBER(REFX(HZDB&&MACD<REF(MACD,1),1)&&MACD>REF(MACD,1),MACD,0),DRAWABOVE;
DRAWNUMBER(HZDB&&MACD<REF(MACD,1)&&BARSLASTCOUNT(MACD<REF(MACD,1))=1,MACD,1),DRAWABOVE;
DRAWNUMBER(HZDB&&MACD<REF(MACD,1)&&BARSLASTCOUNT(MACD<REF(MACD,1))=2,MACD,2),DRAWABOVE;
DRAWTEXT(HZDB&&MACD<REF(MACD,1)&&BARSLASTCOUNT(MACD<REF(MACD,1))=3&&EVERY(HZDB,3),0,'变'),COLORGREEN;
DRAWTEXT(HZDB&&MACD<REF(MACD,1)&&BARSLASTCOUNT(MACD<REF(MACD,1))=3&&EVERY(HZDB,3),MACD,'③'),DRAWABOVE,COLORGREEN;
VAR1:=MA(100*(CLOSE-LLV(CLOSE,34))/(HHV(HIGH,34)-LLV(LOW,34)),5)-20;
VAR2:=2*ABS(VAR1);
VAR3:=100-(100-3*SMA((CLOSE-LLV(LOW,55))/(HHV(HIGH,55)-LLV(LOW,55))*100,20,1)+2*SMA(SMA((CLOSE-LLV(LOW,55))/(HHV(HIGH,55)-LLV(LOW,55))*100,20,1),15,1));
VAR4:=100-(100-3*SMA((OPEN-LLV(LOW,55))/(HHV(HIGH,55)-LLV(LOW,55))*100,20,1)+2*SMA(SMA((OPEN-LLV(LOW,55))/(HHV(HIGH,55)-LLV(LOW,55))*100,20,1),15,1));
VAR5:=(HIGH+LOW+CLOSE)/3;
VAR6:=(VAR5-MA(VAR5,10))/(0.015*AVEDEV(VAR5,10));
VAR7:=(VAR5-MA(VAR5,30))/(0.015*AVEDEV(VAR5,30));
VAR8:=IF(VAR6>=150 AND VAR6<200 AND VAR7>=150 AND VAR7<200,10,0);
VAR9:=IF(VAR6<=-150 AND VAR6>-200 AND VAR7<=-150 AND VAR7>-200,-10,VAR8);
VARA:=(CLOSE-MA(CLOSE,13))/MA(CLOSE,13)*100;
VARB:=100-ABS(VARA);
右绿起N:=BARSLASTCOUNT(MACD<0),NODRAW;
右绿股低:=LLV(L,右绿起N),NODRAW;
左绿股低:=REF(右绿股低,BARSLAST(CROSS(MACD,0))+1),NODRAW;
右绿柱低:=LLV(MACD,右绿起N),NODRAW;
左绿柱低:=REF(右绿柱低,BARSLAST(CROSS(MACD,0))+1),NODRAW;
LZDB:=MACD<0&&右绿股低<左绿股低&&右绿柱低>左绿柱低&&REF(BARSLASTCOUNT(MACD>0),右绿起N)>=3;
STICKLINE(REFX(LZDB&&MACD>REF(MACD,1),1)&&MACD<REF(MACD,1),0,MACD,2,0),COLORGREEN;
STICKLINE(LZDB&&MACD>REF(MACD,1)&&BARSLASTCOUNT(MACD>REF(MACD,1))=1,0,MACD,2,0),COLORGREEN;
STICKLINE(LZDB&&MACD>REF(MACD,1)&&BARSLASTCOUNT(MACD>REF(MACD,1))=2,0,MACD,2,0),COLORGREEN;
STICKLINE(LZDB&&MACD>REF(MACD,1)&&BARSLASTCOUNT(MACD>REF(MACD,1))=3,0,MACD,2,0),COLORGREEN;
DRAWNUMBER(REFX(LZDB&&MACD>REF(MACD,1),1)&&MACD<REF(MACD,1),MACD,0);
DRAWNUMBER(LZDB&&MACD>REF(MACD,1)&&BARSLASTCOUNT(MACD>REF(MACD,1))=1,MACD,1);
DRAWNUMBER(LZDB&&MACD>REF(MACD,1)&&BARSLASTCOUNT(MACD>REF(MACD,1))=2,MACD,2);
DRAWTEXT(LZDB&&MACD>REF(MACD,1)&&BARSLASTCOUNT(MACD>REF(MACD,1))=3&&EVERY(LZDB,3),0,'变'),COLORRED;
DRAWTEXT(LZDB&&MACD>REF(MACD,1)&&BARSLASTCOUNT(MACD>REF(MACD,1))=3&&EVERY(LZDB,3),MACD,'③'),COLORRED;