通达信filter函数的用法 通达信finvalue函数
江恩副图之通达信公式
A9:=MIN(MIN(A1,A2),A3);江恩流派属于股票市场一个比较悠久的流派,下面给大家说说,江恩副图之通达信公式。
通达信filter函数的用法 通达信finvalue函数
通达信filter函数的用法 通达信finvalue函数
MA5:EMA(CLOSE,5);
MA10:EMA(C,10);
MA20:EMA(CLOSE,20);
VAR1A:=(REF(HIGH,1)+REF(LOW,1))/2;
压力线:MA(CLOSE,20)VAR5:=VAR1 + VAR2 + VAR3 + VAR4;+2STD(CLOSE,20);
支撑线:MA(CLOSE,21)-2.2STD(CLOSE,21),COLORYELLOW;
VAR2A:=CROSS(VAR1A,压力线);
VAR4A:=SMA(MAX(CLOSE-VAR3A,0),7,1)/SMA(ABS(CLOSE-VAR3A),7,1)100;
VAR5A:=CROSS(79,VAR4A);
VAR6A:=FILTER(VAR5A,4);
DRAWTEXT(FILTER(VAR6AORVAR2A,5),HIGH1.02,‘卖’),COLORYELLOW;
VAR7A:=FILTER(MA5》REF(MA5,1)ANDMA10》REF(MA10,1)ANDMA20》REF(MA20,1)ANDMA5《MA10,5);
VAR8A:=FILTER(HHVBARS(H,13)/C》2ANDMA5》REF(MA5,1)ANDMA5《MA10,7);
VAR9A:=REF(L,2)《支撑线ANDL》支撑线ANDC》OANDMA5》REF(MA5,1);
DRAWICON(FILTER(VAR7AORVAR8AORVAR9A,5)ANDVAR4A《45,L,1);
DRAWTEXT(FILTER(VAR7AORVAR8AORVAR9A,5)ANDVAR4A《45,L,‘买’),COLORRED;
VAR1:=CLOSE》REF(CLOSE,1)ANDCLOSE》REF(CLOSE,2);
VAR2:=REF(VAR1,1)ANDCLOSE《=REF(CLOSE,1)ANDCLOSE》=REF(CLOSE,2);
VAR3:=REF(VAR2,1)ANDCLOSE》=REF(CLOSE,1)ANDCLOSE《=REF(CLOSE,2);
VAR4:=REF(VAR3,1)ANDCLOSE《=REF(CLOSE,1)ANDCLOSE》=REF(CLOSE,2);
VAR5:=REF(VAR4,1)ANDCLOSE》=REF(CLOSE,1)ANDCLOSE《=REF(CLOSE,2);
VAR6:=REF(VAR5,1)ANDCLOSE《=REF(CLOSE,1)ANDCLOSE》=REF(CLOSE,2);
VAR7:=REF(VAR6,1)ANDCLOSE》=REF(CLOSE,1)ANDCLOSE《=REF(CLOSE,2);
VAR8:=REF(VAR7,1)ANDCLOSE《=REF(CLOSE,1)ANDCLOSE》=REF(CLOSE,2);
VAR9:=REF(VAR8,1)ANDCLOSE》=REF(CLOSE,1)ANDCLOSE《=REF(CLOSE,2);
VARA:=REF(VAR9,1)ANDCLOSE《=REF(CLOSE,1)ANDCLOSE》=REF(CLOSE,2);
VARB:=REF(VARA,1)ANDCLOSE》=REF(CLOSE,1)ANDCLOSE《=REF(CLOSE,2);
VARC:=REF(VARB,1)ANDCLOSE《=REF(CLOSE,1)ANDCLOSE》=REF(CLOSE,2);
涨:STICKLINE(VAR1ORVAR2ORVAR3ORVAR4ORVAR5ORVAR6ORVAR7ORVAR8ORVAR9ORVARAORVARBORVARC,CLOSE,REF(CLOSE,1),3,1),COLORRED;
VARD:=CLOSE《REF(CLOSE,1)ANDCLOSE《REF(CLOSE,2);
VARE:=REF(VARD,1)ANDCLOSE》=REF(CLOSE,1)ANDCLOSE《=REF(CLOSE,2);
VARF:=REF(VARE,1)ANDCLOSE《=REF(CLOSE,1)ANDCLOSE》=REF(CLOSE,2);
VAR10:=REF(VARF,1)ANDCLOSE》=REF(CLOSE,1)ANDCLOSE《=REF(CLOSE,2);
VAR11:=REF(VAR10,1)ANDCLOSE《=REF(CLOSE,1)ANDCLOSE》=REF(CLOSE,2);
VAR12:=REF(VAR11,1)ANDCLOSE》=REF(CLOSE,1)ANDCLOSE《=REF(CLOSE,2);
VAR14:=REF(VAR13,1)ANDCLOSE》=REF(CLOSE,1)ANDCLOSE《=REF(CLOSE,2);
VAR16:=REF(VAR15,1)ANDCLOSE》=REF(CLOSE,1)ANDCLOSE《=REF(CLOSE,2);
VAR17:=REF(VAR16,1)ANDCLOSE《=REF(CLOSE,1)ANDCLOSE》=REF(CLOSE,2);
跌:STICKLINE(VARDORVAREORVARFORVAR10ORVAR11ORVAR12ORVAR13
ORVAR14ORVAR15ORVAR16ORVAR17ORVAR18,CLOSE,REF(CLOSE,1),3,0),COLORFF8080;
VAR19:=REF(VARDORVAREORVARFORVAR10ORVAR11ORVAR12ORVAR13ORVAR14ORVAR15ORVAR16ORVAR17ORVAR18,1)ANDVAR1;
底:STICKLINE(VAR19,REF(CLOSE,1),REF(CLOSE,2),3,0),COLORYELLOW;
VAR1B:=REF(VAR1ORVAR2ORVAR3ORVAR4ORVAR5ORVAR6ORVAR7ORVAR8ORVAR9ORVARAORVARBORVARC,1)ANDVARD;
顶:STICKLINE(VAR1B,REF(CLOSE,1),REF(CLOSE,2),3,0),COLORWHITE;
A:=BARSCOUNT(C);
AH:=HHV(H,72);
AL:=LLV(L,72);
A0:=(AH-AL)/21;
B1:=L-A0;
DRAWTEXT((A+0)/13=FLOOR((A+0)/13),B1-5.5A0,‘转向’),COLORWHITE;
蓝色信号编写成选股公式
A:=BARSCOUNT(C);
转向:(A+0)/13=FLOOR((A+0)/13);
VBA数组如何筛选?
VAR13:=REF(VAR12,1)ANDCLOSE《=REF(CLOSE,1)ANDCLOSE》=REF(CLOSE,2);Filter函数实现数组筛选:
数组的筛选就是根据一定的条件,从数组中筛选符合条件的值,组成一个新的数组,实现数组筛选的VBA函数是:
Filter函数
用法:Filter(数组,
筛选的字符,
是否包含)
Sub
DRAWTEXT(机 AND C/DYNAINFO(3)>0.0113 AND C>=均价787 AND C> DYNAINFO(3),(机构买+1000)1.35,'机会'),COLORF000FF,LINETHICK5;DD()
arr1
=VBA.Filter(arr,
"A",
True)
'筛选所有含A的数值组成一个新数组
arr2
=VBA.Filter(arr,
"A",
False)
'筛选所有不含A的数值组成一个新数组
MsgBox
Join(arr2,
",")
'查看筛选的结果End
Sub遗憾的是函数只能进行模糊筛选,不能匹配。
求高手帮忙把这个通达信公式该成东方财富通的
{机构买:=VAR1;你的这个指标财富通可以通过,由于各家软件都有自己的特点,所以,同样的函数在该软件上与通达信的不一样。
N:=75;
P:=5;
P1:=10;
A1:=REF(H,P)=HHV(H,2P+1);
B1:=FILTER(A1,P);
C1:=BACKSET(B1,P+1);
D1:=FILTER(C1,P);
F1:=E1>REF(E1,1);
短压:DRAWLINE(D1,H,F1,H,1),COLORCYAN;
A2:=REF(L,P)=LLV(L,2P+1);
B2:=FILTER(A2,P);
C2:=BACKSET(B2,P+1);
D2:=FILTER(C2,P);
E2:=BACKSET(ISLASTBAR,BARSLAST(D2)+1);
F2:=E2>REF(E2,1);
短支:DRAWLINE(D2,L,F2,L,1),COLORLIRED;
AA1:=REF(H,P1)=HHV(H,2P1+1);
BB1:=FILTER(AA1,P1);
CC1:=BACKSET(BB1,P1+1);
DD1:=FILTER(CC1,P1);
EE1:=BACKSET(ISLASTBAR,BARSLAST(DD1)+1);
FF1:=EE1>REF(EE1,1);
长压:DRAWLINE(DD1,H,FF1,H,1),COLORGREEN;
AA2:=REF(L,P1)=LLV(L,2P1+1);
BB2:=FILTER(AA2,P1);
CC2:=BACKSET(BB2,P1+1);
DD2:=FILTER(CC2,P1);DRAWICON(CROSS(10,VAR4A),L,3);
EE2:=BACKSET(ISLASTBAR,BARSLAST(DD2)+1);
FF2:=EE2>REF(EE2,1);
长支:DRAWLINE(DD2,L,FF2,L,1),COLORRED;
STICKLINE(C>=O,C,O,3,0),COLOR000045;
STICKLINE(C>=O,C,O,2.5,0),COLOR000065;
STICKLINE(C>=O,C,O,2,0),COLOR000085;
STICKLINE(C>=O,C,O,1.5,0),COLOR0000A5;
STICKLINE(C>=O,C,O,0.5,0),COLOR0000E5;
STICKLINE(C>=O,H,L,0,0),COLOR0000F5;
STICKLINE(C STICKLINE(C STICKLINE(C STICKLINE(C STICKLINE(C STICKLINE(C STICKLINE(C 高:=REFDATE(HHV(H,N),DATE); 低:=REFDATE(LLV(L,N),DATE); H1:=高-(高-低)0.1; H2:=高-(高-低)0.382; H3:=高-(高-低)0.5; H4:=高-(高-低)0.618; H5:=高-(高-低)0.809; H809:高-(高-低)0.1; H618:高-(高-低)0.382; H05:高-(高-低)0.5; H382:高-(高-低)0.618; H1:高-(高-低)0.809; DRAWTEXT(CURRBARSCOUNT=1,高,'高'),COLORGREEN; DRAWTEXT(CURRBARSCOUNT=1,H1,'809'),COLORCYAN; DRAWTEXT(CURRBARSCOUNT=1,H3,'中'),COLORYELLOW; DRAWTEXT(CURRBARSCOUNT=1,H4,'382'),COLORLIRED; DRAWTEXT(CURRBARSCOUNT=1,H5,'1'),COLORMAGENTA; DRAWTEXT(CURRBARSCOUNT=1,低,'低'),COLORRED; STICKLINE(CURRBARSCOUNT=13,高,高,100,-1),COLORGREEN; STICKLINE(CURRBARSCOUNT=13,H1,H1,100,-1),COLORCYAN; STICKLINE(CURRBARSCOUNT=13,H2,H2,100,-1),COLORGRAY; STICKLINE(CURRBARSCOUNT=13,H3,H3,100,-1),COLORYELLOW; STICKLINE(CURRBARSCOUNT=13,H4,H4,100,-1),COLORLIRED; STICKLINE(CURRBARSCOUNT=13,H5,H5,100,-1),COLORMAGENTA; STICKLINE(CURRBARSCOUNT=13,低,低,100,-1),COLORRED; N:=7; A1:=REF(H,N)=HHV(H,2N+1); B1:=FILTER(A1,N); C1:=BACKSET(B1,N+1); D1:=FILT2.语法:=FILTER(array,include,[if_empty])ER(C1,N);{高点} A2:=REF(L,N)=LLV(L,2N+1); B2:=FILTER(A2,N); C2:=BACKSET(B2,N+1); E1:=(REF(LLV(L,2N),1)+REF(HHV(H,2N),1))/2; E2:=(H+L)/2;{高低点出现在同一K线上时可作取舍} 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 ISLASTBAR OR BARSCOUNT(C)=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(ISLASTBAR,BARSLAST(HD)+1); S1:=R1>REF(R1,1); {前一高} T1:=BACKSET(ISLASTBAR,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); {前四高} XG: U1 OR U2 OR U3 OR U4; 这个公式的核心价值就是未来函数。去掉的话,就没有意义了。 filter不是未来函数,是在上一个信号出现后,在多长时间不再提示 比如kdj的金叉,如果今天金叉,用filter过滤5天,那5天内再出叉就不提示了。所以filtE1:=BACKSET(ISLASTBAR,BARSLAST(D1)+1);er很安全 OBV:=CLOSE; P:=1;{有心人在此改数字会有新发现} A1:=REF(OBV,P)=HHV(OBV,2P+1); B1:=FILTER(A1,P); C1:=BACKSET(B1,P+1); D1:=FILTER(C1,P);{高点} XG:CROSS(OBV,上1.01); 看的有点迷糊,你说的是不是连涨,下面这个是连涨三天,C是收盘,O是 里面的豆号和字符都是在英语输入法下打出来的,到条件选股里面,选股器,加入,执行选股就行了,就可以用了。 C>O AND REF(C,1)>REF(O,1) AND REF(C,2)>REF(O,2) AND C>REF(C,1) AND REF(C,1)>REF(C,2) AND REF(C,2)>REF(C,3) 用这个就行了: AA05:=MA(C,5); 五日乖离率:=(C-AA05)/AA05100; BB05:=ATAN((AA05/REF(AA05,1)-1)100)180/3.1416; AA10:=MA(C,10);AA20:=MA(C,20); BB10:=ATAN((AA10/REF(AA10,1)-1)100)180/3.1416; AA30:=MA(C,30); 三拾日乖离率:=(C-AA30)/AA30100; VAR1:=(AA20-AA30)>REF((AA20-AA30),1) AND AA20>REF(AA20,1) AND AA30>REF(AA30,1);这个通达信公式高手看看如何,能否改成条件选股公式,如果能去掉未来函数多谢了
X2:=REF(BARSLAST(L2),1)+1;股票源码公式中的FILTER函数是未来函数吗?会有漂移吗?为什么加入后准确率大大提高?
STICKLINE((A+0)/13=FLOOR((A+0)/13),B1,B1-3A0,1,0);你好,请哪位高手改一下突破选股公式,放在通达信上,提示说单词不能超过16个字符,做不了公式,谢谢
H1:=(D1 AND NOT(D2 AND E1>=E2)) OR ISLASTBAR OR BARSCOUNT(C)=1;请把下面的通达信的公式改写为有关 短追涨 的选股公式
黄金叉:=CROSS(A2,A4)AND A3>REF(A3,1)AND A0>REF(A0,2)AND (A1-A4)/A4<0.02;
声明:本站所有文章资源内容,如无特殊说明或标注,均为采集网络资源。如若本站内容侵犯了原著者的合法权益,可联系 836084111@qq.com 删除。