以下是通达信烧香拜佛指标公式

 

{烧香拜佛 TDX}

{P(10,1,100),A(5,1,100);}
主买:=CONST(“FSKY.主买#DAY”),NODRAW;
前量:=CONST(“FSKY.前量#DAY”);
前主:=CONST(“FSKY.前主#DAY”);
昨量:=CONST(“FSKY.昨量#DAY”),NODRAW;
昨主:=CONST(“FSKY.昨主#DAY”);

今量:=CONST(“FSKY.今量#DAY”),NODRAW;
前4:=CONST(“FSKY.前4#DAY”);
主4:=CONST(“FSKY.主4#DAY”);
前5:=CONST(“FSKY.前5#DAY”);
主5:=CONST(“FSKY.主5#DAY”);
CMM:=MAX(前5,前4),NODRAW;
BMM1:=MAX(前量,昨量),NODRAW;
BMM:=MAX(CMM,BMM1),NODRAW;
AMM:=IF(今量/BMM>2,今量,BMM),NODRAW;
MM:=CONST(500/AMM),NODRAW;

SVOL:=INTPART(SUM(V,0)/CAPITAL);
TJ0:=SVOL>REF(SVOL,1) OR BARSSINCE(CLOSE)=0;
S1:=BARSLAST(TJ0)+1;
TJ2:=S1<REF(S1,1);
S2:=IF(TJ2,REF(S1,1)+1,S1);
S3:=SUM(TJ2,0);
ZK1:=”KD.K#WEEK”(9,3,3);
ZD2:=”KD.D#WEEK”(9,3,3);
ZF1:=”MACD.DIF#WEEK”(12,26,9);
ZA2:=”MACD.DEA#WEEK”(12,26,9);
换手:V/CAPITAL*100,LINETHICK0;
JCD:=FILTER(CROSS(ZK1,ZD2) AND REF(ZD2,1)<30,13),NODRAW;
取点:=BARSLAST(JCD);
吸筹区:=IF(取点>0 AND 取点<61,取点,0);
ZS1:=吸筹区;
ZS2:=吸筹区+1;
ZS3:=换手/5;
ZSA:=IF(ZS1>0,SUM((ZS3),吸筹区+1),0),NODRAW;
主力筹码%:ZSA,NODRAW;
建仓天数:ZS1,NODRAW;
阶段总额(万):=SUM(AMOUNT/10000,S2)*100,NODRAW;
阶段总量(手):=SUM(V,S2)*100,NODRAW;
阶段成本(元):(阶段总额(万)/(阶段总量(手)/100)),NODRAW;

STICKLINE(JCD,(0-6)*4,6*4,0,1),COLORGREEN;
N:=2.5;
VAR2:=LLV(LOW,10);
VAR3:=HHV(HIGH,25);
卖出:14.5*N,COLORC6C600;
清仓:17.5*N,COLORFF75FF;
动力线:= (EMA((CLOSE-VAR2)/(VAR3-VAR2)*4,4)*10-17.5)*N;
STICKLINE(动力线>REF(动力线,1) ,动力线 ,REF(动力线,1),5 ,1),COLORRED;
STICKLINE(动力线<=REF(动力线,1) ,动力线 ,REF(动力线,1),5 ,1),COLOR00FF00;
底部:-15.5*N,COLOR70DB93;
关注:-12.5*N,COLORYELLOW;
T1:=FILTER(CROSS(动力线,关注),20);
T2:=FILTER(CROSS(动力线,底部),20);
T3:=FILTER(CROSS(清仓,动力线),20);
T4:=FILTER(CROSS(卖出,动力线),20);
RSV:=((((HHV(HIGH,P) – CLOSE) / (HHV(HIGH,P) – LLV(LOW,P))) * 200) – 125);
散户:SMA(RSV,A,1)+15,COLORGRAY,LINETHICK2;
RSV1:=((((CLOSE – LLV(LOW,P)) / (HHV(HIGH,P) – LLV(LOW,P))) * 200) – 105);
主力:SMA(RSV1,A,1)+15,COLORGRAY,LINETHICK2;
IF(散户<0,散户,DRAWNULL),COLORYELLOW,LINETHICK2;
IF(主力>0,主力,DRAWNULL),COLORYELLOW,LINETHICK2;
准备起爆:=CROSS(主力,散户);
STICKLINE(准备起爆,10,-10,4,0),COLOR00FFFF;
小心阴跌一:=CROSS(散户,主力);
STICKLINE(小心阴跌一,10,-10,4,0),COLORGRAY;
DRAWICON((T1 OR T2),0 ,1);
DRAWTEXT((T3 OR T4),0,’$’),COLOR00FFFF;
DRAWTEXT(准备起爆,5,’ 佛,’),COLOR00FFFF;
换手冷清:STICKLINE(换手<3,(0-20)*4,(换手*1.5-20)*4,0.5,1),COLOR999999;
换手活跃:STICKLINE(换手>=3 AND 换手<7,(0-20)*4,(换手*1.5-20)*4,0.5,1),COLOR00CCCC;
换手热烈:STICKLINE(换手>=7,(0-20)*4,(换手*1.5-20)*4,0.5,1),COLOR0000DD;
{强弱走势89线:50/1.5*(MA(3*(C-LLV(L,89))/(HHV(H,89)-LLV(L,89)),2))-50,COLORMAGENTA,LINETHICK1;
0;};
 

KP:=DYNAINFO(4);
ZX:=DYNAINFO(7);
A1:=IF(主买>=今量/2,255,255);
A2:=IF(主买>=今量/2,0,0);
A3:=IF(主买>=今量/2,0,255);
DRAWRECTREL(0,160,MM*今量,190,RGB(0,250,250));
DRAWRECTREL(0,160,MM*主买,190,RGB(A1,A2,A3));
DRAWRECTREL(0,160,MM*ABS(主买-(今量-主买)),190,RGB(A3,255,00));
ZO:=CONST(“FSKY.ZO#DAY”);
ZC:=CONST(“FSKY.ZC#DAY”);
A4:=IF(昨主>=昨量/2,255,255);
A5:=IF(昨主>=昨量/2,0,0);
A6:=IF(昨主>=昨量/2,0,255);
DRAWRECTREL(0,120,MM*昨量,150,RGB(0,250,250));
DRAWRECTREL(0,120,MM*昨主,150,RGB(A4,A5,A6));
DRAWRECTREL(0,120,MM*ABS(昨主-(昨量-昨主)),150,RGB(A6,255,00));
JO:=CONST(“FSKY.JO#DAY”);
JC:=CONST(“FSKY.JC#DAY”);
A7:=IF(前主>=前量/2,255,255);
A8:=IF(前主>=前量/2,0,0);
A9:=IF(前主>=前量/2,0,255);
DRAWRECTREL(0,80,MM*前量,110,RGB(0,250,250));
DRAWRECTREL(0,80,MM*前主,110,RGB(A7,A8,A9));
DRAWRECTREL(0,80,MM*ABS(前主-(前量-前主)),110,RGB(A9,255,00));
JO3:=CONST(“FSKY.JO3#DAY”);
JC3:=CONST(“FSKY.JC3#DAY”);
A10:=IF(主4>=前4/2,255,255);
A11:=IF(主4>=前4/2,0,0);
A12:=IF(主4>=前4/2,0,255);
DRAWRECTREL(0,40,MM*前4,70,RGB(0,250,250));
DRAWRECTREL(0,40,MM*主4,70,RGB(A10,A11,A12));
DRAWRECTREL(0,40,MM*ABS(主4-(前4-主4)),70,RGB(A12,255,00));
JO4:=CONST(“FSKY.JO4#DAY”);
JC4:=CONST(“FSKY.JC4#DAY”);
A13:=IF(主5>=前5/2,255,255);
A14:=IF(主5>=前5/2,0,0);
A15:=IF(主5>=前5/2,0,255);
DRAWRECTREL(0,0,MM*前5,30,RGB(0,250,250));
DRAWRECTREL(0,0,MM*主5,30,RGB(A13,A14,A15));
DRAWRECTREL(0,0,MM*ABS(主5-(前5-主5)),30,RGB(A15,255,00));
五纯%:=CONST(IF(1 ,”FSKY2.五纯%#DAY”,DRAWNULL)),NODRAW;
一纯%:=CONST(IF(1,”FSKY2.一纯%#DAY”,DRAWNULL)),NODRAW;
三纯%:=CONST(IF(1 ,”FSKY2.三纯%#DAY”,DRAWNULL)),NODRAW;

DRAWRECTREL(0,345,200,600,RGB(80,80,80));
DRAWTEXT_FIX(五纯%>=0,0.0,1-0.65,0,STRCAT(‘五日纯量%: ‘,CON2STR(五纯%,2))),COLORFFFFFF;
DRAWTEXT_FIX(五纯%<0,0.0,1-0.65,0,STRCAT(‘五日纯量%: ‘,CON2STR(五纯%,2))),COLORFFFF00;
DRAWTEXT_FIX(三纯%>=0,0.0,1-0.56,0,STRCAT(‘三日纯量%: ‘,CON2STR(三纯%,2))),COLORFFFFFF;
DRAWTEXT_FIX(三纯%<0,0.0,1-0.56,0,STRCAT(‘三日纯量%: ‘,CON2STR(三纯%,2))),COLORFFFF00;
DRAWTEXT_FIX(一纯%>=0,0.0,1-0.48,0,STRCAT(‘当日纯量%: ‘,CON2STR(一纯%,2))),COLORFFFFFF;
DRAWTEXT_FIX(一纯%<0,0.0,1-0.48,0,STRCAT(‘当日纯量%: ‘,CON2STR(一纯%,2))),COLORFFFF00;

声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。