通达信公式源码概况:
指标类别:通达信公式
授权方式: 免费版
指标评级: ★★★★★
指标分类: 策略
画线方法: 副图
公式解读:
通达信龙虎榜战法指标公式-短线K线战法 公式源码
{参数:N:2,100,20;M:2,100,10}
AA:=XMA(CLOSE,N);
上轨:AA*(1+M/100);
下轨:AA*(1-M/100);
STICKLINE(HIGH 上轨*1.0,HIGH,LOW,1,0)COLORBLUE;
STICKLINE(LOW 下轨*0.99,LOW,下轨,1,0)COLORYELLOW;
{涨板K线}
BB:=CLOSE/REF(C,1) =1.09;
STICKLINE(BB,O,C,3,0),COLORRED;
STICKLINE(BB,L,H,0,0),COLORRED;
{BS信号}
VAR10:=IF(TROUGHBARS(3,16,1)=0ANDHIGH LOW+0.04,4,0);
VAR11:=ZIG(3,6) REF(ZIG(3,6),1)ANDREF(ZIG(3,6),1) =REF(ZIG(3,6),2)ANDREF(ZIG(3,6),2) =REF(ZIG(3,6),3);
VAR12:=ZIG(3,6) REF(ZIG(3,6),1)ANDREF(ZIG(3,6),1) =REF(ZIG(3,6),2)ANDREF(ZIG(3,6),2) =REF(ZIG(3,6),3);
VAR13:=ZIG(3,22) REF(ZIG(3,22),1)ANDREF(ZIG(3,22),1) =REF(ZIG(3,22),2)ANDREF(ZIG(3,22),2) =REF(ZIG(3,22),3);
VAR14:=ZIG(3,22) REF(ZIG(3,22),1)ANDREF(ZIG(3,22),1) =REF(ZIG(3,22),2)ANDREF(ZIG(3,22),2) =REF(ZIG(3,22),3);
VAR15:=ZIG(3,51) REF(ZIG(3,51),1)ANDREF(ZIG(3,51),1) =REF(ZIG(3,51),2)ANDREF(ZIG(3,51),2) =REF(ZIG(3,51),3);
VAR16:=ZIG(3,51) REF(ZIG(3,51),1)ANDREF(ZIG(3,51),1) =REF(ZIG(3,51),2)ANDREF(ZIG(3,51),2) =REF(ZIG(3,51),3);
VAR17:=ZIG(3,72) REF(ZIG(3,72),1)ANDREF(ZIG(3,72),1) =REF(ZIG(3,72),2)ANDREF(ZIG(3,72),2) =REF(ZIG(3,72),3);
VAR18:=ZIG(3,72) REF(ZIG(3,72),1)ANDREF(ZIG(3,72),1) =REF(ZIG(3,72),2)ANDREF(ZIG(3,72),2) =REF(ZIG(3,72),3);
VAR19:=EMA(CLOSE,2)-EMA(CLOSE,150);
买1:=VAR10;
买2:=(VAR11+VAR13+VAR15+VAR17);
卖1:=(VAR12+VAR14+VAR16+VAR18);
B:IF(买1 0OR买2 0,LOW*0.99,DRAWNULL),CROSSDOT,LINETHICK3,COLORMAGENTA;
S:IF(卖1 0,HIGH*1.01,DRAWNULL),CROSSDOT,LINETHICK3,COLOR7FFF00;
存量1:MA(WINNER(CLOSE*0.93)*100*CLOSE,3),COLORGREEN,LINETHICK1;
资金存量2:=WINNER(CLOSE*0.85)*100*CLOSE;
资金存量3:=WINNER(CLOSE*0.86)*100*CLOSE;
建仓:MA(资金存量2,43),COLORFFAA66,LINETHICK2;
主力部队建仓:MA(资金存量3,70),COLORRED,LINETHICK2;
DP:=(INDEXC-REF(INDEXC,1))/INDEXC*100;
GG:=(C-REF(C,1))/C*100;
偏离值:IF(DYNAINFO(4) 0,Abs(GG-DP),0);
:10000*V/FINANCE(7);
近一月上榜次数:COUNT((偏离值 =7OR换手率 =25),20);
近三月上榜次数:COUNT((偏离值 =7OR换手率 =25),60);
VAR1:=MA(HHV(HIGH,485),17);
VAR2:=MA(HHV(HIGH,222),17);
VAR3:=MA(HHV(HIGH,96),17);
VAR4:=MA(LLV(LOW,485),17);
VAR5:=MA(LLV(LOW,222),17);
VAR6:=MA(LLV(LOW,96),17);
VAR7:=MA((VAR4*0.96+VAR5*0.96+VAR6*0.96+VAR1*0.558+VAR2*0.558+VAR3*0.558)
/6,17);
VAR8:=MA((VAR4*1.25+VAR5*1.23+VAR6*1.2+VAR1*0.55+VAR2*0.55+VAR3*0.65)/6,17);
VAR9:=MA((VAR4*1.3+VAR5*1.3+VAR6*1.3+VAR1*0.68+VAR2*0.68+VAR3*0.68)/6,17);
VARA:=MA((VAR7*3+VAR8*2+VAR9)/6*1.738,17);
VARB:=IF(DATE =1341231,VARA,VARA*DAY);
{短线快枪手}
A01:=(C-LLV(LOW,3))/(HHV(HIGH,3)-LLV(LOW,3));
A11:=SMA(A01,2,1);
A21:=SMA(A11,2,1);
A31:=3*A11-2*A21;
A41:=2*A31-0.5;
生命线:C*(1-(A41-A21)/15),COLORRED,LINETHICK2;
弱:IF(MA(CLOSE,4) SMA(LOW,21,2)*1.01,SMA(LOW,21,2)*1.01,SMA(LOW,21,2)*1.01),COLORCYAN,COLORBLUE;
强:IF(SMA(LOW,21,2)*1.01 =REF(SMA(LOW,21,2)*1.01,1),SMA(LOW,21,2)*1.01,DRAWNULL),LINETHICK1,COLORMAGENTA;
DRAWTEXT(CROSS(C,IF(MA(CLOSE,4) SMA(LOW,21,2)*1.01,SMA(LOW,21,2)*1.01,SMA(LOW,21,2)*1.01)),LOW, △ ),COLORYELLOW;
DRAWTEXT(CROSS(C,生命线),LOW, △ ),COLORGREEN;
DRAWTEXT(FILTER(EMA(EMA(C,5),5) REF(EMA(EMA(C,5),5),1)ANDHHV(MA(H,13),13) REF(HHV(MA(H,13),13),1)ANDC REF(C,1),11),L*0.98, 追涨 ),COLORGREEN;
DRAWTEXT(CROSS(84,SMA(MAX(CLOSE-REF(CLOSE,1),0),6,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),6,1)*100),H*1.03, ),COLORRED;
阻力:PEAK(1,5,1),COLOR66CC00;
支撑:TROUGH(2,5,1),COLORFFB97A;
VARC:=LOW;
VARD:=REF(LOW,1);
VARE:=SMA(ABS(VARC-VARD),3,1)/SMA(MAX(VARC-VARD,0),3,1)*100;
VARF:=MA(IF(CLOSE*1.35 =VARB,VARE*10,VARE/10),3);
VAR10:=LLV(LOW,30);
VAR11:=HHV(VARF,30);
VAR12:=1341231;
TJ:=IF(DATE =VAR12,MA(IF(LOW =VAR10,(VARF+VAR11*2)/2,0),3),100000000);
挖坑:REF(TJ,2) REF(TJ,3)ANDTJ REF(TJ,1);
[源码注释]通达信公式动态公式解读