您现在的位置: 南方财富网 >> 股票知识 >> 炒股专题 >> 股票公式 >> 正文
南方财富搜索

股票公式CPW全部源码

2009-4-26 16:39:47   来源:不详   佚名

    
   风险栅栏的原码(采用龙帝兄弟的原码)

a:="1a0001$close";//D
b:=WMA(A,20);//DMIY
b1:=MA(b,3);
b2:=MA(b,5);
b3:=MA(b,21);
b4:=MA(b,34);//下面也可简化,懒了
x:=REF(CLOSE,1)<REF(CLOSE,2) and REF(VOL,1)>MAX(REF(MA(VOL,5),1),MAX(REF(MA(VOL,10),1),REF(MA(VOL,20),1))) and REF(VOL,1)>REF(MA(VOL,20),1)*1.1;
y:=IF(x,MIN(REF(LOW,1),LOW),0);
z1:REF(y,BARSLAST(x)),Linethick5,colorffef40;
x1:=REF(CLOSE,1)<REF(OPEN,1) and REF(VOL,1)>MAX(REF(MA(VOL,5),1),MAX(REF(MA(VOL,10),1),REF(MA(VOL,20),1))) and REF(AMOUNT,1)=REF(HHV(AMOUNT,20),1) or REF(CLOSE,1)<REF(OPEN,1) and REF(AMOUNT,1)=REF(HHV(AMOUNT,20),1);
y1:=IF(x1,REF(CLOSE,1),0);
z2:REF(y1,BARSLAST(x1)),COLORred,Linethick5,colorffff;
STICKLINE(CLOSE>0 and (MAX(z1,z2)-MIN(z1,z2))/MIN(z1,z2)*100<3 and MAX(B1,B2)>MIN(B3,B4),z1,z2,5,0),COLORred;


资金曲线原码(就是CPW的遍地黄金)
{n1=5,n2=13,n3=34,n4=250}
DRAWGBK(c>0 , COLORRgb(0,0,0), COLORRGB(0,0,0),1);
DRAWGBK(CLOSE>0, COLORRGB(1,8888,8888), COLORRGB(1,3333,6666),3);
Var1:=SMA("1a0002$AMOUNT"+"399107$AMOUNT",10,1)/1000000; 
Var2:=REF(Var1,1); 
Var3:=MA("1a0002$CLOSE"+"399107$CLOSE"*3,5); 
收盘:=Var1*("1a0002$CLOSE"+"399107$CLOSE"*3)/Var3*1/10,POINTDOT; 
开盘:=Var1*("1a0002$OPEN"+"399107$OPEN"*3)/Var3*1/10,POINTDOT,COLOR009900,LINETHICK0; 
最高:=Var1*("1a0002$HIGH"+"399107$HIGH"*3)/Var3*1/10,POINTDOT,COLOR009900,LINETHICK0; 
最低:=Var1*("1a0002$LOW"+"399107$LOW"*3)/Var3*1/10,POINTDOT,COLOR009900,LINETHICK0; 
昨收盘:=REF(收盘,1),POINTDOT,COLOR009900,LINETHICK0; 
涨跌:=(收盘-REF(收盘,1))/REF(收盘,1)*100,POINTDOT,COLOR009900,LINETHICK0; 
大盘生命线:=EMA(收盘,N1),; 
xx2:=EMA(收盘,N2),COLOR00FF00; 
xx3:=EMA(收盘,N3),COLORblue,linethick2; 
xx4:=EMA(收盘,N4),COLORred; 
温度计收盘-xx3)/xx3,linethick3;
1.15,colorred,linethick2;
0.88,coloryellow,linethick2;
0,colorgreen,linethick2;
-0.25,colorffef40,linethick2;
drawicon(cross(温度计,0),0,8);


双线止损:
Var1:=(CLOSE-MA(CLOSE,13))/MA(CLOSE,13)*(-100);
EMA(Var1/5+EMA(CLOSE,20),3),LINEDOT ,


个股6七彩魔柱

lc:=ref(c,1);
a1:=sma(max(c-lc,0),6,1)/sma(abs(c-lc),6,1)*100;
a2:=sma(max(c-lc,0),24,1)/sma(abs(c-lc),24,1)*100;
stickline(a1>=a2,0.5,0,8,0),colorff;
stickline(a1>=70 and a1>=a2 and a1<80,1,0,8,0),colorffff00;
stickline(a1>=70 and a1>=a2 and a1<80,0.7,0,8,0),colorff00;
stickline(a1>=70 and a1>=a2 and a1<80,0.5,0,8,0),colorffff;
stickline(a1>=70 and a1>=a2 and a1<80,0.3,0,8,0),color80;
stickline(a1>=70 and a1>=a2 and a1<80,0.1,0,8,0),colorff;
stickline(a1>=80 and a1>a2,1.5,0,8,0),colorff00ff;
stickline(a1>=80 and a1>a2,1.2,0,8,0),colorff0000;
stickline(a1>=80 and a1>a2,1,0,8,0),colorffff00;
stickline(a1>=80 and a1>a2,0.8,0,8,0),colorff00;
stickline(a1>=80 and a1>a2,0.6,0,8,0),colorffff;
stickline(a1>=80 and a1>a2,0.4,0,8,0),color80;
stickline(a1>=80 and a1>a2,0.2,0,8,0),colorff;
drawicon(a1>=70 and a1>a2 and v<ref(v,1) and c<ref(c,1)*1.03,0.8,1);
stickline(a1<a2,-0.5,0,8,0),colorffffff;


CPW的真假作空就是机构K线,而这个股票指标的设计思路就是指南针的CI股票指标.对高控盘票可以使用,对波段庄股不要使用.
c1:=10000*close/indexc;
h1:=10000*high/indexh;
l1:=10000*low/indexl;
o1:=10000*open/indexo;
STICKLINE(c1>=o1,c1,o1,6,0.2),COLORRED;
STICKLINE(c1>=o1,l1,h1,0.2,0.2),COLORRED;
STICKLINE(c1<o1,c1,o1,6,0.2),colorcyan;
STICKLINE(c1<o1,l1,h1,0.2,0.2),colorcyan;
MA1:MA(C1,5);
MA2:MA(C1,10);
MA3:MA(C1,20);
MA4:MA(C1,30); 


谁在作多:
VAR2:=SUM(IF(CLOSE>OPEN,VOL,0),34)/SUM(VOL,34)*100;
VAR3:=100-SUM(IF(CLOSE>OPEN,VOL,0),34)/SUM(VOL,34)*100;
散户跟风意愿: VAR3,LINETHICK4;
主力作盘意愿: VAR2,LINETHICK4;
标准: 60,LINETHICK2;


黄金通道:
上:HHV(H,20); 下:LLV(L,20),colorgreen;
GD1:=REF(H,HHVBARS(H,20))+REF(L,LLVBARS(L,20));
GD2:=REF(H,HHVBARS(H,20))-REF(L,LLVBARS(L,20));
中:GD1/2,COLORRED,LINETHICK1;
黄:REF(L,LLVBARS(L,20))+GD2*0.382,COLOR00FFFF,;
金:REF(L,LLVBARS(L,20))+GD2*0.618,COLORffef40,;


初级要塞的原码:
专用标:c,linethick0;
a:=ma(c,14)
a1:=a*1.1;
a4:=a*0.9;
a2:=a1-(a1-a4)*0.191;
a3:=a1-(a1-a4)*0.618;
a5:=a1-(a1-a4)*0.809;
初级要塞1:if(h*1.01>a2 or ref(h,1)>ref(a2,1),a1,a4),circledot,Linethick6,colorff;
初级要塞2:if(h*1.01>a2 or ref(h,1)>ref(a2,1),a2,a4),circledot,Linethick6,colorffffff;
初级要塞3:if(c>a3 and c<a2 or ref(c,1)>ref(a3,1) and ref(c,1)<ref(a2,1),a3,a4),crossdot,Linethick3,colorffff;
初级要塞4:if(c<a3 or ref(c,1)<ref(a3,1),a4,a4),Linethick8,colorff00;


个股2高级要塞

a1:"XT4.B1##month",colorffffff;
a2:"XT4.B2##month",colorffffff;
b1:"XT4.B3##month",colorffff00;
b2:"XT4.B4##month",colorffff00;
b3:="XT4.B5##month";
b:if(b3>max(a1,max(a2,max(b1,b2))),b3,b2),colorff;
fillrgn(a1>a2,a1,a2),colorff00ff;
fillrgn(a1<a2,a1,a2),colorffffff;
fillrgn(b1>b2,b1,b2),colorffff;
fillrgn(b1<b2,b1,b2),colorffff00;
fillrgn(b3>max(a1,max(a2,max(b1,b2))),b3,max(a1,max(a2,max(b1,b2)))),color808080;
stickline(c>=ref(c,1),c,o,8,0),colorff;
stickline(c>=ref(c,1),c,h,0,0),colorff;
stickline(c>=ref(c,1),c,l,0,0),colorff;
stickline(c<ref(c,1),c,o,8,0),colorff00;
stickline(c<ref(c,1),c,l,0,0),colorff00;
stickline(c<ref(c,1),c,h,0,0),colorff00;

文章来源:http://www.southmoney.com文章来源:南方财富 http://www.southmoney.com)
(责任编辑:张元缘)
    南方财富网声明:股市资讯来源于合作媒体及机构,属作者个人观点,仅供投资者参考,并不构成投资建议。投资者据此操作,风险自担。
商务进行时
每日必读
学院24小时排行
证券导读
热图推荐