通达信公式源码概况:
指标类别:通达信公式
授权方式: 免费版
指标评级: ★★★★★
指标分类: 策略
画线方法: 副图
一、通达信涨停后倍量阴线选股指标公式
lt:=(CAPITAL/100)/10000<=10;
ZF:=OPEN/ref(CLOSE,1);A1:=ZF>=1.00andZF<1.05;
换手:=VOL/CAPITAL*100;换5:=MA(换手,5);
涨停:=CLOSE/ref(CLOSE,1)>1.095;TS:=BARSLAST(涨停);QJ:=BETWEEN(TS,1,10);
tj:=BARSSINCE(v)+1=1;zq:=BARSLAST(tj);
量比:=if(tj,sum(v,0)/DYNAINFO(38)*240,ref(sum(v,0)/DYNAINFO(38)*240,zq));
XG:ltandA1andref(换5,1)<3and换手>3and量比>20;
或:XG:ltandA1andref(换5,1)<3and换手>3andQJand量比>20;
A1:=C/ref(C,1)>=1.099;
A2:=ALL(A1,3);
A3:=BARSLAST(A2);
A4:=TROUGHBARS(3,7,1)=1;
XG:BETWEEN(A3,3,10)andA4;
N:=1;M:=10;
ZT:=(C-REF(C,1))*100/REF(C,1)>=(10-1/REF(C,1))AND(C-REF(C,1))*100/REF(C,1)<=(10+1/REF(C,1))ANDH=C;
COUNT(BARSLAST(NOT(ZT))=N,M)>0;
AA:=COUNT(REF(C,1)*1.1-C<0.01,15)>0;
BBB:="MACD.DIF#MIN60">REF("MACD.DIF#MIN60",1)
AND"MACD.DEA#MIN60">=REF("MACD.DEA#MIN60",1);
CCC:="KDJ.K#MIN60">=REF("KDJ.K#MIN60",1);
XG:AAANDBBBANDCCC,COLORRED;
N:=5;
M1:=6;
M2:=6;
M3:=8;
R:=IF(DATE<1900612,1,0);
EE:=(H+MAX(C,O))/2;
EE1:=MA(EE,3);
EE2:=(L+MIN(C,O))/2;
EE3:=MA(EE2,3);
超短生命线:=MA(EE,3);
FF:=(H+L+C+O)/4,COLORWHITE;
FF1:=MA(FF,3),COLORGREEN;
FF3:=REF((C+O)/2,1)>REF((C+O)/2,2)ANDREF(MIN(C,O),1)>REF(MAX(C,O),2);
实际乖离:=(MAX(FF,FF1)-MIN(FF,FF1))/MIN(FF,FF1)*100,LINETHICK;
FF4:=(((FF1-(REF(FF1,1)-FF1))-L)/L)*100;
FF5:=(((EE1+(EE1-REF(EE1,1)))-L)/L)*100;
FF6:=FF1-(REF(FF1,1)-FF1);
FF7:=EE1+(EE1-REF(EE1,1));
期望获利率:=IF(FF3,FF5,FF4),LINETHICK;
YY1:=REF(EVERY(C>=O,4),1)ANDREF(EVERY((C+O)/2>FF1,4),1)AND(C+O)/2<FF1;
YY2:=NOT(YY1)AND(FF1-O)/O*1000>5ANDO<REF(MIN(C,O),1);
A:=SMA(L,4,3);
B:=SMA(H,4,3);
BB:=SMA(MIN(C,O),4,3);
BB1:=REF(L,1)-HHV((MAX(REF(L,2),REF(L,1))-MIN(REF(L,2),REF(L,1))),2);
BB2:=REF((C+O)/2,1)>REF((C+O)/2,2);
BB3:=L<=BB1+BB1*0.01ANDO>REF(O,2)ANDO>=REF(L,3)ANDCOUNT(C>O,7)>3;
BB6:=(BB1-L)/L*100;
BB7:=(REF(L,1)-BB1)/BB1*100;
A1:=(A-L)/L>N/1000;
A8:=A1;
A9:=(REF(H,1)-O)/O*100-(REF(MAX(C,O),2)-REF(MAX(C,O),1))/REF(MAX(C,O),1)*100;
A10:=IF(BB2,BB6,A9);
BB4:=BB6+A10>2;
BB5:=IF(BB2,BB3,BB4)AND期望获利率>2;
D5:=RANDA8ANDBB5;
XG:=(REF((D5),1)AND(L<REF((L/0.995),1)));
M:=60;
P:=1.02;
一年内选股次数:=SUM(XG,M);
三日内涨二点卖:=HHV(H,3)>REF(C,3)*PANDREF(CROSS(XG,0.8),3);
一年内成功次数:=SUM(三日内涨二点卖,M);
成功率:=一年内成功次数/一年内选股次数;
选股:XGAND成功率>0.8;
LC:=REF(CLOSE,1);
RSI5:=((SMA(MAX((CLOSE-LC),0),5,1)/SMA(ABS((CLOSE-LC)),5,1))*100);
TR1:=SUM(MAX(MAX((HIGH-LOW),ABS((HIGH-REF(CLOSE,1)))),ABS((LOW-REF(CLOSE,1)))),10);
HD:=(HIGH-REF(HIGH,1));
LD:=(REF(LOW,1)-LOW);
DMP:=SUM(IF(((HD>0)AND(HD>LD)),HD,0),10);
DMM:=SUM(IF(((LD>0)AND(LD>HD)),LD,0),10);
PDI:=((DMP*100)/TR1);
MDI:=((DMM*100)/TR1);
ADX:=MA(((ABS((MDI-PDI))/(MDI+PDI))*100),5);
AV:=(RSI5+ADX);
WR10:=((100*(HHV(HIGH,10)-CLOSE))/(HHV(HIGH,10)-LLV(LOW,10)));
NEWVOL:=(RSI5-WR10);
天知买入:=(AV+NEWVOL);
最佳买入选股:=IF(CROSS(天知买入,0),1,0);
VAR1:=SMA(最佳买入选股,3,1);
VAR2:=SMA(VAR1,3,1);
VAR3:=SMA(VAR2,3,1);
天知买点:=IF(CROSS(VAR2,VAR3)AND(VAR2<40),5,0*10000);
N:=5;
R:=IF(DATE<1900612,1,0);
EE:=(H+MAX(C,O))/2;
EE1:=MA(EE,3);
FF:=(H+L+C+O)/4,COLORWHITE;
FF1:=MA(FF,3),COLORGREEN;
FF3:=REF((C+O)/2,1)>REF((C+O)/2,2)ANDREF(MIN(C,O),1)>REF(MAX(C,O),2);
FF4:=(((FF1-(REF(FF1,1)-FF1))-L)/L)*100;
FF5:=(((EE1+(EE1-REF(EE1,1)))-L)/L)*100;
期望获利率:=IF(FF3,FF5,FF4),LINETHICK;
A:=SMA(L,4,3);
BB1:=REF(L,1)-HHV((MAX(REF(L,2),REF(L,1))-MIN(REF(L,2),REF(L,1))),2);
BB2:=REF((C+O)/2,1)>REF((C+O)/2,2);
BB3:=L<=BB1+BB1*0.01ANDO>REF(O,2)ANDO>=REF(L,3)ANDCOUNT(C>O,7)>3;
BB6:=(BB1-L)/L*100;
A1:=(A-L)/L>N/1000;
A8:=A1;
A9:=(REF(H,1)-O)/O*100-(REF(MAX(C,O),2)-REF(MAX(C,O),1))/REF(MAX(C,O),1)*100;
A10:=IF(BB2,BB6,A9);
BB4:=BB6+A10>2;
BB5:=IF(BB2,BB3,BB4)AND期望获利率>2;
D5:=RANDA8ANDBB5;
买进:=(REF((D5),1)AND(L<REF((L/0.995),1)));
天知买点AND买进;
LZCXH1:=REF(V,2)>MA(V,120)ANDREF(V,2)>MA(V,5) ANDREF(C,2)>REF(O,2);
LZCXH2:=REF(V,1)>MA(V,5)ANDREF(C,1)>REF(O,1);
LZCXH3:=V*1.8<REF(V,1);
XG:LZCXH1ANDLZCXH2ANDLZCXH3 ;
[源码注释]通达信公式动态翻译结果
输出历史天量:成交量(手)=收盘价的有效数据周期数日内成交量(手)的最高值
每日通达信公式解答:
编写要求:
每月第一天的收盘价和开盘价指标
公式在线网解答:
月开:=REF(OPEN,BARSLAST(MONTH!=REF(MONTH,1)));
月收:=REF(CLOSE,BARSLAST(MONTH!=REF(MONTH,1)));
STICKLINE(OPEN,月开,月开,3,0),COLORFFFFFF;
STICKLINE(OPEN,月收,月收,3,0),COLOR00FFFF;
评论(0)