以下是通达信横盘指标公式源码和截图
通达信分时横盘选股指标公式源码:
N:=7;N1:=20;
v1:=REF(((HHV(H,N)-LLV(L,N))/LLV(L,N)),1) =(N1/100)AND
C =REF(HHV(H,N),1)ANDBARSCOUNT(C)
横盘选股xg1:if(v1,1,0);
横盘
A1:=SUM(C MA(C,55),5);
A2:=MA(V,1)
A3:=V/REF(V,1)
A4:=REF(A1,1);
A5:=A3/A4
a55:=MA(V,5)/MA(REF(V,5),1);
A6:=1.2=MA(C,55));
B3:=V=HHV(V,5);
B4:=REF(C,1) REF(O,1)ANDREF(C,2) REF(O,2)ANDREF(O,1) REF(C,2);
低位放量:=B1ANDB2ANDB3ANDB4;
个股涨幅:=(C-REF(C,1))/REF(C,1)*100;
涨幅:=(INDEXC-REF(INDEXC,1))/REF(INDEXC,1)*100;
跑赢大盘:=个股涨幅 =大盘涨幅;
波动幅度:=0.01 ((HIGH-LOW)/CLOSE)and((HIGH-LOW)/CLOSE) 0.02;
最低价a:=L REF(L,1)ANDL=REF(L,1);
XG:盘中缩量AND低位放量AND跑赢大盘AND波动幅度AND最低价a;
n天横盘突破(想选几天就选几天)可选股
input:n(5);
aa:=(CLOSE-MA(CLOSE,21))/MA(CLOSE,21)*100;
ab:=HHv(c,n)/llv(c,n) 1.50andcount(c o,n) =1andcount(c o,n) =1andcount(l ref(l,1),n)
横盘突破:ref(aa,1)andc oand(c-o) ref(hhv(abs(c-o),n),1)*1.3andc ref(hhv(h,n),1);
TJ:=FILTER(C,239) 0,NODRAW;
TJJ:=SUM(TJ,0),NODRAW;
LTA:=FINANCE(7)+300000000;
C1:=CLOSE;
V1:=TIME;
A1:=COUNT(BARSCOUNT(C)=1ANDTIME 102000,0);
T:=IF(V1 130000,(FLOOR(V1/10000)-9.5)*60+(FLOOR(V1/100)-100*FLOOR(V1/10000)),
(FLOOR(V1/10000)-11)*60+(FLOOR(V1/100)-100*FLOOR(V1/10000))),NODRAW;
成交:AMOUNT,NODRAW;
总:=SUM(AMOUNT,T),NODRAW;
VV3:=总/T;
SS:=IF(CAPITAL 150000000,0.3,IF(CAPITAL 20000000,0.5,IF(CAPITAL 10000000,0.8,IF(CAPITAL 200000,5,IF(CAPITAL 1000000,3,
IF(CAPITAL 5000000,1.5,1)))))),NODRAW;
VV5:=(REF(VV3,T-1)/CEILING(REF(VV3,T-1)/CAPITAL*10000+0.1))*SS,NODRAW;
大额线:=IF(REF(VV3,T)=REF(VV3,T-1),VV5,REF(VV3,T)),NODRAW;
大线位:大额线*100,COLOR00FFFF;
初正1:=IF(T=1ANDDYNAINFO(4) =DYNAINFO(3),总,0);
初负1:=IF(T=1ANDDYNAINFO(4) DYNAINFO(3),总,0);
初正:=CONST(SUM(IF(初正1 =大额线ANDT=1,初正1,0),T)),NODRAW;
初负:=CONST(SUM(IF(初负1 =大额线ANDT=1,初负1,0),T)),NODRAW;
初正2:=CONST(SUM(IF(初正1 大额线ANDT=1,初正1,0),T)),NODRAW;
初负2:=CONST(SUM(IF(初负1 大额线ANDT=1,初负1,0),T)),NODRAW;
T00:=IF(C1 REF(C1,1),0.9,-0.9);
T01:=IF(C1 REF(C1,1),-0.9,0.9);
T02:=T00+T01,NODRAW;
TT1:=BARSLAST(CROSS(T02,+1.5)),NODRAW;
TT2:=BARSLAST(CROSS(-1.5,T02)),NODRAW;
TT:=IF(T02=1.8,1,IF(T02=-1.8,-1,0));
正V1:=IF(TT=1OR(TT=0ANDTT1 TT2),成交,0),NODRAW;
负V1:=IF(TT=-1OR(TT=0ANDTT1 TT2),成交,0),NODRAW;
正负0:=IF(成交!=0AND(正V1=0AND负V1=0),成交,0);
正V0:=IF(正负0!=0ANDREF(正V1,1)!=0,正负0,0);
负V0:=IF(正负0!=0ANDREF(负V1,1)!=0,正负0,0);
正V11:=正V1+正V0;
负V11:=负V1+负V0;
正总1:=初正1+SUM(正V11,T),NODRAW,COLOR0000FF;
负总1:=初负1+SUM(负V11,T),NODRAW,COLOR00FF00;
正V:=IF(正V11 =大额线,正V11,0);
负V:=IF(负V11 =大额线,负V11,0);
正V2:=IF(正V11 大额线,正V11,0);
负V2:=IF(负V11 大额线,负V11,0);
大正总:=IF(TJJ 2,初正,0)+SUM(正V,T),NODRAW,COLOR0000FF;
大负总:=IF(TJJ 2,初负,0)+SUM(负V,T),NODRAW,COLOR00FF00;
大净:(大正总-大负总)/10000,NODRAW;
差%:(大正总-大负总)/(大正总+大负总)*100,COLOR00FF00,NODRAW;
正总2:=IF(TJJ 2,初正2,0)+SUM(正V2,T),NODRAW,COLOR0000FF;
负总2:=IF(TJJ 2,初负2,0)+SUM(负V2,T),NODRAW,COLOR00FF00;
小净:(正总2-负总2)/10000,NODRAW;
小差%:(正总2-负总2)/(正总2+负总2)*100,COLOR00FF00,NODRAW;
STICKLINE(TT=1OR正V0!=0,0,AMOUNT*100,3,1),COLOR0000FF;
STICKLINE(TT=-1OR负V0!=0,0,AMOUNT*100,3,0),COLOR00FF00;
STICKLINE(TT=0ANDTT1 TT2,0,AMOUNT*100,3,1),COLOR00FFFF;
STICKLINE(TT=0ANDTT1 TT2,0,AMOUNT*100,3,0),COLORFF0000;
STICKLINE(正V 大额线,0,AMOUNT*100,3,1),COLORFF00FF;
STICKLINE(负V 大额线,0,AMOUNT*100,3,0),COLORFFFFFF;
STICKLINE(T=1AND初正1 0,0,初正1*100,3,0),COLOR00FFFF;
STICKLINE(T=1AND初负1 0,0,初负1*100,3,0),COLORFF0000;
STICKLINE(T=1AND初正 0,0,初正*100,3,0),COLORFF00FF;
STICKLINE(T=1AND初负 0,0,初负*100,3,0),COLORFFFFFF;
VAR1:=1992231;
VAR2:=IF(DATE =VAR1,1,0);
VAR3:=1/WINNER(CLOSE);
VAR4:=ma(CLOSE,13);
VAR5:=100-Abs((CLOSE-VAR4)/VAR4*100);
VAR6:=LLV(LOW,75);
VAR7:=HHV(HIGH,75);
VAR8:=(VAR7-VAR6)/100;
VAR9:=SMA((CLOSE-VAR6)/VAR8,20,1);
VARA:=SMA((OPEN-VAR6)/VAR8,20,1);
VARB:=3*VAR9-2*SMA(VAR9,15,1);
VARC:=3*VARA-2*SMA(VARA,15,1);
VARD:=100-VARC;
VARE:=REF(LOW,1)*0.9;
VARF:=LOW*0.9;
VAR10:=(VARF*+VARE*(CAPITAL-VOL))/CAPITAL;
VAR11:=EMA(VAR10,30);
VAR12:=CLOSE-REF(CLOSE,1);
VAR13:=MAX(VAR12,0);
VAR14:=ABS(VAR12);
VAR15:=SMA(VAR13,7,1)/SMA(VAR14,7,1)*100;
VAR16:=SMA(VAR13,13,1)/SMA(VAR14,13,1)*100;
VAR17:=BARSCOUNT(CLOSE);
VAR18:=SMA(MAX(VAR12,0),6,1)/SMA(ABS(VAR12),6,1)*100;
VAR19:=(-200)*(HHV(HIGH,55)-CLOSE)/(HHV(HIGH,55)-LLV(LOW,55))+100;
VAR1A:=(CLOSE-LLV(LOW,15))/(HHV(HIGH,15)-LLV(LOW,15))*100;
VAR1B:=SMA((SMA(VAR1A,4,1)-50)*2,3,1);
VAR1C:=(INDEXC-LLV(INDEXL,14))/(HHV(INDEXH,14)-LLV(INDEXL,14))*100;
VAR1D:=SMA(VAR1C,4,1);
VAR1E:=SMA(VAR1D,3,1);
VAR1F:=(HHV(HIGH,30)-CLOSE)/CLOSE*100;
VAR20:=VAR18 =25ANDVAR19 -95ANDVAR1F 20ANDVAR1B -30ANDVAR1E 30ANDVAR11-CLOSE =-0.25ANDVAR15 22ANDVAR16 55ANDVAR17
明天低买CGL90%:IF(crOSS(VAR20,0.5),8,0)*VAR2,COLOR00FFFF,LINETHICK2;
通达信分时横盘选股指标公式截图