编写要求:
麻烦老师把主图向上买入信号做一个选股公式:
DRAWGBK(OPEN>0,RGB(8,88,188),RGB(0,0,0),0,'02',0);
DRAWKLINE(HIGH,OPEN,LOW,CLOSE);
RC:=DYNAINFO(3);
S2:=SMA(C,3,1);
S6:=SMA(C,5,1);
DK:=2*(S2-S6);
STICKLINE(DK>0,RC,RC+DK,3,0),COLOR0000D5;
STICKLINE(DK<0,RC,RC+DK,3,0),COLORFF9900;
VAR2:=(3*CLOSE+LOW+OPEN+HIGH)/6;
多头线:(20*VAR2+19*REF(VAR2,1)+18*REF(VAR2,2)+17*REF(VAR2,3)+16*REF(VAR2,4)+15*REF(VAR2,5)+14*REF(VAR2,6)+13*REF(VAR2,7)+12*REF(VAR2,8)+11*REF(VAR2,9)+10*REF(VAR2,10)
+9*REF(VAR2,11)+8*REF(VAR2,12)+7*REF(VAR2,13)+6*REF(VAR2,14)+5*REF(VAR2,15)+4*REF(VAR2,16)+3*REF(VAR2,17)+2*REF(VAR2,18)+REF(VAR2,20))/210,CIRCLEDOT;
空头线:MA(多头线,5),CIRCLEDOT;
STICKLINE(多头线>空头线,多头线,空头线,2,4),COLORRED;
STICKLINE(多头线<空头线,多头线,空头线,2,4),COLOR00FF00;
工作线:MA(C,14),COLORRED,LINETHICK2;
EA0:MA(C,5),COLORFFC010;
REF(EA0,13),COLORFFC010;
REF(EA0,12),COLORFFC010;
REF(EA0,11),COLORFFC010;
REF(EA0,10),COLORFFC010;
REF(EA0,9),COLORFFC010;
REF(EA0,8),COLORFFC010;
REF(EA0,7),COLORFFC010;
REF(EA0,6),COLORFFC010;
REF(EA0,5),COLORFFC010;
REF(EA0,4),COLORFFC010;
REF(EA0,3),COLORFFC010;
REF(EA0,2),COLORFFC010;
REF(EA0,1),COLORFFC010;
STICKLINE(C>OPEN,OPEN,C,2.5,0),COLOR0000D5;
STICKLINE(C>OPEN,OPEN,C,0.6,0),COLORCC66FF;
STICKLINE(C1.097,C,O,2.8,0),COLORMAGENTA;
STICKLINE(C/REF(C,1)>1.097,H,L,0.6,0),COLORCC66FF;
AA1:=MA(C,5);
BB1:=MA(C,15);
AF:=CROSS(AA1,BB1);
STICKLINE(AF,LLV(L,4),LLV(L,4),50,1),COLORYELLOW,LINETHICK9;
DRAWTEXT(AF,LLV(L,4),'止损线'),COLORYELLOW;
DRAWICON((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)),LOW*0.98,34) ;
DRAWICON((ZIG(3,5)[=REF(ZIG(3,5),2)) AND (REF(ZIG(3,5),2)>=REF(ZIG(3,5),3)),HIGH*1.01,35);
AAX:=IF((CLOSE < 100),CLOSE,(CLOSE / 100));
A5:=INTPART(((4 * (LOG(AAX) / LOG(2))) + 1));
B5:=((A5 - 1) / 4);
支撑:IF((CLOSE > 100),(POW(2,B5) * 100),POW(2,B5)),POINTDOT,LINETHICK6,COLORBROWN;
压力:IF((CLOSE > 100),(POW(2,(B5 + (1 / 4))) * 100),POW(2,(B5 + (1 / 4)))),POINTDOT,LINETHICK6;
N11:=10;
M:=INTPART(3*N11/5);
AAA:=REF(H,M)=HHV(H,2*M+1);
QYY:=BACKSET(AAA,M+1);
CCC:=FILTER(QYY,M) AND H=HHV(H,M+1);
DDDDQ:=BARSLAST(CCC),NODRAW;
GDTSS:=IF(CCC,CURRBARSCOUNT,0);
DINGBUTSS:=IF(DDDDQ,REF(GDTSS,DDDDQ),GDTSS);
GDCS11:=CONST(DINGBUTSS);
DINGBUTS11:=REF(DINGBUTSS,DDDDQ+1);
GDCS22:=CONST(DINGBUTS11);
AAQ11:=REF(L,M)=LLV(L,2*M+1);
QYQ11:=BACKSET(AAQ11,M+1);
CCQ11:=FILTER(QYQ11,M) AND L=LLV(L,M+1);
DDQ11:=BARSLAST(CCQ11);
DDTSS:=IF(CCQ11,CURRBARSCOUNT,0);
DDTS11:=IF(DDQ11,REF(DDTSS,DDQ11),DDTSS);
DDCS11:=CONST(DDTS11);
DDTS22:=REF(DDTS11,DDQ11+1);
DDCS22:=CONST(DDTS22);
压力线:DRAWLINE(CURRBARSCOUNT=GDCS22,H,CURRBARSCOUNT=GDCS11,H,1),COLORFFAA99,LINETHICK1;
支撑线:DRAWLINE(CURRBARSCOUNT=DDCS22,L,CURRBARSCOUNT=DDCS11,L,1),COLOR9966FF,LINETHICK1;
Y3:=CLOSE/REF(CLOSE,1)>1.07;
X3:=VOL>MA(VOL,5);
A1:=Y3 AND X3;
DRAWTEXT(A1,MA(CLOSE,5),'攻涨停'),COLORCYAN;
Z:=CLOSE/REF(CLOSE,1)<0.93;
W:=VOL
]解答:
?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);