本帖最后由 汉兵 于 2012-4-18 16:12 编辑
p1:=100;
p2:=18;
百分比:=5;
W:=BARSLAST(DISPSTATUS=1);
天:BARSLAST(L=LLV(LOW,W)),COLOR00FFFF,LINETHICK0,PRECIS0;
低涨C/LLV(LOW,W)-1)*100,COLOR0000FF,LINETHICK0,PRECIS2;
DRAWTEXTREL(10,120,'■低点至今上涨:'+NUMTOSTRN(低涨,2)+'% '+NUMTOSTRN(天,0)+'天'),COLOR0000FF;
BEGIN DRAWTEXTREL(10,50,'所属板块:'+BKNAME),LINETHICK1,color00FFFF;end;
ZT:=C/REF(C,1)>=1.096;
XH:=FILTER(ZT,13);
BH:=BARSLAST(ZT);
CZ:=REF(H,BH)-REF(L,BH);
STICKLINE(ZT,REF(O,BH),REF(C,BH),7,0),COLOR00FFFF;
M120:ma(c,120),colorred,LINETHICK2;
M60:ma(c,60);
三日增缩:=REF(V,1)>REF(V,3);
三日不破:=MIN(MIN(L,REF(L,1)),REF(L,2))>=REF(L,3);
三日量缩:=(MAX(MAX(V,REF(V,1)),REF(V,2))<REF(V,3));
三日价涨A:=C>=REF(C,1);
三日价涨B:=C<REF(C,1);
三日价涨C:=MIN(MIN(C,REF(C,1)),REF(C,2))>=REF(L,3);
大盘涨跌:=("1A0001$CLOSE"-ref("1A0001$CLOSE",1))/ref("1A0001$CLOSE",1)*100;
DRAWTEXTABS(190,25,'大盘涨跌:'+大盘涨跌+'% '),LINETHICK1,Colorff00ff;
JJ:=(3*C+H+L+O)/6;
VAR1:=(8*JJ+7*REF(JJ,1)+6*REF(JJ,2)+5*REF(JJ,3)+4*REF(JJ,4)+3*REF(JJ,5)+2*REF(JJ,6)+REF(JJ,8))/36;
TJ1:=VOL=HHV(VOL,10) AND VOL>2*REF(VOL,1) AND CLOSE>VAR1 AND C>REF(C,1);
LJL:FILTER(TJ1,5),linethick0;
DRAWTEXT(LJL,L*0.968,'黄金'),COLOR00ffFF;
STICKLINE(CLOSE,REF(LOW,BARSLAST(LJL)),REF(LOW,BARSLAST(LJL)),6,0),COLORYELLOW;
缩倍柱:=(VOL*1.95<=REF(VOL,1));
百日低量:=(VOL=LLV(VOL,100));
倍量柱:=C>REF(C,1)*1.04 AND (VOL>=1.9*REF(VOL,1));
四日前倍量柱:=(REF(VOL,3)>1.9*REF(VOL,4));
四日前高量柱:=(REF(VOL,3)>=REF(VOL,4) AND REF(VOL,3)<1.9*REF(VOL,4) AND 三日量缩);
前三引用不成立:=COUNT(REF(四日前倍量柱,1) AND (REF(三日不破,1) OR REF(三日价涨C,1)),3)=0 AND COUNT(REF(四日前高量柱,1) AND (REF(三日不破,1) OR REF(三日价涨C,1)),3)=0;
倍量黄金柱:=四日前倍量柱 AND 三日量缩 AND 三日不破 AND 三日价涨A AND 前三引用不成立;
高量黄金柱:=四日前高量柱 AND 三日量缩 AND 三日不破 AND 三日价涨A AND 前三引用不成立;
梯量黄金柱:=四日前倍量柱 AND 三日增缩 AND 三日不破 AND 三日价涨A AND 前三引用不成立;
黄金柱:= ((倍量黄金柱 or 高量黄金柱 or 梯量黄金柱 or LJL) and c/ref(c,1)>=1.015);
次倍量黄金柱:=NOT(黄金柱) AND 四日前倍量柱 AND 三日量缩 AND 三日不破 AND 三日价涨B AND 前三引用不成立;
次高量黄金柱:=NOT(黄金柱) AND 四日前高量柱 AND 三日量缩 AND 三日不破 AND 三日价涨B AND 前三引用不成立;
次黄金柱:=(次倍量黄金柱 OR 次高量黄金柱) and c>ref(c,1);
准倍量黄金柱:=NOT(黄金柱 OR 次黄金柱) AND 四日前倍量柱 AND ((三日量缩 AND 三日价涨C) OR (COUNT(倍量柱,3)>=1 AND 三日不破)) AND 前三引用不成立;
准高量黄金柱:=NOT(黄金柱 OR 次黄金柱) AND 四日前高量柱 AND (三日量缩 AND 三日价涨C) AND 前三引用不成立;
准黄金柱:=(准倍量黄金柱 OR 准高量黄金柱) and c>ref(c,1);
倍量将军柱:=NOT(黄金柱 OR 次黄金柱 OR 准黄金柱) AND 四日前倍量柱 AND 三日不破 AND 三日价涨A AND 前三引用不成立;
高量将军柱:=NOT(黄金柱 OR 次黄金柱 OR 准黄金柱) AND 四日前高量柱 AND 三日不破 AND 三日价涨A AND 前三引用不成立;
将军柱:=(倍量将军柱 OR 高量将军柱)and c>ref(c,1);
次倍量将军柱:=NOT(黄金柱 OR 次黄金柱 OR 准黄金柱 OR 将军柱) AND 四日前倍量柱 AND 三日不破 AND 三日价涨B AND 前三引用不成立;
次高量将军柱:=NOT(黄金柱 OR 次黄金柱 OR 准黄金柱 OR 将军柱) AND 四日前高量柱 AND 三日不破 AND 三日价涨B AND 前三引用不成立;
次将军柱:=次倍量将军柱 OR 次高量将军柱;
准倍量将军柱:=NOT(黄金柱 OR 次黄金柱 OR 准黄金柱 OR 将军柱 OR 次将军柱) AND 四日前倍量柱 AND 三日价涨C AND 前三引用不成立;
准高量将军柱:=NOT(黄金柱 OR 次黄金柱 OR 准黄金柱 OR 将军柱 OR 次将军柱) AND 四日前高量柱 AND 三日价涨C AND 前三引用不成立;
准将军柱:=准倍量将军柱 OR 准高量将军柱;
BACKSET100:=BACKSET(黄金柱 OR 次黄金柱 OR 准黄金柱 OR 将军柱 OR 次将军柱 OR 准将军柱,4);
FILTER100:=FILTER(BACKSET100,3);
BACKSET101:=BACKSET(黄金柱,4);
FILTER101:=FILTER(BACKSET101,3);
BACKSET102:=BACKSET(次黄金柱,4);
FILTER102:=FILTER(BACKSET102,3);
BACKSET103:=BACKSET(准黄金柱,4);
FILTER103:=FILTER(BACKSET103,3);
BACKSET104:=BACKSET(将军柱,4);
FILTER104:=FILTER(BACKSET104,3);
BACKSET105:=BACKSET(次将军柱,4);
FILTER105:=FILTER(BACKSET105,3);
BACKSET106:=BACKSET(准将军柱,4);
FILTER106:=FILTER(BACKSET106,3);
黄金线下影线:=REF(FILTER100,3)=1 AND MIN(MIN(L,REF(L,1)),REF(L,2))<=REF(L,3);
黄金线实体下端:=REF(FILTER100,3)=1 AND MIN(MIN(L,REF(L,1)),REF(L,2))<=MIN(REF(C,3),REF(O,3)) AND MIN(MIN(L,REF(L,1)),REF(L,2))>REF(L,3);
黄金线上影线:=REF(FILTER100,3)=1 AND MIN(MIN(L,REF(L,1)),REF(L,2))>=REF(H,3);
黄金线实体上端:=REF(FILTER100,3)=1 AND MIN(MIN(L,REF(L,1)),REF(L,2))>=MAX(REF(C,3),REF(O,3)) AND REF(FILTER100,3)=1 AND MIN(MIN(L,REF(L,1)),REF(L,2))<REF(H,3);
黄金线实体中间:=REF(FILTER100,3)=1 AND MIN(MIN(L,REF(L,1)),REF(L,2))<MAX(REF(C,3),REF(O,3)) AND REF(FILTER100,3)=1 AND MIN(MIN(L,REF(L,1)),REF(L,2))>MIN(REF(C,3),REF(O,3));
黄金线实体中1:=REF(FILTER100,3)=1 AND MIN(MIN(L,REF(L,1)),REF(L,2))<MAX(REF(C,3),REF(O,3)) AND REF(FILTER100,3)=1 AND MIN(MIN(L,REF(L,1)),REF(L,2))>MIN(REF(C,3),REF(O,3)) AND REF(L,2)=MIN(MIN(L,REF(L,1)),REF(L,2));
黄金线实体中2:=REF(FILTER100,3)=1 AND MIN(MIN(L,REF(L,1)),REF(L,2))<MAX(REF(C,3),REF(O,3)) AND REF(FILTER100,3)=1 AND MIN(MIN(L,REF(L,1)),REF(L,2))>MIN(REF(C,3),REF(O,3)) AND REF(L,1)=MIN(MIN(L,REF(L,1)),REF(L,2));
黄金线实体中3:=REF(FILTER100,3)=1 AND MIN(MIN(L,REF(L,1)),REF(L,2))<MAX(REF(C,3),REF(O,3)) AND REF(FILTER100,3)=1 AND MIN(MIN(L,REF(L,1)),REF(L,2))>MIN(REF(C,3),REF(O,3)) AND L=MIN(MIN(L,REF(L,1)),REF(L,2));
BACKSET201:=BACKSET(黄金线下影线,4);
FILTER201:=FILTER(BACKSET201,3);
BACKSET202:=BACKSET(黄金线实体下端,4);
FILTER202:=FILTER(BACKSET202,3);
BACKSET203:=BACKSET(黄金线上影线,4);
FILTER203:=FILTER(BACKSET203,3);
BACKSET204:=BACKSET(黄金线实体上端,4);
FILTER204:=FILTER(BACKSET204,3);
BACKSET205:=BACKSET(黄金线实体中间,4);
FILTER205:=FILTER(BACKSET205,3);
BACKSET2051:=BACKSET(黄金线实体中1,4);
FILTER2051:=FILTER(BACKSET2051,3);
BACKSET2052:=BACKSET(黄金线实体中2,4);
FILTER2052:=FILTER(BACKSET2052,3);
BACKSET2053:=BACKSET(黄金线实体中3,4);
FILTER2053:=FILTER(BACKSET2053,3);
BT201:=IF(BARSLAST(FILTER201)=0,BARSCOUNT(CLOSE),BARSLAST(FILTER201));
BT202:=IF(BARSLAST(FILTER202)=0,BARSCOUNT(CLOSE),BARSLAST(FILTER202));
BT203:=IF(BARSLAST(FILTER203)=0,BARSCOUNT(CLOSE),BARSLAST(FILTER203));
BT204:=IF(BARSLAST(FILTER204)=0,BARSCOUNT(CLOSE),BARSLAST(FILTER204));
BT205:=IF(BARSLAST(FILTER205)=0,BARSCOUNT(CLOSE),BARSLAST(FILTER205));
BT2051:=IF(BARSLAST(FILTER2051)=0,BARSCOUNT(CLOSE),BARSLAST(FILTER2051));
BT2052:=IF(BARSLAST(FILTER2052)=0,BARSCOUNT(CLOSE),BARSLAST(FILTER2052));
BT2053:=IF(BARSLAST(FILTER2053)=0,BARSCOUNT(CLOSE),BARSLAST(FILTER2053));
最近黄金线:=MIN(MIN(MIN(MIN(MIN(MIN(BT201,BT202),BT203),BT204),BT2051),BT2052),BT2053);
DAY1:=SUMBARS(FILTER100,1);
HJX1_1:=IF(SUMBARS(FILTER201,1)=DAY1,IF(DAY1=1,LOW,REF(LOW,DAY1-1)),0);
HJX1_2:=IF(SUMBARS(FILTER202,1)=DAY1,IF(DAY1=1,MIN(C,O),MIN(REF(C,DAY1-1),REF(OPEN,DAY1-1))),0);
HJX1_3:=IF(SUMBARS(FILTER203,1)=DAY1,IF(DAY1=1,HIGH,REF(HIGH,DAY1-1)),0);
HJX1_4:=IF(SUMBARS(FILTER204,1)=DAY1,IF(DAY1=1,MAX(C,O),MAX(REF(C,DAY1-1),REF(OPEN,DAY1-1))),0);
HJX1_51:=IF(SUMBARS(FILTER2051,1)=DAY1,IF(DAY1=2,LOW,IF(DAY1<2,0,REF(LOW,DAY1-2))),0);
HJX1_52:=IF(SUMBARS(FILTER2052,1)=DAY1,IF(DAY1=3,LOW,IF(DAY1<3,0,REF(LOW,DAY1-3))),0);
HJX1_53:=IF(SUMBARS(FILTER2053,1)=DAY1,IF(DAY1=4,LOW,IF(DAY1<4,0,REF(LOW,DAY1-4))),0);
黄金线:=HJX1_1+HJX1_2+HJX1_3+HJX1_4+HJX1_51+HJX1_52+HJX1_53;
立桩量:=VOL=HHV(VOL,40) AND VOL>1.9*REF(VOL,1);
立桩量三日突破:=IF(BARSLAST(立桩量)=1 AND CLOSE>REF(HIGH,1),1,IF(BARSLAST(立桩量)=2 AND CLOSE>REF(HIGH,2),1,IF(BARSLAST(立桩量)=3 AND CLOSE>REF(HIGH,3),1,0)));
立桩量三日不破:=BARSLAST(立桩量)=3 AND REF(LOW,3)<=MIN(MIN(C,REF(C,1)),REF(C,2));
BACKSET300:=BACKSET(立桩量三日不破,4);
BACKSET301:=BACKSET(立桩量三日突破,4);
立桩量成立:=FILTER(BACKSET300,3) AND BACKSET301 AND 立桩量;
DRAWTEXT(立桩量成立,HIGH*1.01,'↙立桩量'),COLOR00FF00;
DRAWTEXT(FILTER101 and isup,LOW*0.988,'↖黄金'),COLORYELLOW;
STICKLINE(FILTER101 and isup,OPEN,CLOSE,0.5,0),COLORYELLOW;
DRAWTEXT(FILTER102,LOW*0.986,'↖次黄'),COLORYELLOW;
DRAWTEXT(FILTER104 and c>ref(c,1),LOW*0.985,'↖将军'),COLORYELLOW;
STICKLINE(FILTER104,OPEN,CLOSE,1.5,0),COLORYELLOW;
黄金:sum(FILTER101 or ljl and isup,120),linethick0;
K1:=SUMBARS(FILTER104,1);
STICKLINE(K1,REF(L,K1-2),REF(L,K1-2),10,0),COLORYELLOW;
K2:=SUMBARS(FILTER101 and isup,1);
STICKLINE(K2,REF(L,K2-2),REF(L,K2-2),10,0),COLORYELLOW;
tkqk:=IF(L>=REF(H,1)*1.002,1,0);
drawtext(tkqk,ref(l,1),'↖跳空');
STICKLINE(tkqk,REF(h,1),REF(h,1),200,0),COLORgreen;
预黄金柱:=REF(V,2)>=REF(V,3)*2 AND REF(C,2)>REF(O,2) AND
REF(V,2)=HHV(V,3) AND C/REF(C,2) >=1.1 AND REF(L,2)=LLV(L,3);
DRAWTEXT(预黄金柱 ,LOW*0.985,'↖预金'),COLORYELLOW;
STICKLINE(预黄金柱,OPEN,CLOSE,1.5,0),COLORblue;
L0:=0.00;{点位差参数}
{底精准线}
L1:=ABS(L-REF(L,1))<=L0;
L2:=ABS(L-REF(L,2))<=L0;
L3:=ABS(L-REF(L,3))<=L0;
L4:=ABS(L-REF(L,4))<=L0;
L5:=ABS(L-REF(L,5))<=L0;
精准线首次:=L1 OR L2 OR L3 OR L4 OR L5;
精准左:=FILTER(精准线首次,3) ;
天数:=BARSLAST(精准左);
LTS:=REF(L,天数);
精准右:=ABS(L-LTS)<=L0;
STICKLINE(精准左,L,L,50,-1),COLORffffff;
{DRAWLINE(精准左,L,精准右,LTS,1),COLORMAGENTA; }
{顶精准线}
G1:=ABS(H-REF(H,1))<=L0;
G2:=ABS(H-REF(H,2))<=L0;
G3:=ABS(H-REF(H,3))<=L0;
G4:=ABS(H-REF(H,4))<=L0;
G5:=ABS(H-REF(H,5))<=L0;
精准线首次1:=G1 OR G2 OR G3 OR G4 OR G5;
精准左1:=FILTER(精准线首次1,3) ;
天数1:=BARSLAST(精准左1);
GTS:=REF(L,天数1);
精准右1:=ABS(H-GTS)<=L0;
STICKLINE(精准左1,H,H,50,-1),COLORred;
TY:=C;
A1:=REF(TY,10)=HHV(TY,2*10+1); B1:=FILTER(A1,10); C1:=BACKSET(B1,10+1); HD:=FILTER(C1,10);
A2:=REF(TY,10)=LLV(TY,2*10+1); B2:=FILTER(A2,10); C2:=BACKSET(B2,10+1); LD:=FILTER(C2,10);
前期高位:REF(C,BARSLAST(HD)),COLORBLUE,POINTDOT;
STICKLINE(C,前期高位,前期高位,8,0),COLORBLUE;
波峰距离:= PEAKBARS(3,百分比,1);
波谷值:=TROUGH(2,百分比,1);
波谷距离:=TROUGHBARS(2,百分比,1);
距离:=BARSTATUS;
CC2:=REF(C,1);
比前跌率:=(CC2-C)*100/CC2;
本日跌率:=(O-C)*100/O;
距离FK1:=波峰距离-1;{波峰右边K距离}
线位置:= REF(L,距离FK1);
TJ11:=波峰距离>波谷距离+5 AND 波峰距离<120;
TJ2:=REF(本日跌率,距离FK1)>3 OR REF(比前跌率,距离FK1)>3;{跌率>3%}
TJ33:=距离<240;
TJ4:=REF(C,距离FK1)<REF(O,距离FK1) {阴K}
AND REF(C,距离FK1)<REF(MIN(C,O),距离FK1+1);{跌破前K}
画线条件:= 线位置=REF(线位置,1) AND TJ2 AND TJ4;{画线条件}
STICKLINE(画线条件,线位置,线位置,15,900),COLORMAGENTA;{画线}
画线:=IF(画线条件,线位置,0);
打字条件:=FILTER(画线条件 AND TJ11 AND TJ33,20);
DRAWTEXT(打字条件,线位置*1.01,'凹口平衡线'),COLORGREEN,linethick3;
大盘c:=EMA(INDEXC,500)/EMA(C,500);
大盘线:INDEXC/大盘c,linethick0;
STICKLINE(INDEXC>INDEXO,INDEXC/大盘c,INDEXO/大盘c,8,1),COLORff00FF;
STICKLINE(INDEXC>INDEXO,INDEXH/大盘c,INDEXL/大盘c,0.5,1),COLORff00FF;
STICKLINE(INDEXC<INDEXO,INDEXC/大盘c,INDEXO/大盘c,8,1),COLOR00FF00;
STICKLINE(INDEXC<INDEXO,INDEXH/大盘c,INDEXL/大盘c,0.5,1),COLOR00FF00;
STICKLINE(INDEXC=INDEXO,INDEXH/大盘c,INDEXL/大盘c,8,1),COLOR00FFBB; |