A交易趋势系统
DRAWGBK(CLOSE=CLOSE,COLORRGB(90,90,90),COLORRGB(0,0,0),1);
AA:=REF(HIGH,4)=HHV(HIGH,2*4+1);
AAA:=FILTER(AA,4);
BB:=BACKSET(AAA,4+1);
CC1:=FILTER(BB,4);
CC:=CC1 OR ISLASTBAR;
AA2:=REF(LOW,4)=LLV(LOW,2*4+1);
AAA2:=FILTER(AA2,4);
BB2:=BACKSET(AAA2,4+1);
CC22:=FILTER(BB2,4);
CC2:=CC22 AND NOT(CC1);
EA:=BACKSET(CC,REF(BARSLAST(CC2),1)+1);
EB:=EA>REF(EA,1);
EE:=BACKSET(EB,2);
FF1:=EE>REF(EE,1);
EE2:=BACKSET(FF1 AND COUNT(CC,REF(BARSLAST(CC2),1)+2)=0,REF(BARSLAST(CC2),1)+2);
FF2:=EE2>REF(EE2,1);
EE3:=BACKSET(FF2 AND COUNT(CC,REF(BARSLAST(CC2),1)+2)=0,REF(BARSLAST(CC2),1)+2);
FF3:=EE3>REF(EE3,1);
JS:=IF(CC,COUNT(CC2,REF(BARSLAST(CC),1)+1),0);
G1:=IF(JS=1 AND CC,BARSLAST(FF1),0);
GA:=IF(CC AND REF(LOW,BARSLAST(FF1))>=REF(LOW,BARSLAST(FF2)),BARSLAST(FF2),BARSLAST(FF1));
G2:=IF(JS=2 AND CC,GA,0);
G3:=IF(JS>=3 AND CC,IF(CC AND REF(LOW,GA)>=REF(LOW,BARSLAST(FF3)),BARSLAST(FF3),GA),0);
GG:=G1+G2+G3;
JA:=BACKSET(CC,GG);
JB:=JA>REF(JA,1);
JJ:=BACKSET(JB,2);
QLD:=JJ>REF(JJ,1);
LD1:=QLD OR ISLASTBAR;
HEA:=BACKSET(LD1,REF(BARSLAST(CC),1)+1);
HEB:=HEA>REF(HEA,1);
HEE:=BACKSET(HEB,2);
HFF1:=HEE>REF(HEE,1);
HEE2:=BACKSET(HFF1 AND COUNT(LD1,REF(BARSLAST(CC),1)+2)=0,REF(BARSLAST(CC),1)+2);
HFF2:=HEE2>REF(HEE2,1);
HEE3:=BACKSET(HFF2 AND COUNT(LD1,REF(BARSLAST(CC),1)+2)=0,REF(BARSLAST(CC),1)+2);
HFF3:=HEE3>REF(HEE3,1);
HJS:=IF(LD1,COUNT(CC1,REF(BARSLAST(LD1),1)+1),0);
HG1:=IF(HJS=1 AND LD1,BARSLAST(HFF1),0);
HGA:=IF(LD1 AND REF(HIGH,BARSLAST(HFF1))<=REF(HIGH,BARSLAST(HFF2)),BARSLAST(HFF2),BARSLAST(HFF1));
HG2:=IF(HJS=2 AND LD1,HGA,0);
HG3:=IF(HJS>=3 AND LD1,IF(LD1 AND REF(HIGH,HGA)<=REF(HIGH,BARSLAST(HFF3)),BARSLAST(HFF3),HGA),0);
HGG:=HG1+HG2+HG3;
HJA:=BACKSET(LD1,HGG);
HJB:=HJA>REF(HJA,1);
HJJ:=BACKSET(HJB,2);
QHD:=HJJ>REF(HJJ,1);
X1:=BACKSET(ISLASTBAR,BARSLAST(QLD)+1);
X2:=X1>REF(X1,1);
Y1:=BACKSET(ISLASTBAR,BARSLAST(QHD)+1);
Y2:=Y1>REF(Y1,1);
QZ1:=IF(BARSLAST(X2)
QZ2:=IF(BARSLAST(X2)
UU:=BACKSET(ISLASTBAR,BARSLAST(QLD)+1);
QVV:=UU>REF(UU,1);
WW:=BACKSET(QVV,REF(BARSLAST(QLD),1)+2);
QXX:=WW>REF(WW,1);
UU2:=BACKSET(ISLASTBAR,BARSLAST(QHD)+1);
QVV2:=UU2>REF(UU2,1);
WW2:=BACKSET(QVV2,REF(BARSLAST(QHD),1)+2);
QXX2:=WW2>REF(WW2,1);
A1:=MA(CLOSE,13);
QZX:=REF(A1,13/2+1);
A:=(CLOSE-REF(CLOSE,1))/REF(CLOSE,1)*100;
A1:=BARSLAST(A>3);
QA2:=IF(A1>0,1,0);
AX:=(CLOSE-REF(CLOSE,1))/REF(CLOSE,1)*100;
AX1:=BARSLAST(AX<-3);
QAX2:=IF(AX1>0,1,0);
QLIFE:=(EMA(CLOSE,60)+EMA(CLOSE,90))/2;
VAR1:=(2*CLOSE+HIGH+LOW)/4;
QSNOOK:=EMA(VAR1,99)*0.91;
QYY:="DPSC.YY#week";
QBH:="DPSC.BH#week";
DQDB:=LLV(LOW,4);
CQDB:=LLV(LOW,19);
DQGD:=HHV(HIGH,4);
CQGD:=HHV(HIGH,19);
QJC:=CROSS("MACD.DIFF#week"(10,6,3),"MACD.DEA#week"(10,6,3));
QHZ:=2*("MACD.DIFF#week"(10,6,3)-"MACD.DEA#week"(10,6,3));
QZKD:=CROSS("KDJ.K#week","KDJ.D#week") AND "KDJ.D#week"<30;
QSSWB:=HHVBARS(REF(ZIG(3,19),1)
QXDWB:=HHVBARS(ZIG(3,19)>REF(ZIG(3,19),1),0);
ZSLIFE:=(EMA(INDEXC,60)+EMA(INDEXC,90))/2;
ZSBL:=INDEXC/ZSLIFE;
GGLIFE:=(EMA(CLOSE,60)+EMA(CLOSE,90))/2;
INDEXS:="SZ399101$CLOSE";
ZXLIFE:=(EMA(INDEXS,60)+EMA(INDEXS,90))/2;
ZXZSBL:=INDEXS/ZXLIFE;
INDEXX:="SH1B0017$CLOSE";
XLIFE:=(EMA(INDEXX,60)+EMA(INDEXX,90))/2;
XZSBL:=INDEXX/ZXLIFE;
QMRZY:=ROUND(((REF(HIGH,1)-REF(LOW,1))*8/10+CLOSE)*100)/100;
QMRZS:=ROUND((CLOSE-(REF(HIGH,1)-REF(LOW,1))*8/20)*100)/100;
H1:IF(K2=1,REF(HIGH,BARSLAST(QVV2)),CLOSE),POINTDOT,LINETHICK1,colorFF66FF;
H2:IF(K2=1,REF(HIGH,BARSLAST(QXX2)),CLOSE),POINTDOT,LINETHICK1,colorFF66FF;
L1:IF(K2=1,REF(LOW,BARSLAST(QVV)),CLOSE),POINTDOT,LINETHICK1,color99FF66;
L2:IF(K2=1,REF(LOW,BARSLAST(QXX)),CLOSE),POINTDOT,LINETHICK1,color99FF66;
STICKLINE(CLOSE>REF(CLOSE,1),LOW,HIGH,0.1,0),colorFF;
STICKLINE(CLOSE<=REF(CLOSE,1),LOW,HIGH,0.1,0),colorFFFF00;
STICKLINE(CLOSE
STICKLINE(CLOSE
STICKLINE(CLOSE
STICKLINE(CLOSE
STICKLINE(CLOSE
STICKLINE(CLOSE
STICKLINE(CLOSE
STICKLINE(CLOSE
STICKLINE(CLOSE>=QZX,CLOSE,OPEN,8,0),colorFF00FF;
STICKLINE(CLOSE>=QZX,CLOSE,OPEN,7,0),colorFF22FF;
STICKLINE(CLOSE>=QZX,CLOSE,OPEN,6,0),colorFF44FF;
STICKLINE(CLOSE>=QZX,CLOSE,OPEN,5,0),colorFF66FF;
STICKLINE(CLOSE>=QZX,CLOSE,OPEN,4,0),colorFF88FF;
STICKLINE(CLOSE>=QZX,CLOSE,OPEN,3,0),colorFF99FF;
STICKLINE(CLOSE>=QZX,CLOSE,OPEN,2,0),colorFFAAFF;
STICKLINE(CLOSE>=QZX,CLOSE,OPEN,1,0),colorFFBBFF;
STICKLINE((QYY=1 OR QBH=1) AND (K3=2 OR K3=3 OR K3=4),CLOSE,OPEN,8,0),colorFF0000;
STICKLINE((QYY=1 OR QBH=1) AND (K3=2 OR K3=3 OR K3=4),CLOSE,OPEN,7,0),colorFF2200;
STICKLINE((QYY=1 OR QBH=1) AND (K3=2 OR K3=3 OR K3=4),CLOSE,OPEN,6,0),colorFF4400;
STICKLINE((QYY=1 OR QBH=1) AND (K3=2 OR K3=3 OR K3=4),CLOSE,OPEN,5,0),colorFF6600;
STICKLINE((QYY=1 OR QBH=1) AND (K3=2 OR K3=3 OR K3=4),CLOSE,OPEN,4,0),colorFF8800;
STICKLINE((QYY=1 OR QBH=1) AND (K3=2 OR K3=3 OR K3=4),CLOSE,OPEN,3,0),colorFFAA00;
STICKLINE((QYY=1 OR QBH=1) AND (K3=2 OR K3=3 OR K3=4),CLOSE,OPEN,2,0),colorFFBB00;
STICKLINE((QYY=1 OR QBH=1) AND (K3=2 OR K3=3 OR K3=4),CLOSE,OPEN,1,0),colorFFCC00;
STICKLINE((HIGH>QSNOOK AND LOWQLIFE AND LOW
STICKLINE((HIGH>QSNOOK AND LOWQLIFE AND LOW
STICKLINE((HIGH>QSNOOK AND LOWQLIFE AND LOW
STICKLINE((HIGH>QSNOOK AND LOWQLIFE AND LOW
STICKLINE((HIGH>QSNOOK AND LOWQLIFE AND LOW
STICKLINE((HIGH>QSNOOK AND LOWQLIFE AND LOW
STICKLINE((HIGH>QSNOOK AND LOWQLIFE AND LOW
STICKLINE((HIGH>QSNOOK AND LOWQLIFE AND LOW
STICKLINE(CLOSE>=QZX AND QA2=0 AND K1=1,HIGH,LOW,0,0),colorEEFF;
STICKLINE(CLOSE>=QZX AND QA2=0 AND K1=1,OPEN,CLOSE,8,0),colorFF;
STICKLINE(CLOSE>=QZX AND QA2=0 AND K1=1,OPEN,CLOSE,7,0),color22FF;
STICKLINE(CLOSE>=QZX AND QA2=0 AND K1=1,OPEN,CLOSE,6,0),color44FF;
STICKLINE(CLOSE>=QZX AND QA2=0 AND K1=1,OPEN,CLOSE,5,0),color66FF;
STICKLINE(CLOSE>=QZX AND QA2=0 AND K1=1,OPEN,CLOSE,4,0),color88FF;
STICKLINE(CLOSE>=QZX AND QA2=0 AND K1=1,OPEN,CLOSE,3,0),colorAAFF;
STICKLINE(CLOSE>=QZX AND QA2=0 AND K1=1,OPEN,CLOSE,2,0),colorCCFF;
STICKLINE(CLOSE>=QZX AND QA2=0 AND K1=1,OPEN,CLOSE,1,0),colorEEFF;
STICKLINE(CLOSE
STICKLINE(CLOSE
STICKLINE(CLOSE
STICKLINE(CLOSE
STICKLINE(CLOSE
STICKLINE(CLOSE
STICKLINE(CLOSE
STICKLINE(CLOSE
STICKLINE(CLOSE
VERTLINE(CLOSE>0 AND ISLASTBAR),POINTDOT,SHIFT1,colorFFFF;
STICKLINE(QMRZS>LOW AND ISLASTBAR,QMRZY,QMRZS,8,1),SHIFT1,colorFF00FF;
STICKLINE(QMRZS
STICKLINE(QMRZS=LOW AND ISLASTBAR,QMRZY,QMRZS,8,1),SHIFT1,colorFF0000;
DRAWTEXT(DQDB-CQDB>CQGD-DQGD AND ISLASTBAR,DQDB,'趋势↑'),colorFF00FF;
PARTLINE(DQDB-CQDB>CQGD-DQGD,DQDB),POINTDOT,colorFF00FF;
DRAWTEXT(DQDB-CQDB
PARTLINE(DQDB-CQDB
PARTLINE(DQDB=CQDB AND CQDB=REF(CQDB,1),CQDB),LINETHICK2,colorFFFF;
DRAWTEXT(DQDB=CQDB AND CQDB=REF(CQDB,1) AND ISLASTBAR,CQDB,'筑底↑'),colorFFFF;
PARTLINE(DQGD=CQGD AND CQGD=REF(CQGD,1),CQGD),LINETHICK2,colorFF00;
DRAWTEXT(DQGD=CQGD AND CQGD=REF(CQGD,1) AND ISLASTBAR,CQGD,'铸顶↓'),colorFF00;
PARTLINE(BARSLAST(DQDB=CQDB AND CQDB=REF(CQDB,1))<5 AND DQDB=CQDB AND CQDB=REF(CQDB,1) AND CQDB*1.03
PARTLINE(BARSLAST(DQGD=CQGD AND CQGD=REF(CQGD,1))<5 AND DQGD=CQGD AND CQGD=REF(CQGD,1) AND CQGD*0.97>CLOSE AND (K3=3 OR K3=4),CQGD),CIRCLEDOT,colorFF00;
DRAWLINE(QZ1 AND K2=1,QZ2,ISLASTBAR,CLOSE,0),POINTDOT,colorFF9900;
DRAWLINE(QXX AND K2=1,LOW,QVV,LOW,1),POINTDOT,colorFFFF;
DRAWLINE(QXX2 AND K2=1,HIGH,QVV2,HIGH,1),POINTDOT,colorFFFF;
DRAWICON(QHD AND QXX2 AND K2=1,HIGH*1.002,12);
DRAWICON(QLD AND QXX AND K2=1,LOW*1.002,10);
DRAWICON(QJC AND QHZ>0 AND REF(QHZ,1)<0,LOW,14),ALIGN5;
DRAWICON(QZKD,LOW,13),ALIGN5;
DRAWTEXT(QSSWB=2 AND K4=1,LOW*0.98,'3'),colorFF;
DRAWTEXT(QSSWB=4 AND K4=1,HIGH*1.02,'5'),color9966FF;
DRAWTEXT(QSSWB=7 AND K4=1,LOW*0.98,'8'),colorFFFF;
DRAWTEXT(QSSWB=12 AND K4=1,HIGH*1.02,'13'),colorFF33FF;
DRAWTEXT(QSSWB=20 AND K4=1,LOW*0.98,'21'),color66FF;
DRAWTEXT(QXDWB=3 AND K4=1,LOW*0.98,'3'),colorFF;
DRAWTEXT(QXDWB=5 AND K4=1,HIGH*1.02,'5'),color9966FF;
DRAWTEXT(QXDWB=8 AND K4=1,LOW*0.98,'8'),colorFFFF;
DRAWTEXT(QXDWB=13 AND K4=1,HIGH*1.02,'13'),colorFF33FF;
DRAWTEXT(QXDWB=21 AND K4=1,LOW*0.98,'21'),color66FF;
PARTLINE(K5=1,ZSBL*GGLIFE),color808080;
PARTLINE(K5=1 AND STRFIND(STKLABEL,'002',1)=1,ZXZSBL*GGLIFE),POINTDOT,colorFFFFFF;
|