注册 登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

潮河边人博客

http://jsl641124.blog.163.com/

 
 
 

日志

 
 
关于我

出生于黄海之滨潮河岸边响水县。历任县支行记账员、主任、科长,市分行个金、会计、管理信息处长和省寿险公司经理、总经理、省分行《内部决策参考》特邀撰稿人等职。喜好文字数字,曾多次参与省分行重点课题研究,重大项目推广和重要会议文件起草工作,发表学术文章四十余篇,省级以上获奖课题及项目十余个。

网易考拉推荐

大智慧主图 自编炒股公式(9则)  

2011-07-10 12:24:32|  分类: 股权融资 |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |
 
大智慧主图 自编炒股公式(9则) - 潮河边人 - 潮河边人博客

  input:n(5,1,999);
drawgbklast{背景}(close>0,strip(rgb(0,0,0),rgb(0,0,0),3));
C,colorred{红};
分水岭:MA(C,0),PRECIS2,COLORA9A9A9{亮银灰};
{----------------------------------------------------------------}
{以下为买入语句}
VAR1:=(CLOSE*2+HIGH+LOW)/4;
SK:= EMA(VAR1,13)-EMA(VAR1,73);
SD:= EMA(SK,2);
SJ:=(CROSS(SK,SD) AND SK<-0.04 AND (C-REF(C,1))/REF(C,1)>=0.03)OR(CROSS(SK,SD)
AND SK<=-0.14 )OR(CROSS(SK,SD) AND SK<=0.05 AND (V/MA(V,5)>2 OR C/REF(C,1)>0.035));
DRAWTEXT(SJ,L*0.99,'短'),COLORGREEN;
STICKLINE(SJ,H,L,0.5,0),COLORRED;
STICKLINE(SJ,O,C,5.5,0),LINETHICK1,coloryellow;
STICKLINE(SJ,O,C,4.5,0),LINETHICK1,coloryellow;
STICKLINE(SJ,O,C,3.5,0),LINETHICK1,coloryellow;
STICKLINE(SJ,O,C,2.5,0),LINETHICK1,coloryellow;
STICKLINE(SJ,O,C,1.5,0),LINETHICK1,coloryellow;
STICKLINE(SJ,O,C,0.5,0),LINETHICK1,coloryellow;


{----------------------------------------------------------------}
{以下为卖出语句}
MTM:=C-REF(C,1);
DX:=100*EMA(EMA(MTM,6),6)/EMA(EMA(ABS(MTM),6),6);
卖:=IF(HHV(DX,2)=HHV(DX,7) AND COUNT(DX>50,2) AND CROSS(MA(DX,2),DX),1,0);
DRAWTEXT(filter(卖=1,5),high*1.01,'▽'),coloryellow{黄色},ALIGN1;
{----------------------------------------------------------------}
{以下为均线语句}
{input:n(20),n1(7),n2(69)};{关闭参数}
M8: EMA(CLOSE,8),colorwhite{白色},LINETHICK1;
短线{M13}: EMA(M8,13),PRECIS1,LINETHICK1,coloryellow{黄色};
中线{M34}: EMA(M8,34),colorf00ff0{粉红};
黄金{M62}: EMA(M8,62),colorgreen{绿},LINETHICK1;
Var1:=EMA(短线,62);
生命{M81}: EMA(黄金,81),colorred{红},LINETHICK1;
M250: EMA(Var1,250),LINETHICK1,COLORA9A9A9{亮银灰};
{以下为强弱语句}
强弱:ema(cost(62),8),PRECIS2,COLORA9A9A9{亮银灰},DOTLINE,LINETHICK1;
大盘:=EMA(INDEXL,500)/EMA(L,500); 
盘低:INDEXL/大盘,PRECIS1,LINETHICK1,COLOR808860{灰绿};


{----------------------------------------------------------------}

{以下为盘口语句}
{GJ:=(C+H+L+O)/4;
明阻:=L+(GJ-L)+(C-L);
明支:=L+(C-GJ);
阻:REF(明阻 , 1),LINETHICK0,PRECIS2,colorred{红};
{支:REF(明支 , 1),LINETHICK0,PRECIS2,colorwhite{白色};
{STICKLINE(DISPSTATUS=2  AND C>=阻,阻*1.001,阻*0.999,15,0),colorf00ff0{粉红};
{STICKLINE(DISPSTATUS=2  AND C<阻,阻*1.001,阻*0.999,15,0),colorf00ff0{粉红};
{STICKLINE(DISPSTATUS=2  AND C>=支,支*1.001,支*0.999,15,0),colorblue{蓝色};
{STICKLINE(DISPSTATUS=2  AND C<支,支*1.001,支*0.999,15,0),colorblue{蓝色};
{----------------------------------------------------------------}

{四.以下为黄金分割线语句}
{lhnh:=BARSLAST(DISPSTATUS=1)+1;
nnl:=DISPSTATUS=2;
P:=BACKSET(nnl,hhvBARS(h,lhnh)+1);
B:=P>REF(P,1);
P2:=BACKSET(nnl,LLVBARS(L,lhnh)+1);
B2:=P2>REF(P2,1);
高:REF(H,BARSLAST(b)),PRECIS2,color000999,LINETHICK1;
DRAWTEXT(nnl,高,'高:'+高),ALIGN2,COLORA9A9A9;
低:REF(L,BARSLAST(B2)),PRECIS2,color009900,LINETHICK1;
DRAWTEXT(nnl,低*1.009,'低: '+低),ALIGN2,colorgreen;
F6:((高-低)*0.236)+低,PRECIS0,COLOR808080;
DRAWTEXT(BARSLAST(B)>BARSLAST(B2)and nnl,F6,'0.236:' +F6),ALIGN2,COLOR808080;
F2:((高-低)*0.382)+低,PRECIS0,COLOR808080;
DRAWTEXT(BARSLAST(B)>BARSLAST(B2) and nnl,F2,'0.382:'+F2),ALIGN2,COLOR808080;
F3:((高-低)*0.5)+低,PRECIS0,COLOR5F9EA0;
DRAWTEXT(nnl,F3,'0.5:'+F3),ALIGN2,COLOR808080;

 


大智慧主图 自编炒股公式(9则) - 潮河边人 - 潮河边人博客

{黄金三角-----M(21,1,100,1)-----------------------------------------}

drawgbklast(c>0,strip(rgb(80,95,110),rgb(0,0,0),3));
MA60:MA(CLOSE,60),colorgreen{绿};
{黄金线------------------------------------------------}
JDirection:=C-REF(C,34);
JXX:=ABS(C-REF(C,1));
JVolatility:=SUM(JXX,34);
ER:=Sum(ABS(JDirection/JVolatility),1)/1;
FastC:=2/(3+1);
SlowC:=2/(8+1);
SSC:=ER*(FastC-SlowC)+SlowC;
Constant:=SSC*SSC;
YY:=REF(C,1)+Constant*(C-REF(C,1));
AA:=IF(SUM(1,0)=34+1,YY,YY);
BB:=BarsLast(AA);
DD:=REF(C,BB);
CC:=C;
DD:=Ref(DD,1)+Constant*(CC-Ref(DD,1));
金线:DD,PRECIS1,LINETHICK2,coloryellow{黄};
partline(金线,dd>ref(dd,1)),PRECIS1,LINETHICK2,colorred{红};

{------------------------------------------------}
A1:=REF(HIGH,3)=HHV(HIGH,2*3+1); B1:=FILTER(A1,3); C1:=BACKSET(B1,3+1); D1:=FILTER(C1,3);{高点}
A2:=REF(LOW,3)=LLV(LOW,2*3+1); B2:=FILTER(A2,3); C2:=BACKSET(B2,3+1); D2:=FILTER(C2,3);{低点}
E1:=(REF(LLV(LOW,2*34),1)+REF(HHV(HIGH,2*34),1))/2; E2:=(HIGH+LOW)/2;{高低点出现在同一K线上时可作取舍}
H1:=(D1 AND NOT(D2 AND E1>=E2)) OR BARSTATUS=2 OR BARSCOUNT(CLOSE)=1;
H2:=D1 AND NOT(D2 AND E1>=E2);
L1:=D2 AND NOT(D1 AND E1=E2);
X1:=REF(BARSLAST(H1),1)+1; F1:=BACKSET(H1 AND COUNT(L1,X1)>0,LLVBARS(IF(L1,LOW,10000),X1));
G1:=F1>REF(F1,1); I1:=BACKSET(G1,2); LD:=I1>REF(I1,1);{过滤后低点}
L2:=LD OR BARSTATUS=2 OR BARSCOUNT(CLOSE)=1;
X2:=REF(BARSLAST(L2),1)+1; F2:=BACKSET(L2 AND COUNT(H2,X2)>0,HHVBARS(IF(H2,HIGH,0),X2));
G2:=F2>REF(F2,1); I2:=BACKSET(G2,2); HD:=I2>REF(I2,1);{过滤后高点}
{前短期上涨连线}DRAWLINE(LD,L,HD,H,0),colorwhite{白},LINETHICK1,POINTDOT;
{前短期下跌连线}DRAWLINE(HD,H,LD,L,0),colorwhite{白},LINETHICK1,POINTDOT;
J1:=BACKSET(BARSTATUS=2,MIN(BARSLAST(HD),BARSLAST(LD))+1); J2:=J1>REF(J1,1);
{白趋势线,连在上涨最高价,下跌最低价上}DRAWLINE(J2,IF(HD,H,L),BARSTATUS=2,IF(BARSLAST(HD)>BARSLAST(LD),H,L),0),colorwhite{白},LINETHICK1,POINTDOT;
A3:=H; B3:=REF(H,REF(BARSLAST(HD),1)+1)>REF(H,REF(BARSLAST(HD),1)+2+REF(BARSLAST(HD),REF(BARSLAST(HD),1)+2));
D3:=A3 AND B3 AND HD; E3:=BACKSET(D3,REF(BARSLAST(HD),1)+2); HH:=E3>REF(E3,1);{找出全部长期高点}
A4:=L>REF(L,REF(BARSLAST(LD),1)+1);
B4:=REF(L,REF(BARSLAST(LD),1)+1); D4:=A4 AND B4 AND LD; E4:=BACKSET(D4,REF(BARSLAST(LD),1)+2); LL:=E4>REF(E4,1);{找出全部长期低点}
DRAWICON(HH,H,5{感叹}),ALIGN1;DRAWICON(LL,L,4{黄拐点}),ALIGN1;


{短期支撑压力线---------------------------------------------------}
UU:=BACKSET(BARSTATUS=2,BARSLAST(LD)+1);
VV:=UU>REF(UU,1);
WW:=BACKSET(VV,REF(BARSLAST(LD),1)+2);
XX:=WW>REF(WW,1);
{粉红低点连线}DRAWLINE(XX,L,VV,L,1),colorf00ff0{粉红},LINETHICK1;
UU2:=BACKSET(BARSTATUS=2,BARSLAST(HD)+1);
VV2:=UU2>REF(UU2,1);
WW2:=BACKSET(VV2,REF(BARSLAST(HD),1)+2);
XX2:=WW2>REF(WW2,1);
{粉红高点连线}DRAWLINE(XX2,H,VV2,H,1),colorf00ff0{粉红},LINETHICK1;

{三角形语句-------------------------------------------------}
底:REF(L,BARSLAST(VV)),PRECIS2,LINETHICK1,colorred{红};
顶:REF(H,BARSLAST(VV2)),PRECIS2,LINETHICK1,coloryellow{黄};
{下迭三角形:蓝色三角形画完介入}
{沟}StickLine(VV,顶,底,0,0),colorff9933{淡蓝},linethick2;{竖}
{弦}DRAWLINE(VV2,H,VV,L,0),colorff9933{淡蓝},linethick2;{斜}
{股}DRAWLINE(VV2,H,VV,顶,0),colorff9933{淡蓝},linethick2;{横}
{上涨三角形:红色三角形画完出局};
{沟}StickLine(VV2 ,顶,底,0,0),colorred{红},linethick2;{竖红柱};
{弦}DRAWLINE(VV,L,VV2,H,0),colorred{红},linethick2;{斜}
{股}DRAWLINE(VV,L,VV2,底,0),colorred{红},linethick2;{横}

{-------------------------------------------------    };
最低价:L,PRECIS2,LINETHICK1,colorred{红};
最高价:H,PRECIS2,LINETHICK1,colorred{红};
抄底值:(最低价-底)/底*10,PRECIS1,LINETHICK0,colorred{红};
突破顶:(最高价-顶)/顶*10,PRECIS1,LINETHICK0,colorgreen{绿};


 

大智慧主图 自编炒股公式(9则) - 潮河边人 - 潮河边人博客

{黄金线-----M(21,1,100,100)-----------------------------------------}

input:N(34,5,1000),P(3,1,10),Q(8,1,60);
{input:N(20,5,1000),P(2,1,10),Q(8,1,60);}
MA4:MA(CLOSE,60),colorgreen{绿};
低价:L,colorred{红};
{高价:H,colorred{红};

分水岭:MA(L,0),PRECIS2,COLORA9A9A9{亮银灰};
大盘:=EMA(INDEXL,500)/EMA(L,500); 
盘低:INDEXL/大盘,PRECIS1,LINETHICK1,COLOR808860{灰绿};

drawgbklast(c>0,strip(rgb(80,95,110),rgb(0,0,0),3));

Direction:=C-REF(C,N);
XX:=ABS(C-REF(C,1));
Volatility:=SUM(XX,N);
ER:=Sum(ABS(Direction/Volatility),1)/1;
FastC:=2/(p+1);
SlowC:=2/(q+1);
SSC:=ER*(FastC-SlowC)+SlowC;
Constant:=SSC*SSC;
YY:=REF(C,1)+Constant*(C-REF(C,1));
AA:=IF(SUM(1,0)=N+1,YY,YY);
BB:=BarsLast(AA);
DD:=REF(C,BB);
CC:=C;
DD:=Ref(DD,1)+Constant*(CC-Ref(DD,1));
黄金线:DD,coloryellow{黄},LINETHICK2;
partline(黄金线,dd>ref(dd,1)),colorred{红},LINETHICK2;


{划线语句}
{高点}a1:=ref(h,5)=hhv(h,2*M+1);b1:=filter(a1,5);c1:=backset(b1,5+1);d1:=filter(c1,5);
{低点}a2:=ref(l,5)=llv(l,2*5+1);b2:=filter(a2,5);c2:=backset(b2,5+1);d2:=filter(c2,5);
{高低点出现在同一k线上时可作取舍}e1:=(ref(llv(l,2*M),1)+ref(hhv(h,2*M),1))/2; e2:=(h+l)/2;
h1:=(d1 and not(d2 and e1>=e2)) or barstatus=2 or barscount(c)=1;
l1:=(d2 and not(d1 and e1<e2));  h2:=d1 and not(d2 and e1>=e2);
x1:=ref(barslast(h1),1)+1; f1:=backset(h1 and count(l1,x1)>0,llvbars
(if(l1,l,10000),x1));
{过滤后低点}g1:=f1>ref(f1,1); i1:=backset(g1,2); ld:=i1>ref(i1,1);
l2:=ld or barstatus=2 or barscount(c)=1;
x2:=ref(barslast(l2),1)+1; f2:=backset(l2 and count(h2,x2)>0,hhvbars
(if(h2,h,0),x2));
{过滤后高点}g2:=f2>ref(f2,1); i2:=backset(g2,2); hd:=i2>ref(i2,1);
{前一高}r1:=backset(barstatus=2,barslast(hd)+1); s1:=r1>ref(r1,1);
{前一低}t1:=backset(barstatus=2,barslast(ld)+1); u1:=t1>ref(t1,1);
{前二高}r2:=backset(s1,ref(barslast(hd),1)+2); s2:=r2>ref(r2,1);
{前二低}t2:=backset(u1,ref(barslast(ld),1)+2); u2:=t2>ref(t2,1);
{前三低}t3:=backset(u2,ref(barslast(ld),1)+2); u3:=t3>ref(t3,1);
{前四低}t4:=backset(u3,ref(barslast(ld),1)+2); u4:=t4>ref(t4,1);
{前三高}r3:=backset(s2,ref(barslast(hd),1)+2); s3:=r3>ref(r3,1);
{前四高}r4:=backset(s3,ref(barslast(hd),1)+2); s4:=r4>ref(r4,1);

短压:drawline(s2,h,s1,h,1),COLORFFEEBB{银白};
中压:drawline(s3,h,s2,h,1),colorff9933{淡蓝};
长压:drawline(s4,h,s3,h,1),color000999{深红};

短撑:drawline(u2,l,u1,l,1),COLORFFEEBB{银白};
中撑:drawline(u3,l,u2,l,1),colorff9933{淡蓝}; 
长撑:drawline(u4,l,u3,l,1),color000999{深红};

 

{-------------------------------------------------------------------}
{买卖符号语句}
drawicon(s1,h*1.01,6);
drawicon(s2,h*1.01,6);
drawicon(s3,h*1.01,6);
drawicon(s4,h*1.01,6);
drawicon(u1,l*0.999,4{黄拐点});
drawicon(u2,l*0.999,4);
drawicon(u3,l*0.999,4);
drawicon(u4,l*0.999,4);
DRAWTEXTABS(5,30,'板块:'+BKNAME),Colora9a9a9;
 

大智慧主图 自编炒股公式(9则) - 潮河边人 - 潮河边人博客

 {神奇K线-----N(7,1,100,1)-----------------------------------------}

drawgbklast(c>0,strip(rgb(80,95,110),rgb(0,0,0),3));
大盘:=EMA(INDEXC,500)/EMA(c,500); 
大盘:INDEXC/大盘,PRECIS1,LINETHICK1,COLORFFEEBB{银白};

MA1:MA(CLOSE,5);
MA2:MA(CLOSE,10);
MA3:MA(CLOSE,20);
MA4:MA(CLOSE,30);
MA5:MA(CLOSE,60);
MA6:MA(CLOSE,120);
MA7:MA(CLOSE,250);
{DRAWTEXT(SYSPARAM(2)=BARSCOUNT(CLOSE),C,'所属板块:'+BLKNAME),COLOR33CC33;}
D1:=REF(H,N);
D2:=D1=HHV(H,2*N+1);
D3:=FILTER(D2,N);
D4:=BACKSET(D3,N+1);
HD:=FILTER(D4,N);

D5:=REF(L,N);
D6:=D5=LLV(L,2*N+1);
D7:=FILTER(D6,N);
D8:=BACKSET(D7,N+1);
LD:=FILTER(D8,N);

D:=BACKSET(0,BARSLAST(HD)+1);
E:=D>REF(D,1);
F:=BACKSET(E,REF(BARSLAST(HD),1)+2);
G:=F>REF(F,1);
DRAWLINE(G,H,E,H,1),POINTDOT,LINETHICK1,COLORYELLOW;

I:=BACKSET(0,BARSLAST(LD)+1);
J:=I>REF(I,1);
K:=BACKSET(J,REF(BARSLAST(LD),1)+2);
M:=K>REF(K,1);
DRAWLINE(M,L,J,L,1),POINTDOT,LINETHICK1,COLORFFB97A;

{求压力线方程}
M1:=BARSLAST(E);
M2:=BARSLAST(G);
M3:=REF(H,M1);
M4:=REF(H,M2);
M5:=M4-M2*(M4-M3)/(M2-M1);
DRAWICON(REF(C,1)<=REF(M5,1) AND C>M5,M5,4);
{求阻力线方程}
N1:=BARSLAST(J);
N2:=BARSLAST(M);
N3:=REF(L,N1);
N4:=REF(L,N2);
N5:=N4-N2*(N4-N3)/(N2-N1);
DRAWICON(REF(C,1)>=REF(N5,1) AND C<N5,N5,5);

买点:IF(REF(C,1)<=REF(M5,1) AND C>M5,1,0), LINETHICK1 ;
卖点:IF(REF(C,1)>=REF(N5,1) AND C<N5,1,0), LINETHICK1 ;

DRAWTEXT(TROUGHBARS(3,15,1)<4,LOW,'----→底') , COLORRED,LINETHICK1;
DRAWTEXT(CROSS(REF(ZIG(3,10),1),ZIG(3,10)),HIGH*1.001,'---→顶') , COLORGREEN,LINETHICK1;

DRAWICON(CROSS(ZIG(3,10) ,REF(ZIG(3 ,10),1)) ,LOW*0.99,4);

 

大智慧主图 自编炒股公式(9则) - 潮河边人 - 潮河边人博客

  {三线开花 趋势王-----------------------------------------}

 input:n(10,1,100),step(2,1,100),maxp(20,5,100);
drawgbklast(c>0,strip(rgb(80,95,110),rgb(0,0,0),3));bb:=ref(date,BARSCOUNT(c)-1);

SS:=if(bb>1000000,bb+1000000,bb);
STICKLINE(C>O OR (C=O AND C>REF(C,1)),H,L,0.1,0),COLORRED;
STICKLINE(C>O OR (C=O AND C>REF(C,1)),O,C,8,1),COLORRED;
STICKLINE(C<O OR (C=O AND C<=REF(C,1)),H,L,0.1,0),colorffff00;
STICKLINE(C<O OR (C=O AND C<=REF(C,1)),O,C,8,0),colorffff00;
线一:(MA(CLOSE,5)+MA(CLOSE,10)+MA(CLOSE,25))/3,color00FF00;
线二:(MA(CLOSE,5)+MA(CLOSE,10)+MA(CLOSE,20)+MA(CLOSE,30)+MA(CLOSE,60)+MA(CLOSE,120))/6,color00FF00;
线三:(MA(CLOSE,20)+MA(CLOSE,60)+MA(CLOSE,120))/3,color00FF00,linethick2;
线四:=(MA(CLOSE,13)+MA(CLOSE,34)+MA(CLOSE,55))/3;
Stickline(线一>线四,线一,线四,0.1,1),COLORf00ff0;
Stickline(线一<线四,线一,线四,0.1,1),color00FF00;
DRAWICON(CROSS(线一,线四),线一*0.98,4);
POLYLINE(线一>线二,线三),COLORRED,linethick2;
POLYLINE(线一>线二,线一),COLORRED;
POLYLINE(线二>线三,线二),COLORRED;

 

大智慧主图 自编炒股公式(9则) - 潮河边人 - 潮河边人博客

 {粘与发-----N(3,1,100,1)待改-----------------------------------------}

drawgbklast(c>0,strip(rgb(95,95,95),rgb(0,0,0),3));

C,COLORCYAN{水晶};

成本8:MA(MA(CYC(8),1),8),coloryellow{黄},LINETHICK1;
{partline(成本8,成本8>ref(成本8,1)),LINETHICK2,colorred{红};

成本60:MA(CYC(60),60), colorff9933{淡蓝},LINETHICK1;
界60:EMA(CLOSE,60),colorwhite{白},LINETHICK2;
partline(界60,界60>ref(界60,1)),colorred{红},LINETHICK2;
强撑:FORCAST(LLV(FORCAST(LOW,10),30),2),COLORA9A9A9{亮银灰},DOTLINE;
重阻:FORCAST(HHV(l,120),2),colorgray{银灰2},DOTLINE;


阻力1:FORCAST(HHV(l,6),2), COLOR808860{灰绿},LINETHICK0;
阻力2:FORCAST(HHV(l,26),2), COLOR808860{灰绿},LINETHICK0;
阻力3:FORCAST(HHV(l,44),2), COLOR808860{灰绿},LINETHICK0;
阻力4:FORCAST(HHV(l,67),2), COLOR808860{灰绿},LINETHICK0;
阻力5:FORCAST(HHV(l,87),2), COLOR808860{灰绿},LINETHICK0;
支撑:ma(FORCAST(llV(l,20),2),2),COLOR808860{灰绿},LINETHICK0;

{K线}
{STICKLINE(O>=C,H,L,0,0),colorf0f000{淡蓝};
{STICKLINE(O>=C,C,O,8,0),colorf0f000{淡蓝};
{STICKLINE(C>=O,L,H,0,0),COLORRED;
STICKLINE(C>=O,C,O,8,1),COLORRED;}

{Y:=CROSS(成本5,界60);
DRAWTEXT(Y>=1,LOW-0.02,'牛'),COLOR00FFFF,LINETHICK1;
Y1:=CROSS(成本5,阻力1);
DRAWTEXT(Y1>=1,LOW-0.02,'飙'),COLORFFFFCC,LINETHICK1;
Y2:=成本5=阻力1 AND 成本5=阻力1 AND  成本5=阻力2;
DRAWTEXT(Y2,LOW-0.03,'◆'),COLOR66FFFF,LINETHICK2;}

内外差:=dynainfo(23)-dynainfo(22);
DRAWTEXTABS(5,5,'内外差:'+内外差+' '),LINETHICK1,Color00FF00;
DRAWTEXTABS(5,20,'板块:'+BKNAME),Colora9a9a9;

{以下为划线语句---------------------------------------------------------------}
a1:=ref(h,5)=hhv(h,2*n+1);
b1:=filter(a1,5);
c1:=backset(b1,5+1);
d1:=filter(c1,5);{高点}
a2:=ref(l,5)=llv(l,2*5+1);
b2:=filter(a2,5);
c2:=backset(b2,5+1);
d2:=filter(c2,5);{低点}
e1:=(ref(llv(l,2*n),1)+ref(hhv(h,2*n),1))/2; e2:=(h+l)/2;{高低点出现在同一k线上时可作取舍}
h1:=(d1 and not(d2 and e1>=e2)) or barstatus=2 or barscount(c)=1;
l1:=(d2 and not(d1 and e1<e2));  h2:=d1 and not(d2 and e1>=e2);
x1:=ref(barslast(h1),1)+1; f1:=backset(h1 and count(l1,x1)>0,llvbars
(if(l1,l,10000),x1));
g1:=f1>ref(f1,1); i1:=backset(g1,2); ld:=i1>ref(i1,1);{过滤后低点}
l2:=ld or barstatus=2 or barscount(c)=1;
x2:=ref(barslast(l2),1)+1; f2:=backset(l2 and count(h2,x2)>0,hhvbars
(if(h2,h,0),x2));
g2:=f2>ref(f2,1); i2:=backset(g2,2); hd:=i2>ref(i2,1);{过滤后高点}
r1:=backset(barstatus=2,barslast(hd)+1); s1:=r1>ref(r1,1); {前一高}
t1:=backset(barstatus=2,barslast(ld)+1); u1:=t1>ref(t1,1); {前一低}
r2:=backset(s1,ref(barslast(hd),1)+2); s2:=r2>ref(r2,1); {前二高}
t2:=backset(u1,ref(barslast(ld),1)+2); u2:=t2>ref(t2,1); {前二低}
t3:=backset(u2,ref(barslast(ld),1)+2); u3:=t3>ref(t3,1); {前三低}
t4:=backset(u3,ref(barslast(ld),1)+2); u4:=t4>ref(t4,1); {前四低}
r3:=backset(s2,ref(barslast(hd),1)+2); s3:=r3>ref(r3,1); {前三高}
r4:=backset(s3,ref(barslast(hd),1)+2); s4:=r4>ref(r4,1); {前四高}

{短压}drawline(s2,h,s1,h,1),colorf00ff0{粉红},POINTDOT,LINETHICK1;
{短撑}drawline(u2,l,u1,l,1),colorf00ff0{粉红},DOTLINE,LINETHICK1;
{中压}drawline(s3,h,s2,h,1),COLOR808860{灰绿};
{长压}drawline(s4,h,s3,h,1),color000999{深红};
{中撑}drawline(u3,l,u2,l,0),COLOR808860{灰绿};  
{长撑}drawline(u4,l,u3,l,0),color000999{深红};

drawicon(s1,h*1.01,6{菱形黄感叹号});
 

大智慧主图 自编炒股公式(9则) - 潮河边人 - 潮河边人博客

  {顾比-----------------------------------------}

input:n(5,1,999);
drawgbklast{背景}(close>0,strip(rgb(0,0,95),rgb(0,0,0),0));
分水岭:MA(C,0),PRECIS2,COLORA9A9A9{亮银灰};

M8: EMA(CLOSE,8),colorwhite{白色},LINETHICK0;
短线{M13}: EMA(M8,13),PRECIS1,LINETHICK0,coloryellow{黄色};
中线{M34}: EMA(M8,34),colorf00ff0{粉红},LINETHICK0;
黄金{M62}: EMA(M8,62),colorgreen{绿},LINETHICK0;
Var1:=EMA(短线,62);
生命{M81}: EMA(黄金,81),colorred{红},LINETHICK0;
M250: EMA(Var1,250),LINETHICK1,colorred{红};

{一、以下为日线语句}
{收价:C,COLORCYAN{水晶} ;
{C,COLORCYAN{水晶};


MA3:EMA(CLOSE,3),COLOR808860;
MA5:EMA(CLOSE,5),COLOR808860;
MA8:EMA(CLOSE,8),COLOR808860;
MA10:EMA(CLOSE,10),COLOR808860;
MA12:EMA(CLOSE,12),COLOR808860;
MA15:EMA(CLOSE,15),coloryellow{黄色};
MA30:EMA(CLOSE,30),colorred{红};
MA35:EMA(CLOSE,35),COLOR808080;
MA40:EMA(CLOSE,40),COLOR808080;
MA45:EMA(CLOSE,45),COLOR808080;
MA50:EMA(CLOSE,50),COLOR808080;
MA60:EMA(CLOSE,60),COLOR808080;
MA600:MA(CLOSE,60),colorgreen{绿};

 

drawgbklast(close>0,strip(rgb(95,95,95),rgb(0,0,0),0));
a1:=ref(h,n)=hhv(h,2*n+1);
b1:=filter(a1,n);
c1:=backset(b1,n+1);
d1:=filter(c1,n);{高点}
a2:=ref(l,n)=llv(l,2*n+1);
b2:=filter(a2,n);
c2:=backset(b2,n+1);
d2:=filter(c2,n);{低点}
e1:=(ref(llv(l,2*n),1)+ref(hhv(h,2*n),1))/2; e2:=(h+l)/2;{高低点出现在同一k线上时可作取舍}
h1:=(d1 and not(d2 and e1>=e2)) or barstatus=2 or barscount(c)=1;
l1:=(d2 and not(d1 and e1<e2));  h2:=d1 and not(d2 and e1>=e2);
x1:=ref(barslast(h1),1)+1; f1:=backset(h1 and count(l1,x1)>0,llvbars
(if(l1,l,10000),x1));
g1:=f1>ref(f1,1); i1:=backset(g1,2); ld:=i1>ref(i1,1);{过滤后低点}
l2:=ld or barstatus=2 or barscount(c)=1;
x2:=ref(barslast(l2),1)+1; f2:=backset(l2 and count(h2,x2)>0,hhvbars
(if(h2,h,0),x2));
g2:=f2>ref(f2,1); i2:=backset(g2,2); hd:=i2>ref(i2,1);{过滤后高点}
r1:=backset(barstatus=2,barslast(hd)+1); s1:=r1>ref(r1,1); {前一高}
t1:=backset(barstatus=2,barslast(ld)+1); u1:=t1>ref(t1,1); {前一低}
r2:=backset(s1,ref(barslast(hd),1)+2); s2:=r2>ref(r2,1); {前二高}
t2:=backset(u1,ref(barslast(ld),1)+2); u2:=t2>ref(t2,1); {前二低}
t3:=backset(u2,ref(barslast(ld),1)+2); u3:=t3>ref(t3,1); {前三低}
t4:=backset(u3,ref(barslast(ld),1)+2); u4:=t4>ref(t4,1); {前四低}
r3:=backset(s2,ref(barslast(hd),1)+2); s3:=r3>ref(r3,1); {前三高}
r4:=backset(s3,ref(barslast(hd),1)+2); s4:=r4>ref(r4,1); {前四高}

短期压力:drawline(s2,h,s1,h,1),COLOR808860{灰绿};
中期压力:drawline(s3,h,s2,h,1),colorgray{银灰2};
长期压力:drawline(s4,h,s3,h,1),colorgray{银灰2};

短期支撑:drawline(u2,l,u1,l,1),color000999{深红};
中期支撑:drawline(u3,l,u2,l,0),color000999{深红};  
长期支撑:drawline(u4,l,u3,l,0),color000999{深红};


drawicon(s1,h*1.01,6{红灯笼});
drawicon(s2,h*1.01,6);
drawicon(s3,h*1.01,6);
drawicon(s4,h*1.01,6);
 

大智慧主图 自编炒股公式(9则) - 潮河边人 - 潮河边人博客

 {分时叠加-----------------------------------------}

gqc:=DYNAINFO(3);
gh:=DYNAINFO(5);
gL:=DYNAINFO(6);
当前波幅:=max(gh-gqc,gqc-gL);
gf:=当前波幅/gqc;
最低位置:=gqc-当前波幅;
{叠加股票}
gp:='sh000001';{修改此处可叠加任意股票或指数}
昨收:=hhv(STKINDI(gp,'分时引用.昨收#day'),0);
最高:=hhv(STKINDI(gp,'分时引用.最高#day'),0);
最低:=HHv(STKINDI(gp,'分时引用.最低#day'),0);
开盘:=HHv(STKINDI(gp,'分时引用.开盘#day'),0);
收盘:=if(time>093000,STKINDI(gp,'分时引用.收盘#min1'),开盘);
成交额:=if(time>093000,STKINDI(gp,'分时引用.成交额#min1'),0);
波幅:=max(最高-昨收,昨收-最低);
ZF:=波幅/昨收;
bl:=GF/ZF;
叠加指数:=(收盘/昨收-1)*bl*gqc+gqc;
POLYLINE(C,叠加指数),colorblue{蓝};
涨跌%:(收盘/昨收-1)*100,LINETHICK0,colorblue{蓝},PRECIS2;
DRAWTEXTABS( 200,3,'叠加:'+gp),LINETHICK1,colorblue{蓝};
指数成交额:=成交额/hhv(成交额,0)*当前波幅+最低位置;
STICKLINE(收盘>=ref(收盘,1),最低位置,指数成交额,0.1,1),COLORRED;
STICKLINE(收盘<ref(收盘,1),最低位置,指数成交额,0.1,1),COLORCYAN{水晶};
STICKLINE(c,最低位置,最低位置,10,1),COLORCYAN{水晶};
{--------------}
{资金方向}
大单金额:"分时收盘.主力资金",linethick0,colorred;
zjc:=大单金额;
zjcbf:=max(hhvall(zjc),0-llvall(zjc));
p1:=zjc*gf/zjcbf;
zjcx:=(p1+1)*gqc;
zjcx1:=ma(zjcx,3);
zjcx2:=ref(zjcx1,1);
{polyline(1,zjcx),ColorFF00FF,linethick2;
stickline(zjcx1>=zjcx2,zjcx2,zjcx1,8,0),Colorred;
stickline(zjcx1<zjcx2,zjcx2,zjcx1,8,0),Colorgreen;}
partline(zjcx1,zjcx1>=zjcx2,rgb(255,0,0),zjcx1<zjcx2,rgb(0,255,0)),linethick2;
{多空实力}
逐笔金额:"分时收盘.逐笔资金",linethick0,ColorFF00FF;
dkc:=逐笔金额;
dkcbf:=max(hhvall(dkc),0-llvall(dkc));
p1:=(dkc)*gf/dkcbf;
dkcx:=(p1+1)*gqc;
dkcx1:=ma(dkcx,3);
dkcx2:=ref(dkcx1,1);
polyline(1,dkcx),ColorFF00FF,linethick2;
{stickline(dkcx1>=dkcx2,dkcx2,dkcx1,8,0),ColorF821DC;
stickline(dkcx1<dkcx2,dkcx2,dkcx1,8,0),color2CC3F4;
partline(dkcx1,dkcx1>=dkcx2,rgb(248,20,213),dkcx1<dkcx2,rgb(246,249,143)),linethick1;};
 

大智慧主图 自编炒股公式(9则) - 潮河边人 - 潮河边人博客

 {TRT - 顺势交易}
variable:p1=0;

MA1:MA(CLOSE,5);
MA2:MA(CLOSE,10);
MA3:MA(CLOSE,20);
MA4:MA(CLOSE,30);
MA5:MA(CLOSE,60);
MA6:MA(CLOSE,120);
分水岭:MA(C,0),PRECIS2,COLORA9A9A9{亮银灰};
大盘:=EMA(INDEXC,500)/EMA(L,500); 
盘低:INDEXC/大盘,PRECIS1,LINETHICK1,COLOR808860{灰绿};

c1:=INTPART(cyc(5)*100*0.96)/100;
p2:=intpart(ref(cyc(5),1)*100)/100;
p3:=intpart(ref(cyc(5),1)*0.96*100)/100;
vv:=intpart(min(capital*0.05,ref(ma(vol,34),1))/100);
p40:=intpart(maxcyc*100)/100;
p41:=intpart(ref(MAXCYC,1)*100)/100;
p4:=p1=0 and c>p2 or (ref(vol/100,1)<vv and c>intpart(p2*0.98*100)/100 and vol>min(capital*0.05,ref(ma(vol,34),1)));
p5:=p1=1 and c<min(p3,p41);
p1:=if(p4=1,1,if(p5=1,0,ref(p1,1)));
STICKLINE(p1=1 and c<o,c,o,8,1),color5454ff,layer0;
STICKLINE(p1=1 and c<o,c,o,6,0),colorffff54;
STICKLINE(p1=1 and c<o,c,l,0.5,0),color5454ff;
STICKLINE(p1=1 and c<o,h,o,0.5,0),color5454ff;
STICKLINE(p1=0 and c>o,c,o,8,1),colorffff54;
STICKLINE(p1=0 and c>o,c,h,0.5,0),colorffff54;
STICKLINE(p1=0 and c>o,l,o,0.5,0),colorffff54;
DRAWTEXT(cross(p1,0),l*0.9,'B'),coloryellow,LINETHICK3;
DRAWTEXT(cross(1,p1),h*1.05,'S'),COLORgreen,LINETHICK3;
DRAWFLAGTEXT(p1=0 and (p2*0.98-c)/c>0.1,c,'持币');
DRAWFLAGTEXT(p1=0 and (p2*0.98-c)/c<=0.1 and ref(vol/100,1)<vv,c,'明日收盘价超过'+str(p2)+';或收盘价超过'+str(intpart(p2*0.98*100)/100)+'且成交量大于'+str(vv)+'买入');
DRAWFLAGTEXT(p1=0 and (p2*0.98-c)/c<=0.1 and ref(vol/100,1)>=vv,c,'明日收盘价超过'+str(p2)+'买入');
DRAWFLAGTEXT(p1=1 and (c-min(c1,p40))/min(c1,p40)>0.1 ,c,'持股');
DRAWFLAGTEXT(p1=1 and (c-min(c1,p40))/min(c1,p40)<=0.1 ,c,'明日收盘价跌破'+str(min(c1,p40))+'卖出');;

  评论这张
 
阅读(1775)| 评论(2)
推荐 转载

历史上的今天

在LOFTER的更多文章

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2017