您现在的位置:好股网 >> 股票公式 >> 通达信公式 >> 一键转帖:黄金分时---黄金分割+10天k线+5天量的分时主图(主副图 源码 图片 说明 12贺年完稿版)

黄金分时---黄金分割+10天k线+5天量的分时主图(主副图 源码 图片 说明 12贺年完稿版)


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

完稿基本在不压缩分时价的前提上 解决了K波动大就会压缩的问题 现在基本上估价10天之内在35%之内波动都不会再压缩K

基本上可以从日分析图中解放 在分时方便你看盘 完稿还增加了实战应用
量从上到下分别为 5 4 3 2 天之前的量 最下面是今天的量 其中今天的量为黄色主买量 红色或者青色为今天的总量 盘中才会出现的灰色为预测量 量的变化一目了然
日k可以看到10天的 里面的颜色小横线从长到短 分别是绿色60线 蓝色20线 黄色10线 白色5线 配合副图 可以看到均线的价格
方便你看盘的同时可以帮助判断k线的形态 了解价格的变化 判断主力的动向
欢迎高手指点 你的顶帖是美德也是我发源码的动力 谢谢

先建立引用的指标公式 指标名为(FSKY)
然后再建立分时主图指标公式 指标名自己定

不会装的同学就直接下载导入安装 文件在图片最后

引用指标源码:
{FSKY}
预测量:IF(CURRBARSCOUNT=1 AND PERIOD=5,VOL*240/FROMOPEN,VOL);
VAR1:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN));
主买:IF(CLOSE>OPEN,VAR1*(HIGH-LOW),IF(CLOSE<OPEN,VAR1*((HIGH-OPEN)+(CLOSE-LOW)),VOL/2));
今量:VOL;
昨量:REF(VOL,1);
前量:REF(VOL,2);
前4:REF(VOL,3);
前5:REF(VOL,4);
ZO:REF(O,1);
ZC:REF(C,1);
ZH:REF(H,1);
ZL:REF(L,1);
JO:REF(O,2);
JC:REF(C,2);
JH:REF(H,2);
JL:REF(L,2);
JO3:REF(O,3);
JC3:REF(C,3);
JH3:REF(H,3);
JL3:REF(L,3);
JO4:REF(O,4);
JC4:REF(C,4);
JH4:REF(H,4);
JL4:REF(L,4);
JO5:REF(O,5);
JC5:REF(C,5);
JH5:REF(H,5);
JL5:REF(L,5);
JO6:REF(O,6);
JC6:REF(C,6);
JH6:REF(H,6);
JL6:REF(L,6);
JO7:REF(O,7);
JC7:REF(C,7);
JH7:REF(H,7);
JL7:REF(L,7);
JO8:REF(O,8);
JC8:REF(C,8);
JH8:REF(H,8);
JL8:REF(L,8);
JO9:REF(O,9);
JC9:REF(C,9);
JH9:REF(H,9);
JL9:REF(L,9);
MA5:MA(C,5);
MA10:MA(C,10);
MA20:MA(C,20);
MA60:MA(C,60);
上涨家数:INDEXADV;
下跌家数:INDEXDEC;

分时主图源码:
{黄金分割}
HH:=CONST(HHV(C,0));
LL:=CONST(LLV(C,0));
HL:=HH-LL;
A76:=0.764*HL+LL,COLORCYAN,POINTDOT;
A61:=0.618*HL+LL,COLORCYAN,POINTDOT;
A38:=0.382*HL+LL,COLORCYAN,POINTDOT;
A23:=0.236*HL+LL,COLORCYAN,POINTDOT;
A51:=0.495*HL+LL,COLORCYAN,POINTDOT;
A52:=0.505*HL+LL,COLORCYAN,POINTDOT;
DRAWBAND(HH,RGB(0,30,30),A76,RGB(0,30,30));
DRAWBAND(A23,RGB(0,30,30),LL,RGB(0,30,30));
DRAWBAND(A76,RGB(100,30,100),A61,RGB(100,30,100));
DRAWBAND(A38,RGB(100,30,100),A23,RGB(100,30,100));
DRAWBAND(A61,RGB(100,90,0),A38,RGB(100,90,0));
DRAWBAND(A51,RGB(180,100,100),A52,RGB(180,100,100));
DRAWTEXT(CURRBARSCOUNT=240,HH*0.999,'高'),COLORCYAN;
DRAWTEXT(CURRBARSCOUNT=240,LL*1.001,'低'),COLORMAGENTA;
DRAWTEXT(CURRBARSCOUNT=240,A76,'压'),COLORCYAN;
DRAWTEXT(CURRBARSCOUNT=240,A23,'撑'),COLORMAGENTA;
DRAWTEXT(CURRBARSCOUNT=240,A52,'中'),COLOR00FFFF;
{分时量}
预测量:="FSKY.预测量#DAY";
主买:="FSKY.主买#DAY";
前量:="FSKY.前量#DAY";
昨量:="FSKY.昨量#DAY";
今量:="FSKY.今量#DAY";
前4:="FSKY.前4#DAY";
前5:="FSKY.前5#DAY";
前总:=前量;
昨总:=昨量;
总:=今量,NODRAW;
BMM:=MAX(前总,昨总);
AMM:=IF(总/BMM>2,BMM*3,BMM);
MM:=500/AMM;
KP:=DYNAINFO(4);
ZX:=DYNAINFO(7);
A1:=IF(ZX>=KP,255,0);
A2:=IF(ZX>=KP,0,255);
A3:=IF(ZX>=KP,0,255);
DRAWRECTREL(0,160,MM*预测量,190,RGB(90,90,90));
DRAWRECTREL(0,160,MM*今量,190,RGB(A1,A2,A3));
DRAWRECTREL(0,160,MM*主买,190,RGB(250,250,280));
ZO:="FSKY.ZO#DAY";
ZC:="FSKY.ZC#DAY";
A4:=IF(ZC>=ZO,255,0);
A5:=IF(ZC>=ZO,0,255);
A6:=IF(ZC>=ZO,0,255);
DRAWRECTREL(0,120,MM*昨量,150,RGB(A4,A5,A6));
JO:="FSKY.JO#DAY";
JC:="FSKY.JC#DAY";
A7:=IF(JC>=JO,255,0);
A8:=IF(JC>=JO,0,255);
A9:=IF(JC>=JO,0,255);
DRAWRECTREL(0,80,MM*前量,110,RGB(A7,A8,A9));
JO3:="FSKY.JO3#DAY";
JC3:="FSKY.JC3#DAY";
A10:=IF(JC3>=JO3,255,0);
A11:=IF(JC3>=JO3,0,255);
A12:=IF(JC3>=JO3,0,255);
DRAWRECTREL(0,40,MM*前4,70,RGB(A10,A11,A12));
JO4:="FSKY.JO4#DAY";
JC4:="FSKY.JC4#DAY";
A13:=IF(JC4>=JO4,255,0);
A14:=IF(JC4>=JO4,0,255);
A15:=IF(JC4>=JO4,0,255);
DRAWRECTREL(0,0,MM*前5,30,RGB(A13,A14,A15));
{分时K}
ZS:=DYNAINFO(3);
ZG:=DYNAINFO(5);
ZD:=DYNAINFO(6);
OP:=500-(KP/ZS-1)*1200;
CL:=500-(ZX/ZS-1)*1200;
HI:=500-(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ZZKP3:=500-(JO3/ZS-1)*1200;
ZZCP3:=500-(JC3/ZS-1)*1200;
ZZZG3:=500-(JH3/ZS-1)*1200;
ZZZD3:=500-(JL3/ZS-1)*1200;
Z10:=IF(JC3>=JO3,255,0);
Z11:=IF(JC3>=JO3,0,255);
Z12:=IF(JC3>=JO3,0,255);
DRAWRECTREL(N1-55,ZZZG3,N1-55,ZZZD3,RGB(Z10,Z11,Z12));
Q10:=IF(JC3>=JO3,255,0);
Q11:=IF(JC3>=JO3,0,255);
Q12:=IF(JC3>=JO3,0,255);
DRAWRECTREL(N1-65,ZZKP3,N1-45,ZZCP3,RGB(Q10,Q11,Q12));
JH4:="FSKY.JH4#DAY";
JL4:="FSKY.JL4#DAY";
ZZKP4:=500-(JO4/ZS-1)*1200;
ZZCP4:=500-(JC4/ZS-1)*1200;
ZZZG4:=500-(JH4/ZS-1)*1200;
ZZZD4:=500-(JL4/ZS-1)*1200;
Z13:=IF(JC4>=JO4,255,0);
Z14:=IF(JC4>=JO4,0,255);
Z15:=IF(JC4>=JO4,0,255);
DRAWRECTREL(N1-85,ZZZG4,N1-85,ZZZD4,RGB(Z13,Z14,Z15));
Q13:=IF(JC4>=JO4,255,0);
Q14:=IF(JC4>=JO4,0,255);
Q15:=IF(JC4>=JO4,0,255);
DRAWRECTREL(N1-95,ZZKP4,N1-75,ZZCP4,RGB(Q13,Q14,Q15));
JO5:="FSKY.JO5#DAY";
JC5:="FSKY.JC5#DAY";
JH5:="FSKY.JH5#DAY";
JL5:="FSKY.JL5#DAY";
ZZKP5:=500-(JO5/ZS-1)*1200;
ZZCP5:=500-(JC5/ZS-1)*1200;
ZZZG5:=500-(JH5/ZS-1)*1200;
ZZZD5:=500-(JL5/ZS-1)*1200;
Z16:=IF(JC5>=JO5,255,0);
Z17:=IF(JC5>=JO5,0,255);
Z18:=IF(JC5>=JO5,0,255);
DRAWRECTREL(N1-115,ZZZG5,N1-115,ZZZD5,RGB(Z16,Z17,Z18));
Q16:=IF(JC5>=JO5,255,0);
Q17:=IF(JC5>=JO5,0,255);
Q18:=IF(JC5>=JO5,0,255);
DRAWRECTREL(N1-125,ZZKP5,N1-105,ZZCP5,RGB(Q16,Q17,Q18));
JO6:="FSKY.JO6#DAY";
JC6:="FSKY.JC6#DAY";
JH6:="FSKY.JH6#DAY";
JL6:="FSKY.JL6#DAY";
ZZKP6:=500-(JO6/ZS-1)*1200;
ZZCP6:=500-(JC6/ZS-1)*1200;
ZZZG6:=500-(JH6/ZS-1)*1200;
ZZZD6:=500-(JL6/ZS-1)*1200;
Z19:=IF(JC6>=JO6,255,0);
Z20:=IF(JC6>=JO6,0,255);
Z21:=IF(JC6>=JO6,0,255);
DRAWRECTREL(N1-145,ZZZG6,N1-145,ZZZD6,RGB(Z19,Z20,Z21));
Q19:=IF(JC6>=JO6,255,0);
Q20:=IF(JC6>=JO6,0,255);
Q21:=IF(JC6>=JO6,0,255);
DRAWRECTREL(N1-155,ZZKP6,N1-135,ZZCP6,RGB(Q19,Q20,Q21));
JO7:="FSKY.JO7#DAY";
JC7:="FSKY.JC7#DAY";
JH7:="FSKY.JH7#DAY";
JL7:="FSKY.JL7#DAY";
ZZKP7:=500-(JO7/ZS-1)*1200;
ZZCP7:=500-(JC7/ZS-1)*1200;
ZZZG7:=500-(JH7/ZS-1)*1200;
ZZZD7:=500-(JL7/ZS-1)*1200;
Z22:=IF(JC7>=JO7,255,0);
Z23:=IF(JC7>=JO7,0,255);
Z24:=IF(JC7>=JO7,0,255);
DRAWRECTREL(N1-175,ZZZG7,N1-175,ZZZD7,RGB(Z22,Z23,Z24));
Q22:=IF(JC7>=JO7,255,0);
Q23:=IF(JC7>=JO7,0,255);
Q24:=IF(JC7>=JO7,0,255);
DRAWRECTREL(N1-185,ZZKP7,N1-165,ZZCP7,RGB(Q22,Q23,Q24));
JO8:="FSKY.JO8#DAY";
JC8:="FSKY.JC8#DAY";
JH8:="FSKY.JH8#DAY";
JL8:="FSKY.JL8#DAY";
ZZKP8:=500-(JO8/ZS-1)*1200;
ZZCP8:=500-(JC8/ZS-1)*1200;
ZZZG8:=500-(JH8/ZS-1)*1200;
ZZZD8:=500-(JL8/ZS-1)*1200;
Z25:=IF(JC8>=JO8,255,0);
Z26:=IF(JC8>=JO8,0,255);
Z27:=IF(JC8>=JO8,0,255);
DRAWRECTREL(N1-205,ZZZG8,N1-205,ZZZD8,RGB(Z25,Z26,Z27));
Q25:=IF(JC8>=JO8,255,0);
Q26:=IF(JC8>=JO8,0,255);
Q27:=IF(JC8>=JO8,0,255);
DRAWRECTREL(N1-215,ZZKP8,N1-195,ZZCP8,RGB(Q25,Q26,Q27));
JO9:="FSKY.JO9#DAY";
JC9:="FSKY.JC9#DAY";
JH9:="FSKY.JH9#DAY";
JL9:="FSKY.JL9#DAY";
ZZKP9:=500-(JO9/ZS-1)*1200;
ZZCP9:=500-(JC9/ZS-1)*1200;
ZZZG9:=500-(JH9/ZS-1)*1200;
ZZZD9:=500-(JL9/ZS-1)*1200;
Z28:=IF(JC9>=JO9,255,0);
Z29:=IF(JC9>=JO9,0,255);
Z30:=IF(JC9>=JO9,0,255);
DRAWRECTREL(N1-235,ZZZG9,N1-235,ZZZD9,RGB(Z28,Z29,Z30));
Q28:=IF(JC9>=JO9,255,0);
Q29:=IF(JC9>=JO9,0,255);
Q30:=IF(JC9>=JO9,0,255);
DRAWRECTREL(N1-245,ZZKP9,N1-225,ZZCP9,RGB(Q28,Q29,Q30));
MA5:="FSKY.MA5#DAY";
XMA5:=500-(MA5/ZS-1)*1200;
DRAWRECTREL(N1+28,XMA5,N1+42,XMA5,RGB(255,255,255));
MA10:="FSKY.MA10#DAY";
XMA10:=500-(MA10/ZS-1)*1200;
DRAWRECTREL(N1+18,XMA10,N1+52,XMA10,RGB(250,250,280));
MA20:="FSKY.MA20#DAY";
XMA20:=500-(MA20/ZS-1)*1200;
DRAWRECTREL(N1+10,XMA20,N1+60,XMA20,RGB(0,0,255)),COLORC0C0C0;
MA60:="FSKY.MA60#DAY";
XMA60:=500-(MA60/ZS-1)*1200;
DRAWRECTREL(N1+0,XMA60,N1+70,XMA60,RGB(0,255,0)),COLOR808000;
阻力:REFDATE(REF(HHV(C,60),FROMOPEN-60),DATE)DOTLINE,COLORCYAN;
H1:=MAX(DYNAINFO(3),DYNAINFO(5));
L1:=MIN(DYNAINFO(3),DYNAINFO(6));
P1:=H1-L1;
阻力1:=L1+P1*7/8,COLOR663300,DOTLINE;
支撑:=L1+P1*0.5/8,COLOR663300,DOTLINE;
现价:=CLOSE;
DRAWTEXT(LONGCROSS(支撑,现价,2),支撑*0.999,'★'),COLORRED;
DRAWTEXT(LONGCROSS(现价,阻力1,2),现价,'★'),COLORCYAN;
输赢线:EMA(C,120),COLORBLACK,LINETHICK1;
分时均价线:SUM(C*V,240)/SUM(V,240),COLORYELLOW,LINETHICK1;
D:CLOSE,LINETHICK2,COLORWHITE;
TT:=BARSCOUNT(C);
ZZ:=SUM(AMOUNT,TT)/SUM(VOL*100,TT);
ZZ1:=BETWEEN(C/ZZ,1.05,0.95);
均线1:=IF(ZZ1=0,MA(C,TT),ZZ);
涨幅:=(C/DYNAINFO(3)-1)*100;
均线涨幅:=(均线1/DYNAINFO(3)-1)*100;
涨幅差:=涨幅-均线涨幅;
IF(涨幅差>4.5,C,DRAWNULL),COLORGREEN,LINETHICK5;
IF(涨幅差<-4.5,C,DRAWNULL),COLORRED,LINETHICK5;

分时副图源码:
MA5:="FSKY.MA5#DAY";
MA10:="FSKY.MA10#DAY";
MA20:="FSKY.MA20#DAY";
MA60:="FSKY.MA60#DAY";
DRAWTEXT_FIX(1,0.14,0,0,'5日:'),COLORMAGENTA;
DRAWTEXT_FIX(1,0.33,0,0,'10日:'),COLORMAGENTA;
DRAWTEXT_FIX(1,0.51,0,0,'20日:'),COLORMAGENTA;
DRAWTEXT_FIX(1,0.71,0,0,'60日:'),COLORMAGENTA;
DRAWNUMBER_FIX(1,0.19,0,0,CONST(MA5)),COLORYELLOW;
DRAWNUMBER_FIX(1,0.39,0,0,CONST(MA10)),COLORYELLOW;
DRAWNUMBER_FIX(1,0.58,0,0,CONST(MA20)),COLORYELLOW;
DRAWNUMBER_FIX(1,0.78,0,0,CONST(MA60)),COLORYELLOW;
获利1:=WINNER(C)*100,COLOR0033FF,NODRAW;
DRAWTEXT_FIX(1,0,0.35,0,'日获利盘:'),COLORMAGENTA;
DRAWNUMBER_FIX(1,0.12,0.35,0,CONST(获利1)),COLORYELLOW;
MA1:=MA(C,5);
角度MA1:=ATAN((MA1/REF(MA1,1)-1)*100)*180/3.1416;
DRAWTEXT_FIX(1,0.8,0.35,0,'5线角度:'),COLORMAGENTA;
DRAWNUMBER_FIX(1,0.91,0.35,0,CONST(角度MA1)),COLORYELLOW;
上涨家数:=IF(PERIOD=0 ,"FSKY.上涨家数#DAY",DRAWNULL),NODRAW;
下跌家数:=IF(PERIOD=0 ,"FSKY.下跌家数#DAY",DRAWNULL),NODRAW;
DRAWTEXT_FIX(1,0.200,1,0,STRCAT('上涨家数:',CON2STR(上涨家数,0))),COLORYELLOW;
DRAWTEXT_FIX(1,0.600,1,0,STRCAT('下跌家数:',CON2STR(下跌家数,0))),COLORYELLOW;
{成本}
Z,:=H-L;
CB:=AMOUNT/VOL/100;
DV1:=IF(Z,>0 AND C>CB, ((H-C)/(H-CB))*((H-C)/(H-CB))*((H-CB)/Z,*VOL) ,0);
UV1:=IF(Z,>0 AND C>CB, VOL-DV1 ,0);
UV2:=IF(Z,>0 AND C<CB, ((C-L)/(CB-L))*((C-L)/(CB-L))*((CB-L)/Z,*VOL) ,0);
DV2:=IF(Z,>0 AND C<CB, VOL-UV2 ,0);
UV3:=IF(Z,=0 AND C>REF(C,1), VOL,0);
DV3:=IF(Z,=0 AND C<REF(C,1), VOL,0);
UV:=UV1+UV2+UV3;
DV:=DV1+DV2+DV3;
CBX:((UV-DV)/VOL)/CAPITAL*1000000,NODRAW;
N:=5;
CH:=DYNAINFO(5);
CL:=DYNAINFO(6);
CO:=REF(C,N);
QJJ:=V/((CH-CL)*2-ABS(C-CO));
HSL:=IF(C!=CO,QJJ*(C-CO),0)/100;
LNGJ:=DMA(HSL,0.5);
LLJX:=EMA(LNGJ,3);
B:0,POINTDOT,COLORWHITE;
B1:SUM(LLJX,1),COLORCYAN;
B2:SUM(LLJX,2),COLORCYAN;
B3:SUM(LLJX,3),COLORCYAN;
B4:SUM(LLJX,4),COLORCYAN;
B5:SUM(LLJX,5),COLORCYAN;
H_L:=HHV(B5,240)-LLV(B5,240);
BL:=B1*1;
TJ1:=ABS(B2-B1)<=BL AND ABS(B3-B1)<=BL AND ABS(B4-B1)<=BL;
TJ2:=ABS(B5-B1)<=BL ;
TJ4:=B1>1.05*REF(B1,1) AND B3>1.05*REF(B3,1) AND B5>1.05*REF(B5,1);
选股:=FILTER(TJ1 AND TJ2 AND TJ4,5) ;
DRAWICON(选股,0-H_L*0.2,38);
GHYJKU:=BETWEEN((DCLOSE*1)/(SUM(AMOUNT,BARSCOUNT((DCLOSE*1)))/SUM(VOL*100,BARSCOUNT((DCLOSE*1)))),1.05,0.95);
VBNH:=IF(GHYJKU=0,MA((DCLOSE*1),BARSCOUNT((DCLOSE*1))),(SUM(AMOUNT,BARSCOUNT((DCLOSE*1)))/SUM(VOL*100,BARSCOUNT((DCLOSE*1)))));
DRAWICON(CROSS(EXPMA((DCLOSE/VBNH),20),1.02),0.1,41);
YC3:DRAWTEXT(CROSS(EXPMA((DCLOSE/VBNH),20),1.02),0.1,'拉'),COLORRED;
DRAWTEXT(CROSS(EXPMA((DCLOSE/VBNH),20),1.04),0.1,'板'),COLORRED;
 


 





 


[url=http://www.goodgupiao.com/gupiaogongshi/17214.html][B]黄金分时---黄金分割+10天k线+5天量的分时主图(主副图 源码 图片 说明 12贺年完稿版)[/B][/url]