当前位置:分析家公式网 → 股票公式 → 通达信公式 → 一键转帖:箱形顶底(副图,源码,主图)
软件名称:[B]箱形顶底(副图,源码,主图)[/B]
软件类型:国产软件
运行环境:Win9X/Win2000/WinXP/Win2003/
软件语言:简体中文
授权方式:免费版
软件大小:6.00 KB
官方主页:Home Page
更新时间:2012-01-22 02:28:35
软件简介:
在股票操作中有一种理论,叫箱体结构,本人搜集了一些,同时结合了一些经典指标,制作了一个短中长箱体买卖指标,其中有一部分是有未来函数的,已用大括号括上了,而找线公式本身就是有未来的,所以无法省去,好在只是一种参考,不做为买卖的最终依据,纯属渔乐,也算是我回报理论的“大作”吧,当然版权所有,违者看情况吧。
源码:
VAR1A1:=LLV(LOW,21);
VAR2A2:=HHV(HIGH,21);
AK1:=EMA((((CLOSE - VAR1A1) / (VAR2A2 - VAR1A1)) * 100),5);
AK:=EMA((((CLOSE - VAR1A1) / (VAR2A2 - VAR1A1)) * 50),13);
AB:=CROSS(AK1,AK);
DRAWTEXT((AB = 1),C,'○牛窝'),COLORYELLOW;
SWJ1:=PEAK(1,1,1);
SWJ2:=TROUGH(2,1,1);
预测高值:(SWJ1-SWJ2)*2+SWJ2;
预测低值:(SWJ1-SWJ2)/2.7+SWJ2;
箱顶5:PEAK(CLOSE,5,1)*1.01,COLORGREEN;
箱底10:TROUGH(CLOSE,10,1)*1.02,COLORDD00FF;
箱顶3:PEAK(CLOSE,3,1)*1.01,COLOR0000FF;
箱底3:TROUGH(CLOSE,3,1)*1,COLORCYAN;
A7:=C-REF(C,1);
A8:=100*EMA(EMA(A7,6),6)/EMA(EMA(ABS(A7),6),6);
SHORT:=7; LONG:=19;
RMA:=EMA(CLOSE,SHORT);
NMA:=EMA(CLOSE,LONG);
UP:=DRAWLINE(L=LLV(L,BARSLAST(CROSS(NMA,RMA))+1),LLV(L,BARSLAST(CROSS(NMA,RMA))+1),H=HHV(H,BARSLAST(CROSS(RMA,NMA))+1),HHV(H,BARSLAST(CROSS(RMA,NMA))+1),0);
DOWN:=DRAWLINE(H=HHV(H,BARSLAST(CROSS(RMA,NMA))+1),HHV(H,BARSLAST(CROSS(RMA,NMA))+1),L=LLV(L,BARSLAST(CROSS(NMA,RMA))+1),LLV(L,BARSLAST(CROSS(NMA,RMA))+1),0);
DRAWTEXT(((LLV(A8,2)=LLV(A8,7) AND COUNT(A8<0,2) AND CROSS(A8,MA(A8,2))) AND REF(DOWN,1)<REF(DOWN,2) AND UP>REF(DOWN,1))=0,C-0.04,'起'),COLORRED;
{N01:=1;
DRAWTEXT((MA(预测高值,1)>REF(MA(预测高值,N01),1) AND MA(预测低值,1)<REF(MA(预测低值,N01),1)) OR((MA(预测高值,1)<REF(MA(预测高值,N01),1) AND MA(预测低值,1)>REF(MA(预测低值,N01),1))) AND ((LLV(A8,2)=LLV(A8,7) AND COUNT(A8<0,2) AND CROSS(A8,MA(A8,2))) AND REF(DOWN,1)<REF(DOWN,2) AND UP>REF(DOWN,1)),C-0.05,'虎'),COLORRED;
F:=100*(C-REF(C,1))/REF(C,1);
今小昨:=IF(C<REF(O,1) AND F<0,1,0);
P3:=今小昨;
今小前:=IF(C<REF(O,2) AND F<0,1,0);
P2:=今小前;
DRAWTEXT(((TROUGHBARS(3,3,1)=0 AND HIGH>LOW+0.01) AND (TROUGHBARS(3,3,1)=0 AND HIGH>LOW+0.01)),箱顶5,'M'),COLORRED;
DRAWTEXT(P3=0 AND REF(P3,1)=1 AND P2=0 AND REF(P2,1)=1 AND CROSS(ZIG(3,3) ,REF(ZIG(3 ,3),1)),箱顶5,'M'),COLORRED;
VARC1:=(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));
DRAWTEXT((VARC1=1),箱顶5,'D'),COLOR0000FF;
VARD1:=(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));
DRAWTEXT((VARD1=1),箱顶5+0.1,'MD'),COLOR00FF00;
买入:=(((LLV(A8,2)=LLV(A8,7) AND COUNT(A8<0,2) AND CROSS(A8,MA(A8,2))) AND REF(DOWN,1)<REF(DOWN,2) AND UP>REF(DOWN,1))=0,C);
起点线:买入,COLORDD00FF;
}
VAR1:=IF(YEAR>=2034 AND MONTH>9,0,1);
江恩线:=EMA(CLOSE,144), COLORBLUE,LINETHICK2;
VAR2:=IF(YEAR<=2003 AND MONTH<4,0,1);
VAR3:=IF(YEAR=2003 AND MONTH=5,0,1);
VAR4:=IF(YEAR<2003,0,1);
VAR5:=IF(YEAR=2002 AND MONTH=6 AND DAY=28,1,0);
VAR6:=IF(YEAR=2002 AND MONTH=3 AND DAY=21,1,0);
VAR7:=IF(YEAR=2001 AND MONTH=12 AND DAY=5,1,0);
VAR8:=IF(YEAR=2001 AND MONTH=6 AND DAY=14,1,0);
VAR9:=IF(YEAR=2001 AND MONTH=1 AND DAY=11,1,0);
VARA:=IF(YEAR=2000 AND MONTH=11 AND DAY=23,1,0);
VARB:=IF(YEAR=2000 AND MONTH=8 AND DAY=22,1,0);
VARC:=IF(YEAR=2000 AND MONTH=4 AND DAY=21,1,0);
VARD:=IF(YEAR=1999 AND MONTH=6 AND DAY=30,1,0);
VARE:=IF(YEAR=1999 AND MONTH=4 AND DAY=9,1,0);
VARF:=IF(YEAR=1998 AND MONTH=11 AND DAY=17,1,0);
VAR10:=IF(YEAR=1998 AND MONTH=6 AND DAY=4,1,0);
VAR11:=IF(YEAR=1997 AND MONTH=5 AND DAY=12,1,0);
VAR12:=IF(YEAR=1996 AND MONTH=12 AND DAY=11,1,0);
VAR13:=IF(YEAR=1994 AND MONTH=9 AND DAY=13,1,0);
VAR14:=IF(YEAR=1993 AND MONTH=2 AND DAY=16,1,0);
VAR15:=IF(YEAR=1992 AND MONTH=5 AND DAY=26,1,0);
VAR16:=IF(YEAR=2003 AND MONTH=3 AND DAY=4,1,0);
VAR17:=IF(YEAR=2003 AND MONTH=4 AND DAY=16,1,0);
VAR18:=(CROSS(100,"KDJ.J"(9,3,3)) OR CROSS("KDJ.K"(9,3,3),"KDJ.J"(9,3,3))) AND "KDJ.D"(9,3,3)>75;
VAR19:=IF(YEAR>1990 AND YEAR<2003,0,1);
VAR1A:=IF(YEAR=2003 AND MONTH=1 AND DAY=3,1,0);
VAR1B:=IF(YEAR=2002 AND MONTH=6 AND DAY=6,1,0);
VAR1C:=IF(YEAR=2002 AND MONTH=1 AND DAY=29,1,0);
VAR1D:=IF(YEAR=2001 AND MONTH=10 AND DAY=22,1,0);
VAR1E:=IF(YEAR=2001 AND MONTH=2 AND DAY=22,1,0);
VAR1F:=IF(YEAR=2000 AND MONTH=9 AND DAY=26,1,0);
VAR20:=IF(YEAR=1999 AND MONTH=12 AND DAY=28,1,0);
VAR21:=IF(YEAR=1999 AND MONTH=5 AND DAY=17,1,0);
VAR22:=IF(YEAR=1999 AND MONTH=2 AND DAY=9,1,0);
VAR23:=IF(YEAR=1998 AND MONTH=8 AND DAY=18,1,0);
VAR24:=IF(YEAR=1998 AND MONTH=3 AND DAY=26,1,0);
VAR25:=IF(YEAR=1997 AND MONTH=2 AND DAY=20,1,0);
VAR26:=IF(YEAR=1994 AND MONTH=7 AND DAY=29,1,0);
VAR27:=IF(YEAR=2000 AND MONTH=5 AND DAY=15,1,0);
VAR28:=IF(YEAR=1996 AND MONTH=1 AND DAY=19,1,0);
VAR29:=IF(YEAR=1992 AND MONTH=11 AND DAY=20,1,0);
VAR2A:=IF(YEAR=2003 AND MONTH=3 AND DAY=26,1,0);
VAR2B:=IF(YEAR=2003 AND MONTH=5 AND DAY=13 AND CLOSE>200,1,0);
VAR2C:=MA(3*SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1)-2*SMA(SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1),3,1),5)*VAR19;
VAR2D:=5;
VAR2E:=CROSS(VAR2C,VAR2D);
VAR2F:=VAR1A OR VAR1B OR VAR1C OR VAR1D OR VAR1E OR VAR1F OR VAR20 OR VAR21 OR VAR22 OR VAR23 OR VAR24 OR VAR25 OR VAR26 OR VAR27 OR VAR28 OR VAR29 OR VAR2A OR VAR2B OR VAR2E;
VAR30:=(VAR18 OR VAR5 OR VAR6 OR VAR7 OR VAR8 OR VAR9 OR VARA OR VARB OR VARC OR VARD OR VARE OR VARF OR VAR10 OR VAR11 OR VAR12 OR VAR13 OR VAR14 OR VAR15 OR VAR16 OR VAR17){ AND CLOSE>200};
DRAWICON(VAR2F,LOW-LOW*1/100,1);
DRAWICON(VAR2F AND CLOSE>江恩线,LOW,1);
DRAWICON(VAR30,HIGH,2);
DRAWTEXT(VAR2F AND CLOSE<江恩线,LOW,'秘密买点!'), COLORYELLOW;
DRAWTEXT(VAR2F AND CLOSE>江恩线,LOW,'强势买点!'), COLORRED;
DRAWTEXT(VAR30,HIGH+1,'秘密抛点'), COLOR00FF00;
AAA2:=SUM(IF( CLOSE>REF(CLOSE,1),VOL*C,0),0);
AAA3:=SUM(IF( CLOSE<REF(CLOSE,1),VOL*C,0),0);
AAA4:=SUM(IF( CLOSE=REF(CLOSE,1),VOL*C,0),0);
BB1:=0;
B1万元:=DVOL*DCLOSE/100;
B1差:=B1万元-REF(B1万元,1);
B2万元:=DVOL*DCLOSE/100;
B2比:=B2万元/REF(B2万元,1);
净流入万元:=(AAA2-AAA3-0.5*AAA4);
PM:=MA(净流入万元,1);
PMA:=PM/REF(PM,1)>1;
PMB:=REF(PMA,1)<1 AND PMA;
密码:(EMA(MA(B1万元,2),2))/100000,COLORYELLOW,NODRAW;
二日比:=密码/REF(密码,1);
选股:PMB AND 密码>REF(密码,1) AND 二日比>1,COLORRED,NODRAW;
DRAWNUMBER(选股=1 ,L,密码),COLORYELLOW;
DRAWICON(选股,L*0.975,1);
源码:
VAR1A1:=LLV(LOW,21);
VAR2A2:=HHV(HIGH,21);
AK1:=EMA((((CLOSE - VAR1A1) / (VAR2A2 - VAR1A1)) * 100),5);
AK:=EMA((((CLOSE - VAR1A1) / (VAR2A2 - VAR1A1)) * 50),13);
AB:=CROSS(AK1,AK);
DRAWTEXT((AB = 1),C,'○牛窝'),COLORYELLOW;
SWJ1:=PEAK(1,1,1);
SWJ2:=TROUGH(2,1,1);
预测高值:(SWJ1-SWJ2)*2+SWJ2;
预测低值:(SWJ1-SWJ2)/2.7+SWJ2;
箱顶5:PEAK(CLOSE,5,1)*1.01,COLORGREEN;
箱底10:TROUGH(CLOSE,10,1)*1.02,COLORDD00FF;
箱顶3:PEAK(CLOSE,3,1)*1.01,COLOR0000FF;
箱底3:TROUGH(CLOSE,3,1)*1,COLORCYAN;
A7:=C-REF(C,1);
A8:=100*EMA(EMA(A7,6),6)/EMA(EMA(ABS(A7),6),6);
SHORT:=7; LONG:=19;
RMA:=EMA(CLOSE,SHORT);
NMA:=EMA(CLOSE,LONG);
UP:=DRAWLINE(L=LLV(L,BARSLAST(CROSS(NMA,RMA))+1),LLV(L,BARSLAST(CROSS(NMA,RMA))+1),H=HHV(H,BARSLAST(CROSS(RMA,NMA))+1),HHV(H,BARSLAST(CROSS(RMA,NMA))+1),0);
DOWN:=DRAWLINE(H=HHV(H,BARSLAST(CROSS(RMA,NMA))+1),HHV(H,BARSLAST(CROSS(RMA,NMA))+1),L=LLV(L,BARSLAST(CROSS(NMA,RMA))+1),LLV(L,BARSLAST(CROSS(NMA,RMA))+1),0);
DRAWTEXT(((LLV(A8,2)=LLV(A8,7) AND COUNT(A8<0,2) AND CROSS(A8,MA(A8,2))) AND REF(DOWN,1)<REF(DOWN,2) AND UP>REF(DOWN,1))=0,C-0.04,'起'),COLORRED;
{N01:=1;
DRAWTEXT((MA(预测高值,1)>REF(MA(预测高值,N01),1) AND MA(预测低值,1)<REF(MA(预测低值,N01),1)) OR((MA(预测高值,1)<REF(MA(预测高值,N01),1) AND MA(预测低值,1)>REF(MA(预测低值,N01),1))) AND ((LLV(A8,2)=LLV(A8,7) AND COUNT(A8<0,2) AND CROSS(A8,MA(A8,2))) AND REF(DOWN,1)<REF(DOWN,2) AND UP>REF(DOWN,1)),C-0.05,'虎'),COLORRED;
F:=100*(C-REF(C,1))/REF(C,1);
今小昨:=IF(C<REF(O,1) AND F<0,1,0);
P3:=今小昨;
今小前:=IF(C<REF(O,2) AND F<0,1,0);
P2:=今小前;
DRAWTEXT(((TROUGHBARS(3,3,1)=0 AND HIGH>LOW+0.01) AND (TROUGHBARS(3,3,1)=0 AND HIGH>LOW+0.01)),箱顶5,'M'),COLORRED;
DRAWTEXT(P3=0 AND REF(P3,1)=1 AND P2=0 AND REF(P2,1)=1 AND CROSS(ZIG(3,3) ,REF(ZIG(3 ,3),1)),箱顶5,'M'),COLORRED;
VARC1:=(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));
DRAWTEXT((VARC1=1),箱顶5,'D'),COLOR0000FF;
VARD1:=(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));
DRAWTEXT((VARD1=1),箱顶5+0.1,'MD'),COLOR00FF00;
买入:=(((LLV(A8,2)=LLV(A8,7) AND COUNT(A8<0,2) AND CROSS(A8,MA(A8,2))) AND REF(DOWN,1)<REF(DOWN,2) AND UP>REF(DOWN,1))=0,C);
起点线:买入,COLORDD00FF;
}
VAR1:=IF(YEAR>=2034 AND MONTH>9,0,1);
江恩线:=EMA(CLOSE,144), COLORBLUE,LINETHICK2;
VAR2:=IF(YEAR<=2003 AND MONTH<4,0,1);
VAR3:=IF(YEAR=2003 AND MONTH=5,0,1);
VAR4:=IF(YEAR<2003,0,1);
VAR5:=IF(YEAR=2002 AND MONTH=6 AND DAY=28,1,0);
VAR6:=IF(YEAR=2002 AND MONTH=3 AND DAY=21,1,0);
VAR7:=IF(YEAR=2001 AND MONTH=12 AND DAY=5,1,0);
VAR8:=IF(YEAR=2001 AND MONTH=6 AND DAY=14,1,0);
VAR9:=IF(YEAR=2001 AND MONTH=1 AND DAY=11,1,0);
VARA:=IF(YEAR=2000 AND MONTH=11 AND DAY=23,1,0);
VARB:=IF(YEAR=2000 AND MONTH=8 AND DAY=22,1,0);
VARC:=IF(YEAR=2000 AND MONTH=4 AND DAY=21,1,0);
VARD:=IF(YEAR=1999 AND MONTH=6 AND DAY=30,1,0);
VARE:=IF(YEAR=1999 AND MONTH=4 AND DAY=9,1,0);
VARF:=IF(YEAR=1998 AND MONTH=11 AND DAY=17,1,0);
VAR10:=IF(YEAR=1998 AND MONTH=6 AND DAY=4,1,0);
VAR11:=IF(YEAR=1997 AND MONTH=5 AND DAY=12,1,0);
VAR12:=IF(YEAR=1996 AND MONTH=12 AND DAY=11,1,0);
VAR13:=IF(YEAR=1994 AND MONTH=9 AND DAY=13,1,0);
VAR14:=IF(YEAR=1993 AND MONTH=2 AND DAY=16,1,0);
VAR15:=IF(YEAR=1992 AND MONTH=5 AND DAY=26,1,0);
VAR16:=IF(YEAR=2003 AND MONTH=3 AND DAY=4,1,0);
VAR17:=IF(YEAR=2003 AND MONTH=4 AND DAY=16,1,0);
VAR18:=(CROSS(100,"KDJ.J"(9,3,3)) OR CROSS("KDJ.K"(9,3,3),"KDJ.J"(9,3,3))) AND "KDJ.D"(9,3,3)>75;
VAR19:=IF(YEAR>1990 AND YEAR<2003,0,1);
VAR1A:=IF(YEAR=2003 AND MONTH=1 AND DAY=3,1,0);
VAR1B:=IF(YEAR=2002 AND MONTH=6 AND DAY=6,1,0);
VAR1C:=IF(YEAR=2002 AND MONTH=1 AND DAY=29,1,0);
VAR1D:=IF(YEAR=2001 AND MONTH=10 AND DAY=22,1,0);
VAR1E:=IF(YEAR=2001 AND MONTH=2 AND DAY=22,1,0);
VAR1F:=IF(YEAR=2000 AND MONTH=9 AND DAY=26,1,0);
VAR20:=IF(YEAR=1999 AND MONTH=12 AND DAY=28,1,0);
VAR21:=IF(YEAR=1999 AND MONTH=5 AND DAY=17,1,0);
VAR22:=IF(YEAR=1999 AND MONTH=2 AND DAY=9,1,0);
VAR23:=IF(YEAR=1998 AND MONTH=8 AND DAY=18,1,0);
VAR24:=IF(YEAR=1998 AND MONTH=3 AND DAY=26,1,0);
VAR25:=IF(YEAR=1997 AND MONTH=2 AND DAY=20,1,0);
VAR26:=IF(YEAR=1994 AND MONTH=7 AND DAY=29,1,0);
VAR27:=IF(YEAR=2000 AND MONTH=5 AND DAY=15,1,0);
VAR28:=IF(YEAR=1996 AND MONTH=1 AND DAY=19,1,0);
VAR29:=IF(YEAR=1992 AND MONTH=11 AND DAY=20,1,0);
VAR2A:=IF(YEAR=2003 AND MONTH=3 AND DAY=26,1,0);
VAR2B:=IF(YEAR=2003 AND MONTH=5 AND DAY=13 AND CLOSE>200,1,0);
VAR2C:=MA(3*SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1)-2*SMA(SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1),3,1),5)*VAR19;
VAR2D:=5;
VAR2E:=CROSS(VAR2C,VAR2D);
VAR2F:=VAR1A OR VAR1B OR VAR1C OR VAR1D OR VAR1E OR VAR1F OR VAR20 OR VAR21 OR VAR22 OR VAR23 OR VAR24 OR VAR25 OR VAR26 OR VAR27 OR VAR28 OR VAR29 OR VAR2A OR VAR2B OR VAR2E;
VAR30:=(VAR18 OR VAR5 OR VAR6 OR VAR7 OR VAR8 OR VAR9 OR VARA OR VARB OR VARC OR VARD OR VARE OR VARF OR VAR10 OR VAR11 OR VAR12 OR VAR13 OR VAR14 OR VAR15 OR VAR16 OR VAR17){ AND CLOSE>200};
DRAWICON(VAR2F,LOW-LOW*1/100,1);
DRAWICON(VAR2F AND CLOSE>江恩线,LOW,1);
DRAWICON(VAR30,HIGH,2);
DRAWTEXT(VAR2F AND CLOSE<江恩线,LOW,'秘密买点!'), COLORYELLOW;
DRAWTEXT(VAR2F AND CLOSE>江恩线,LOW,'强势买点!'), COLORRED;
DRAWTEXT(VAR30,HIGH+1,'秘密抛点'), COLOR00FF00;
AAA2:=SUM(IF( CLOSE>REF(CLOSE,1),VOL*C,0),0);
AAA3:=SUM(IF( CLOSE<REF(CLOSE,1),VOL*C,0),0);
AAA4:=SUM(IF( CLOSE=REF(CLOSE,1),VOL*C,0),0);
BB1:=0;
B1万元:=DVOL*DCLOSE/100;
B1差:=B1万元-REF(B1万元,1);
B2万元:=DVOL*DCLOSE/100;
B2比:=B2万元/REF(B2万元,1);
净流入万元:=(AAA2-AAA3-0.5*AAA4);
PM:=MA(净流入万元,1);
PMA:=PM/REF(PM,1)>1;
PMB:=REF(PMA,1)<1 AND PMA;
密码:(EMA(MA(B1万元,2),2))/100000,COLORYELLOW,NODRAW;
二日比:=密码/REF(密码,1);
选股:PMB AND 密码>REF(密码,1) AND 二日比>1,COLORRED,NODRAW;
DRAWNUMBER(选股=1 ,L,密码),COLORYELLOW;
DRAWICON(选股,L*0.975,1);
[url=http://www.70822.com/soft/sort013/sort05/down-43469.html]箱形顶底(副图,源码,主图)[/url]