您现在的位置:好股网 >> 股票公式 >> 通达信公式 >> 一键转帖:一分钟配套主副图《【涨停分时主图】,【大额分析】(改进版)》(源码,配图)

一分钟配套主副图《【涨停分时主图】,【大额分析】(改进版)》(源码,配图)


指标功能:[B]国产软件[/B]
指标类型:简体中文
所需积分:0
推荐星级:
授权方式:共享版
公式大小:0 Bytes
更新时间:2011-05-15 08:17:00
公式简介:

强掉一点:【涨停分时主图】是一分钟主图。可与改进后的【大额分析】

建立个指标模块使用。不准,大体上也可以检视当天资金进出情况。


{涨停分时主图 LONG(24,1,100),SHORT(13,1,100),M(6,1,100),N(6,1,100);}
RCC:=DYNAINFO( 3);
S2:=SMA(C,3,1);
S6:=SMA(C,5,1);
KK:=1;
TT:=FROMOPEN;
RC:=DYNAINFO( 3);
SS2:=SMA(C,2,1);
SS6:=SMA(C,6,1);
DK:=2*(S2-S6);
DK1:=CONST(HHV(RC+DK,TT+1));
DK2:=CONST(LLV(RC+DK,TT+1));
DC1:=CONST(HHV(C,TT+1));
DC2:=CONST(LLV(C,TT+1));
MMA:=CONST(MAX(DC1,DK1));
MMB:=CONST(MIN(DC2,DK2));

{时间设置}
V1:=TIME;
A1:=COUNT(BARSCOUNT(C)=1 AND TIME<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)));
TTT:=INTPART(2*T/5);
P:=IF(TT<120,4,10);
P2:=IF(TT<120,20,30);
STICKLINE(C>0,H,L,6,1),COLOR000000;
STICKLINE(CURRBARSCOUNT<TT+1,MMB,MMA,4,1),COLORFF0000;


{CYC}
VAR1:=AMOUNT/VOL/100;
VAR2:=(3*HIGH+LOW+OPEN+2*CLOSE)/7;
VAR3:=SUM(AMOUNT,5)/VAR1/100;
VAR4:=SUM(AMOUNT,13)/VAR1/100;
VAR5:=SUM(AMOUNT,34)/VAR1/100;
CYC5:=DMA(VAR2,VOL/VAR3);
CYC13:=DMA(VAR2,VOL/VAR4);
CYC34:=DMA(VAR2,VOL/VAR5);
DRAWBAND(CYC5,RGB(50,120,120),CYC13,DRAWNULL);
DRAWBAND(CYC13,RGB(0,150,150),CYC34,DRAWNULL);
{分时MACD}
昨收:=DYNAINFO( 3);
HH:=DYNAINFO(5);
LL:=DYNAINFO(6);
FK:=MAX(HH-昨收,昨收-LL)*0.1;
ZS:=昨收-FK*3.2;
Q1:=昨收-FK*3.22;
Q2:=昨收-2*FK*3.22;
Q3:=昨收-3*FK*3.2;
MA5:=MA(CLOSE,5);
MA10:=MA(CLOSE,10);
MA20:=MA(CLOSE,20);
MA30:=MA(CLOSE,30);
DIF:=(EMA(CLOSE,SHORT) - EMA(CLOSE,LONG));
DEA:=(EMA(DIF,M));
MACD:=5*(DIF-DEA);
A4:=BARSLAST(REF(CROSS(DIF,DEA),1));
B1:=REF(C,A4+1)>C AND REF(DIF,A4+1)<DIF AND CROSS(DIF,DEA);
{DRAWTEXT(FILTER(B1>0,5),RCC*KK-0.03*RCC*KK,'背离'),COLORYELLOW;}
STICKLINE(MACD>=0 AND MACD>=REF(MACD,1),RCC*KK,MACD*4+RCC*KK,3,0),COLORFF00FF,LINETHICK3;
STICKLINE(MACD>=0 AND MACD< REF(MACD,1),RCC*KK,MACD*4+RCC*KK,3,0),COLORBLUE,LINETHICK3;
STICKLINE(MACD<0 AND MACD>=REF(MACD,1),RCC*KK,MACD*4+RCC*KK,3,0),COLOR4ABEFF,LINETHICK3;
STICKLINE(MACD<0 AND MACD< REF(MACD,1),RCC*KK,MACD*4+RCC*KK,3,0),COLORBLUE,LINETHICK3;
STICKLINE(DK>0,RCC*KK,RCC*KK+DK,0,1),COLORRED;
STICKLINE(DK<0,RCC*KK,RCC*KK+DK,0,1),COLORCYAN;
分时线:C,COLORFFFFFF,LINETHICK2;
AA1:=REF(分时线,P)=HHV(分时线,2*P+1);
BB1:=FILTER(AA1,P);
CC1:=BACKSET(BB1,P+1);
DD1:=FILTER(CC1,P);{高点}
AA2:=REF(分时线,P)=LLV(分时线,2*P+1);
BB2:=FILTER(AA2,P);
CC2:=BACKSET(BB2,P+1);
DD2:=FILTER(CC2,P);{低点}
QA1:=REF(分时线,P2)=HHV(分时线,P2+1);
QB1:=FILTER(QA1,P2);
QC1:=BACKSET(QB1,P2+1);
QD1:=FILTER(QC1,P2);{高点2}
QA2:=REF(分时线,P2)=LLV(分时线,2*P2+1);
QB2:=FILTER(QA2,P2);
QC2:=BACKSET(QB2,P+1);
QD2:=FILTER(QC2,P2);{低点};
R11:=BACKSET(ISLASTBAR,BARSLAST(DD1)+1);
S11:=R11>REF(R11,1);
QR11:=BACKSET(ISLASTBAR,BARSLAST(QD1)+1);
QS11:=QR11>REF(QR11,1);
压力线:=DRAWLINE(DD1,分时线,S11,分时线,1),COLORYELLOW;
压力线2:=DRAWLINE(QD1,分时线,QS11,分时线,1),COLORGREEN;
压力线3:=DRAWLINE(QS11,分时线,DD1,分时线,1),COLORWHITE;
IF(BETWEEN(压力线,MMA,MMB),压力线,DRAWNULL),COLORRED,LINETHICK1;
IF(BETWEEN(压力线2,MMA,MMB),压力线2,DRAWNULL),COLORGREEN,LINETHICK1;
IF(BETWEEN(压力线3,MMA,MMB),压力线3,DRAWNULL),COLORWHITE,LINETHICK1;
T11:=BACKSET(ISLASTBAR,BARSLAST(DD2)+1);
U11:=T11>REF(T11,1);
QT11:=BACKSET(ISLASTBAR,BARSLAST(QD2)+1);
QU11:=QT11>REF(QT11,1);
支撑线:=DRAWLINE(DD2,分时线,U11,分时线,1),COLORYELLOW;
支撑线2:=DRAWLINE(QD2,分时线,QU11,分时线,1),COLORGREEN;
支撑线3:=DRAWLINE(QU11,分时线,DD2,分时线,1),COLORWHITE;
IF(BETWEEN(支撑线,MMA,MMB),支撑线,DRAWNULL),COLORRED,LINETHICK1;
IF(BETWEEN(支撑线2,MMA,MMB),支撑线2,DRAWNULL),COLORGREEN,LINETHICK1;
IF(BETWEEN(支撑线3,MMA,MMB),支撑线3,DRAWNULL),COLORWHITE,LINETHICK1;
DRAWICON(DD1,分时线,2);
DRAWICON(DD2,分时线,1);
HHH:=CONST(HHV(H,160));
LLL:=CONST(LLV(L,160));
MM0:=CONST((HHH+LLL)/2);
HL:=CONST(IF(MM0<CONST(REF(C,160)),LLL+(HHH-LLL)*0.20,HHH-(HHH-LLL)*0.20));
HH1:=IF(MM0>CONST(REF(C,160)),HHH-(HHH-LLL)*0.1,HL);
LL1:=IF(MM0<CONST(REF(C,160)),LLL+(HHH-LLL)*0.1,HL);
HLMAX:=MAX(HH1,LL1);
HLMIN:=MIN(HH1,LL1);
HLMN1:=(HLMAX+HLMIN)/2;
HLMN2:=HLMAX-HLMIN;
HLMN3:=1;
HLMN4:=2;
DRAWTEXT(CURRBARSCOUNT=55,(MMB+(MMA-MMB)/10),'换手:')COLOR00FFFF;
DRAWNUMBER(CURRBARSCOUNT=40,(MMB+(MMA-MMB)/10),CONST(DYNAINFO(37))*100)COLOR00FFFF;
DRAWTEXT(CURRBARSCOUNT=55,(MMB+(MMA-MMB)/10*2),'涨幅:');
DRAWNUMBER(CURRBARSCOUNT=40,(MMB+(MMA-MMB)/10*2),CONST(DYNAINFO(14))*100)COLORFF00FF;
变色用:DRAWNUMBER(CURRBARSCOUNT=40,(MMB+(MMA-MMB)/10*2),IF(CONST(DYNAINFO(14)*100)<=0,CONST(DYNAINFO(14)*100),DRAWNULL))COLOR00DD00;
DRAWTEXT(CURRBARSCOUNT=55,(MMB+(MMA-MMB)/10*3),'量比:')COLORFF00FF;
DRAWNUMBER(CURRBARSCOUNT=40,(MMB+(MMA-MMB)/10*3),CONST(DYNAINFO(17)))COLORFF00FF;

====================================================================
====================================================================

{【大额分析】 TDX分时用}
L1:=(CLOSE-LLV(LOW,6))/(HHV(HIGH,6)-LLV(LOW,6))*100;
龙K:=SMA(L1,3,1)*100,COLORBBFFBB;
凤D:=SMA(龙K,3,1),COLORBBFFBB;
NN:=120;
HH:=HHV(AMOUNT,NN);
LL:=LLV(AMOUNT,NN);
最高:=CONST(HH);
最低:=CONST(LL);
RCC:=最高*0.9-(最高-最低)*0.5;
RHL:=RCC;
HLMAX:=最高;
HLMIN:=最低;
HLMN1:=(HLMAX+HLMIN)/2;
HLMN2:=HLMAX-HLMIN;
HLMN3:=(100-0)/2*1.3;
HLMN4:=(100-0)/1*1.3;
DRAWBAND(((龙K-HLMN3)*HLMN2/HLMN4+HLMN1),RGB(80,80,20),((凤D-HLMN3)*HLMN2/HLMN4+HLMN1),RGB(50,80,20));
TTT:=IF(ISLASTBAR,240/FROMOPEN,1);
HLP:=SMA(WINNER(C)*100,3,1),COLOR2588FF,LINETHICK0;
TJ:=FILTER(C,239)>0,NODRAW;
TJJ:=SUM(TJ,0),NODRAW;
LTA:=FINANCE(7)+300000000;
C1:=CLOSE;
V1:=TIME;
A1:=COUNT(BARSCOUNT(C)=1 AND TIME<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;
总_亿OR百万:=SUM(AMOUNT,T)/1000000,NODRAW;
总亿OR万:总_亿OR百万*100;
VV3:=总_亿OR百万*1000000/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;
线位:大额线/10000,NODRAW;

初正1:=IF(T=1 AND DYNAINFO(4)>=DYNAINFO(3),总_亿OR百万*1000000,0);
初负1:=IF(T=1 AND DYNAINFO(4)<DYNAINFO(3),总_亿OR百万*1000000,0);
初正:=CONST(SUM(IF(初正1>=大额线 AND T=1,初正1,0),T)),NODRAW;
初负:=CONST(SUM(IF(初负1>=大额线 AND T=1,初负1,0),T)),NODRAW;
初正2:=CONST(SUM(IF(初正1<大额线 AND T=1,初正1,0),T)),NODRAW;
初负2:=CONST(SUM(IF(初负1<大额线 AND T=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=1 OR (TT=0 AND TT1<TT2),成交,0),NODRAW;
负V1:=IF(TT=-1 OR (TT=0 AND TT1>TT2),成交,0),NODRAW;
正负0:=IF(成交!= 0 AND (正V1=0 AND 负V1=0),成交,0);
正V0:=IF(正负0!= 0 AND REF(正V1,1)!= 0 ,正负0,0);
负V0:=IF(正负0!= 0 AND REF(负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))/1000000,NODRAW,COLOR0000FF;
大负总:=(IF(TJJ<2,初负,0)+SUM(负V,T))/1000000,NODRAW,COLOR00FF00;
大净:(大正总-大负总),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;
大额线*100,COLOR00FFFF;
STICKLINE(TT=1 OR 正V0!= 0,0,AMOUNT*100,1,1),COLOR0000FF;
STICKLINE(TT=-1 OR 负V0!= 0,0,AMOUNT*100,1,0),COLOR00FF00;
STICKLINE(TT=0 AND TT1<TT2,0,AMOUNT*100,1,1),COLOR00FFFF;
STICKLINE(TT=0 AND TT1>TT2,0,AMOUNT*100,1,0),COLORFF0000;
STICKLINE(正V>大额线,0,AMOUNT*100,1,1),COLORFF00FF;
STICKLINE(负V>大额线,0,AMOUNT*100,1,0),COLORFFFFFF;
STICKLINE(T=1 AND 初正1>0,0,初正1*100,1,0),COLOR00FFFF;
STICKLINE(T=1 AND 初负1>0,0,初负1*100,1,0),COLORFF0000;
STICKLINE(T=1 AND 初正>0,0,初正*100,1,0),COLORFF00FF;
STICKLINE(T=1 AND 初负>0,0,初负*100,1,0),COLORFFFFFF;
 


 


 


[url=http://www.goodgupiao.com/gupiaogongshi/13766.html][B]一分钟配套主副图《【涨停分时主图】,【大额分析】(改进版)》(源码,配图)[/B][/url]