SR1:=REF(HIGH,10)=HHV(HIGH,2*10+1);
SR2:=FILTER(SR1,10);
SR3:=BACKSET(SR2,10+1);
HD:=FILTER(SR3,10);
前高:=REF(H,BARSLAST(HD));
DRAWICON(CROSS(C,前高),L-0.20,3);{突破前高的信号};
N:=75;P:=5;P1:=10;
{N为多少天内的高低值参数,我以自已的初始K线根数定义。P1、P2为短、长支撑压力取点参数}
A1:=REF(H,P)=HHV(H,2*P+1);
B1:=FILTER(A1,P);
C1:=BACKSET(B1,P+1);
D1:=FILTER(C1,P);
E1:=BACKSET(ISLASTBAR,BARSLAST(D1)+1);
F1:=E1 REF(E1,1);
短压:DRAWLINE(D1,H,F1,H,1),COLORGREEN;
A2:=REF(L,P)=LLV(L,2*P+1);
B2:=FILTER(A2,P);
C2:=BACKSET(B2,P+1);
D2:=FILTER(C2,P);
E2:=BACKSET(ISLASTBAR,BARSLAST(D2)+1);
F2:=E2 REF(E2,1);
短支:DRAWLINE(D2,L,F2,L,1),COLORLIRED;
AA1:=REF(H,P1)=HHV(H,2*P1+1);
BB1:=FILTER(AA1,P1);
CC1:=BACKSET(BB1,P1+1);
DD1:=FILTER(CC1,P1);
EE1:=BACKSET(ISLASTBAR,BARSLAST(DD1)+1);
FF1:=EE1 REF(EE1,1);
长压:DRAWLINE(DD1,H,FF1,H,1),COLORGREEN;
AA2:=REF(L,P1)=LLV(L,2*P1+1);
BB2:=FILTER(AA2,P1);
CC2:=BACKSET(BB2,P1+1);
DD2:=FILTER(CC2,P1);
EE2:=BACKSET(ISLASTBAR,BARSLAST(DD2)+1);
FF2:=EE2 REF(EE2,1);
长支:DRAWLINE(DD2,L,FF2,L,1),COLORRED;
STICKLINE(C =O,C,O,3,0),COLOR000045;
STICKLINE(C =O,C,O,2.5,0),COLOR000065;
STICKLINE(C =O,C,O,2,0),COLOR000085;
STICKLINE(C =O,C,O,1.5,0),COLOR0000A5;
STICKLINE(C =O,C,O,1,0),COLOR0000C5;
STICKLINE(C =O,C,O,0.5,0),COLOR0000E5;
STICKLINE(C =O,H,L,0,0),COLOR0000F5;
STICKLINE(C O,C,O,3,0),COLOR353500;
STICKLINE(C O,C,O,2.5,0),COLOR454500;
STICKLINE(C O,C,O,2,0),COLOR555500;
STICKLINE(C O,C,O,1.5,0),COLOR656500;
STICKLINE(C O,C,O,1,0),COLOR757500;
{STICKLINE(C O,C,O,0.5,0),COLOR858500;}
STICKLINE(C O,H,L,0,0),COLOR959500;
{趋势线部分}
HIGHN:=10;LOWN:=10;HIGHDISPLAY:=0;LOWDISPLAY:=0;ZGDISPLAY:=0;MADISPLAY:=0;
BB:=REF(H,HIGHN)=HHV(H,2*HIGHN+1);
QY:=BACKSET(BB,HIGHN+1);
CC:=FILTER(QY,HIGHN) AND H=HHV(H,HIGHN+1);
{DRAWICON(CC,H*1.02,2);}{压力符号}
DDD:=BARSLAST(CC);
GDTS:=IF(CC,CURRBARSCOUNT,0);
DINGBU:=IF(DDD,REF(H,DDD),H);{顶部}
DINGBUTS:=IF(DDD,REF(GDTS,DDD),GDTS);
DINGBU1:=REF(DINGBU,DDD+1);
GDCS1:=CONST(DINGBUTS);
DINGBUTS1:=REF(DINGBUTS,DDD+1);
GDCS2:=CONST(DINGBUTS1);
DINGBU2:=REF(DINGBU1,DDD+1);
MM:=IF(CURRBARSCOUNT GDCS2,0,1);
高点压力:DRAWLINE(CURRBARSCOUNT=GDCS2,H,CURRBARSCOUNT=GDCS1,H,1),COLORMAGENTA,LINETHICK2;
AA9:=REF(L,LOWN)=LLV(L,2*LOWN+1);
QY1:=BACKSET(AA9,LOWN+1);
CC9:=FILTER(QY1,LOWN) AND L=LLV(L,LOWN+1);
{DRAWICON(CC1,L*0.98,1);}{支撑符号}
DD9:=BARSLAST(CC9);
DDTS:=IF(CC9,CURRBARSCOUNT,0);
YDB:=IF(DD9,REF(L,DD9),L);
DDTS1:=IF(DD9,REF(DDTS,DD9),DDTS);
DDCS1:=CONST(DDTS1);
ZDB:=REF(YDB,DD9+1);
DDTS2:=REF(DDTS1,DD9+1);
DDCS2:=CONST(DDTS2);
低点支撑:DRAWLINE(CURRBARSCOUNT=DDCS2,L,CURRBARSCOUNT=DDCS1,L,1) ,COLORGREEN,LINETHICK1.5;
DRAWTEXT(ISLASTBAR,低点支撑,' 低点连线'),COLORRED;
DRAWTEXT(ISLASTBAR,高点压力,' 高点连线'),COLORMAGENTA;
{次水平线}
大盘:=EMA(INDEXC,500)/EMA(C,500);
QA1:=REF(CLOSE,3)=HHV(CLOSE,2*3+1);
QB1:=BACKSET(QA1,3+1);
QC1:=FILTER(QB1,3) AND CLOSE=HHV(CLOSE,3+1);
QD1:=BARSLAST(QC1);
QE1:=IF(QC1,CURRBARSCOUNT,0);
QF1:=IF(QD1,REF(QE1,QD1),QE1);
QG1:=CONST(QF1);
次水平线:DRAWLINE(CURRBARSCOUNT=QG1,CLOSE,ISLASTBAR,REF
(CLOSE,QG1-1),1),COLORYELLOW;
{30天颈线}
A11:=REF(C,30)=HHV(C,2*20+1);
B11:=FILTER(A11,30);
C11:=BACKSET(B11,30+1);
HDD:=FILTER(C11,30);
高位水平线:REF(C,BARSLAST(HDD)),COLOR0099FF,POINTDOT;
DRAWTEXT(ISLASTBAR,高位水平线,' 高颈线'),COLOR0099FF;
STICKLINE(C,高位水平线,高位水平线,8,0),COLOR0099FF;
{低位颈线}
A22:=REF(C,30)=LLV(C,2*20+1);
B22:=FILTER(A22,30);
C22:=BACKSET(B22,30+1);
LDD:=FILTER(C22,30);
低位水平线:REF(C,BARSLAST(LDD)),COLORCYAN,POINTDOT;
DRAWTEXT(ISLASTBAR,低位水平线,' 低位水平线'),COLORCYAN;
{成交量颈线}
三十地量:REF(L,BARSLAST(VOL LLV(VOL,30)*1.001)),COLORMAGENTA,POINTDOT,LINETHICK3;
地量期:=BARSLAST(V=LLV(V,30));
地量颈线:DRAWLINE(V=LLV(V,30),MIN(REF(L,1),L),地量期 0,MIN(REF(L,地量期+1),REF(L,地量期)),1),COLORGREEN,LINETHICK3;
DRAWTEXT(ISLASTBAR,地量颈线,' 地量颈线'),COLORGREEN;
{参数:NN=900101 1501231 1080918}{小/大/缺省}
{价格:=REF(C,DATE=(NN+1)),NODRAW;
颈线2:=DRAWLINE(DATE=NN,C,DATE NN,价格,1),LINETHICK3;}
{PC:=(H+L+C)/3;}
V5:=MA(VOL,5);
V20:=MA(VOL,20);
A13:=CROSS(V20,V5);
A23:=BARSLAST(A13);
C13:=REF(C,A23);
{地量双星}
昨天十字:=ABS(REF(C,1)-REF(O,1))/REF(O,1) =0.01;{昨天十字星}
前天十字:=ABS(REF(C,2)-REF(O,2))/REF(O,1) =0.01;{前天十字星}
XG1:=昨天十字 AND 前天十字 AND C REF(C,1) AND (C/地量颈线) 1.0 AND (C/地量颈线) 1.12;
DRAWTEXT(XG1,L-0.09,' 地双星'),COLORYELLOW;
{XG2:=昨天十字 AND 前天十字 AND C REF(C,1) AND (C/黄金线) 1.0 AND (C/黄金线) 1.15;
DRAWTEXT(XG2,L-0.12,'金双星'),COLORYELLOW;};
MA60:MA(C,60),COLORYELLOW,LINETHICK2;
C6:=REF(C,1);
C3:=REF(C,1);
涨停:=IF((C-C3)*100/C3 =(10-0.01*100/C3),1,0);
STICKLINE(涨停,OPEN,CLOSE,2,1),COLORYELLOW;