NA:=STRCAT(CON2STR(YEAR,0),' 年 ');
YA:=STRCAT(CON2STR(MONTH,0),' 月 ');
RA:=STRCAT(CON2STR(DAY,0),' 日 ');
SJ:=STRCAT(STRCAT(NA,YA), RA);
DRAWTEXT_FIX(C>0,0.88,0,0,SJ);
{布林+宝塔+蓝灰操盘}
{蓝灰底}
买线:=EMA(C,2);
卖线:=EMA(SLOPE(C,21)*20+C,42);
STICKLINE(买线>=卖线,HHV(H,60),LLV(L,60),5,0),COLOR000045;
STICKLINE(买线<卖线,HHV(H,60),LLV(L,60),5,0),COLOR004500;
{红轨道}
红轨道:=MA(MA(CLOSE,3),1),LINETHICK1,COLORYELLOW;
轨道:MA(MA(CLOSE,3),3),COLOR32CD32,LINETHICK2;
SHENG:=IF(红轨道>=轨道,轨道,DRAWNULL);
升:SHENG,COLORMAGENTA,LINETHICK2;
{变色K线}
N1:=14;
M:=6;
TR1:=EXPMEMA(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(REF(CLOSE,1)-LOW)),N1);
HD :=HIGH-REF(HIGH,1);
LD :=REF(LOW,1)-LOW;
DMP:=EXPMEMA(IF(HD>0&&HD>LD,HD,0),N1);
DMM:=EXPMEMA(IF(LD>0&&LD>HD,LD,0),N1);
PDI:=DMP*100/TR1,LINETHICK2;
MDI:=DMM*100/TR1;
ADX:=EXPMEMA(ABS(MDI-PDI)/(MDI+PDI)*100,M);
ADXR:=EXPMEMA(ADX,M);
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);
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),3,1),COLOR0000FF;
VARD:=CLOSE<REF(CLOSE,1) AND CLOSE<REF(CLOSE,2);
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);
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),3,0),COLORC08000;
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(VAR19,REF(CLOSE,1),REF(CLOSE,2),3,0),COLORMAGENTA ;
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(VAR1A,REF(CLOSE,1),REF(CLOSE,2),3,0) ,COLOR00FF00; }
{箱体线}
N:=7;
T1:=CONST(LLVBARS(LOW,N));
T1HIGH:=CONST(REF(HIGH,T1));
CC:=CONST(CURRBARSCOUNT);
T2:=CONST(BARSLAST((CURRBARSCOUNT >(CC+T1)) AND (HIGH>T1HIGH)));
T2HIGH:=CONST(REF(HIGH,T2));
T3:=CONST(BARSLAST((CURRBARSCOUNT >(CC+T2)) AND (HIGH>T2HIGH)));
T3HIGH:=CONST(REF(HIGH,T3));
AB:=EMA(((2*C+H+L)/4-LLV(LOW,30))/(HHV(HIGH,30)-LLV(LOW,30))*100,8);
BA:=EMA(AB,5);
A1{高}:=REFDATE(REF(HHV(H,96),5),DATE);
B1{低}:=REFDATE(REF(LLV(L,96),5),DATE);
DY{中}:=((A1)+(B1))/2;
箱顶:IF(AB>0 AND AB-BA<=0,A1,A1),COLORGREEN,DOTLINE;
箱腰:IF(AB>0 AND AB-BA<=0,DY,DY),COLORYELLOW,DOTLINE;
箱低:IF(AB>0 AND AB-BA<=0,B1,B1),COLORRED,DOTLINE;
DRAWTEXT(ISLASTBAR,箱顶,'箱顶'),COLORYELLOW;
DRAWTEXT(ISLASTBAR,箱腰,''),COLORYELLOW;
DRAWTEXT(ISLASTBAR,箱低,'箱低'),COLORYELLOW;
VARAA:=IF(CLOSE>150,91.3,0.913);
{突破:INTPART(CLOSE/VARAA )*VARAA,POINTDOT,LINETHICK4,COLORRED;
再突破:突破+VARAA,POINTDOT,LINETHICK4,COLOR00FF00 ;
回踩:(突破+再突破)/2,POINTDOT,COLORWHITE,LINETHICK4;}
STICKLINE(CROSS(ZIG(3,5),REF(ZIG(3,5),1)),箱低,箱腰,0.1,-1),COLORRED;
STICKLINE(CROSS(REF(ZIG(3,5),1),ZIG(3,5)),箱顶,箱腰,0.1,-1),COLORGREEN;
DRAWICON(CROSS(ZIG(3,5),REF(ZIG(3,5),1)),箱腰,1);
DRAWICON(CROSS(REF(ZIG(3,5),1),ZIG(3,5)),箱腰,2);
EE:=(H+L+O+2*C)/5;
CRTP:=EE+(H-L);
CRZL:=2*EE-L;
CRZC:=2*EE-H;
CRFZ:=EE-(H-L);
均线:=EXPMA(C,12),COLORGRAY,LINETHICK2;
日:=50;
昨前:=3;
高2:=REF(HHV(H,日),昨前);
低2:=REF(LLV(L,日),昨前);
H4:=高2-(高2-低2)*0.618;
H5:=高2-(高2-低2)*0.809;
H81:=IF(H=HHV(H,9),H,DRAWNULL);
H82:=CONST(BARSLAST(H81!=DRAWNULL));
H83:=CONST(IF(H82=0,L,REF(L,H82)));
H84:=CONST(REF(BARSLAST(L<H83),H82+1)+H82+1);
H85:=CONST(IF(H84=0,L,REF(L,H84)));
H86:=CONST(REF(BARSLAST(L<H85),H84+1)+H84+1);
H87:=IF(CURRBARSCOUNT<=H82+10,CONST(IF(H86=0,L,REF(L,H86))),DRAWNULL),DOTLINE;
H88:=IF(CURRBARSCOUNT<=H82+1,IF(H=HHV(H,9),H,DRAWNULL),DRAWNULL),CIRCLEDOT;
DRAWTEXT(CURRBARSCOUNT=H82+10,H87,'LINE'),COLORYELLOW;
DRAWTEXT(ISLASTBAR,H87,''),COLORYELLOW;
DIF:=EMA(DCLOSE,12)-EMA(DCLOSE,26);
DEA:=EMA(DIF,9);
AAA:=(DIF-DEA)*2*60;
起爆:=CROSS(AAA-REF(AAA,1),15);
DRAWTEXT(起爆,MA(L,3),'↖暴涨'),COLORYELLOW,LINETHICK2;
LC:=REF((O+H+L+2*C)/5,1);
{短线擒黑马}
RSI:=SMA(MAX(C-LC,0),7,1)/SMA(ABS(C-LC),7,1)*10;
TYP:=(HIGH+LOW+CLOSE)/3;
CCI:=(TYP-MA(TYP,23))/(0.015*AVEDEV(TYP,23));
买:=CROSS(RSI,7.1) AND MA(V,5)>MA(V,10),COLORRED;
DRAWTEXT(CROSS(RSI,7.1) AND MA(V,5)>MA(V,10),MA(L,3),'↖◆短线擒黑马◆'),COLORWHITE;
DRAWICON(买,MA(L,3),17);
卖:=CROSS(7.1,RSI) AND MA(V,10)>MA(V,5),COLORGREEN;
DRAWTEXT(CROSS(7.1,RSI) AND MA(V,10)>MA(V,5),箱顶,'■■逃跑■■'),COLORGREEN;
DRAWICON(卖,MA(H,3),28);
{绝密买点}
A81:=EMA(C,3),COLORWHITE;
A82:=EMA(C,5),COLORYELLOW;
A83:=EMA(C,7),COLORMAGENTA;
A84:=EMA(C,12),COLORGREEN;
A85:=EMA(C,20),COLORRED;
A86:=EMA(C,50),COLORBLUE,LINETHICK2;
SS8:=CROSS(A81,A85) AND C>O AND C>REF(C,1) AND C/REF(C,1)>=1.018 ;
SSS8:=CROSS(A81,A85) AND C>O AND C>REF(C,1) AND C/REF(C,1)>=1.018;
DRAWICON(SS8 ,MA(L,3),5);
DRAWTEXT(SS8,MA(L,3),'↖绝密买点'),COLORYELLOW;
ZYX1:="DMI.PDI"(12,6);
ZYX2:="DMI.MDI"(12,6);
ZYX3:=ZYX1>65 AND ZYX1>REF(ZYX1,1);
ZYX4:=LLV(ZYX1,0);
ZYX5:=BARSLAST(ZYX4=ZYX1);
ZYX6:=(0-REF(ZYX2,4))/(ZYX4-REF(ZYX2,ZYX5))>2;
ZYX7:=ZYX1>REF(ZYX1,1);
ZYX8:=VOL>2*MA(VOL,30);
ZYX9:="DMI.ADX"(12,6);
ZYXA:="DMI.ADXR"(12,6);
ZYXB:=CLOSE>MA(CLOSE,30) AND CLOSE<MA(CLOSE,30)*1.04;
ZYXC:=MA(CLOSE,30)>REF(MA(CLOSE,30),1);
ZYXD:=BARSLAST(CROSS(MA(CLOSE,5),MA(CLOSE,10)))<BARSLAST(CROSS(MA(CLOSE,10),MA(CLOSE,5)));
{ZYXE:=0-"MACD.DIFF"(7,21,3);}
ZYXF:=TROUGHBARS(3, |