编写公式时常用的语句
-
相关简介:一、提供以下常用语句,以方便朋友们编写公式时参考使用: 1)今收盘对于N日内最低收盘价的涨幅(%)(c-llv(c,n))/llv(c,n)*100; 2)今收盘价对于N日最高收盘价的跌幅(%)(HHV(C,N)-C)/HHV(C,N)*100; 3)股价在过去N日内运行空间的相对位置 (C-LLV(L,N))/(HHV(H,N)-LLV(L,N))*100; 4)股价上方N1%至N2%处的筹码(%) aa:=winner(c+c*n2/100)*100; bb:=winner(c+c*n1/1
-
文章来源:股海网作者:股海网发布时间:2013-09-12浏览次数:
一、提供以下常用语句,以方便朋友们编写公式时参考使用:
1)今收盘对于N日内最低收盘价的涨幅(%)(c-llv(c,n))/llv(c,n)*100;
2)今收盘价对于N日最高收盘价的跌幅(%)(HHV(C,N)-C)/HHV(C,N)*100;
3)股价在过去N日内运行空间的相对位置 (C-LLV(L,N))/(HHV(H,N)-LLV(L,N))*100;
4)股价上方N1%至N2%处的筹码(%)
aa:=winner(c+c*n2/100)*100;
bb:=winner(c+c*n1/100)*100;
aa-bb
5)股价下方N1%至N2%处的筹码(%)
(winner(c-c*n1/100)-winner(c-c*n2/100))*100;
6)收盘价N%处的套牢盘 100-(winner(c*N/100))*100;
7)收盘价N%处的获利盘 winner(c*N/100)*100;
8)下影线 (MIN(O,C)-L)/L*100;
9)上影线 (h-max(o,c))/max(o,c)*100;
10)本周期的涨跌幅 (c-ref(c,1))/ref(c,1)*100;
11)振幅 (h-l)/l*100;
12)均线金叉(M.N为均线周期) cross(ma(c,m),ma(c,n))
13)均线多头排列
a1:=ma(c,n1);
a2:=ma(c,n2);
a3:=ma(c,n3);
a4:=ma(c,n4);
count(a1>a2 and a2>a3 and a3>a4,3);
14) 均线空头排列
a1:=ma(c,n1);
a2:=ma(c,n2);
a3:=ma(c,n3);
a4:=ma(c,n4);
count(a1<a2 and a2<a3 and a3<a4,3);
15)N日均线向下
aa:=ma(c,n);
bb:=ref(aa,2);
aa<bb
16)向前N日至M日出现过均线死叉(P1<P2)
aa:=ma(c,p1);
bb:=ma(c,p2);
cc:=ref(cross(bb,aa),n);
count(cc,m);
17)今日成交量大于N日以来的均量 VOL>MA(VOL,N);
18)低位密集
A1:=COST(85);
A2:=COST(15);
A3:=A1-A2;
A4:=(A1+A2)/2;
A5:=A3/A4*100<10;
B1:=HHV(H,120);
B2:=LLV(L,120);
B3:=B1-B2;
B4:=(A4-B2)<B3/2;
A5 AND B4;
19)换手率 VOL/CAPITAL*100;
20)N日盈亏
V1:=VOL/SUM(VOL,N);
V2:=DMA(CLOSE,V1);
V3: (CLOSE-V2)/V2*100;
21)强势整理
a1:=abs(close-open)/open<0.015;
a2:=count(a1,m)=m;
a3:=ref(o,m)<ref(close,m) and
ref(close,m)/ref(close,m+1)>1+n/100;
a2 and a3
22)高开大阴
OPEN>CLOSE AND OPEN/REF(C,1) >= 1+M/100 AND CLOSE/OPEN<=1-N/100
23)低开大阳线
OPEN<CLOSE AND OPEN/REF(C,1) <= 1-M/100 AND CLOSE/OPEN>=1+N/100
二、编写公式时常用的通式(这是在网上摘录的,仅供参考)
常用的通式:
(一).曲线在N天内的平均变化率
Fa:=(A/ref(A,N)-1)/N; Fb:=(B/ref(B,N)-1)/N; Fr:=(R/ref(R,N)-1)/N;
(二).变动角
∮a:=atan(Fa); ∮b:=atan(Fb); ∮r:=atan(Fr);
(三).曲线上相距N天的两点的连线的斜率
Ka:=(A-ref(A,N))/N; Kb:=(B-ref(B,N))/N; Kr:=(R-ref(R,N))/N;
(四).倾角
∠a:=atan(Ka); ∠b:=atan(Kb); ∠r:=atan(Kr);
(五).交叉点
Cab:=cross(A,B); Jab:=longcross(A,B,N);
JYa:=between(A,N,M); (六).下拐点(由下向上转)
xD1:=llvbars(A,N)=M;
xD2:=ref(count(A-ref(A,1)<=0,N)=N,M) and count(A-ref(A,1)>0,M)=M; xD3:=ref(count(∠a-ref(∠a,1)<=0,N)=N,M) and ∠a>0; (七).上拐点(由上向下转)
sD1:=hhvbars(A,N)=M;
sD2:=ref(count(A-ref(A,1)>=0,N)=N,M) and count(A-ref(A,1)<0,M)=M; sD3:=ref(count(∠a-ref(∠a,1)>=0,N)=N,M) and ∠a<0; (八).位置(求得交叉点/拐点到当前的周期)
Wz1:=barslast(Cab); Wz2:=ref(Wz1,Wz1+1)+Wz1+2; Wz3:=ref(Wz1,Wz2+1)+Wz2+2; Wz4:=ref(Wz1,Wz3+1)+Wz3+2; Wz5:=ref(Wz1,Wz4+1)+Wz4+2; (九).曲线A叠加曲线B
F:=A/ref(A,1)-1; Js:=ref(B,barscount(c)); DJ:(sum(F,0)+1)*Js; Jd:=ref(B,barslast(条件)); Dj:=(sum(F,0)+1)*Jd;