找回密码
 立即注册

QQ登录

只需一步,快速开始

广告载入中...
查看: 1666|回复: 12

分时主图显示最近五个交易日K线和成交量

[复制链接]
发表于 2016-3-20 11:05 | 显示全部楼层 |阅读模式

马上注册,享用更多功能,让你轻松玩转本论坛。

您需要 登录 才可以下载或查看,没有账号?立即注册

×
因为要在分时图上画5个交易日的K线和成交量 所以先麻烦您建立引用“分时K线引用”所以名字固定为
fsky
引用公式内容

V1:REF(HSL,1)*10;
V2:REF(HSL,2)*10;
V3:REF(HSL,3)*10;
V4:REF(HSL,4)*10;
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);
JC5:REF(C,5);

建好上面的引用请退出该公式  再建下面分时主图

{分时主图}








N:=500;
M:=250;
N2:=150;
KP:=DYNAINFO(4);
ZX:=DYNAINFO(7);
ZS:=DYNAINFO(3);
ZG:=DYNAINFO(5);
ZD:=DYNAINFO(6);
OP:=100-(KP/ZS-1)*1000;
CL:=100-(ZX/ZS-1)*1000;
HI:=100-(ZG/ZS-1)*1000;
LO:=100-(ZD/ZS-1)*1000;
N1:=950;
Q:=IF(ZX>KP,RGB(255,0,0),IF(ZX<KP,RGB(84,255,255),IF(ZX=KP,RGB(255,255,255),DRAWNULL)));
DRAWRECTREL(N1+4,HI,N1+7,LO,Q );
DRAWRECTREL(N1,OP,N1+12,CL,Q );
ZO:="FSKY.ZO#DAY";
ZC:="FSKY.ZC#DAY";
ZH:="FSKY.ZH#DAY";
ZL:="FSKY.ZL#DAY";
JC:="FSKY.JC#DAY";
ZKP:=100-(ZO/JC-1)*1000;
ZCP:=100-(ZC/JC-1)*1000;
ZZG:=100-(ZH/JC-1)*1000;
ZZD:=100-(ZL/JC-1)*1000;
Q1:=IF(ZC>ZO,RGB(255,0,0),IF(ZC<ZO,RGB(84,255,255),IF(ZC=ZO,RGB(255,255,255),DRAWNULL)));
DRAWRECTREL(N1-10,ZZG,N1-7,ZZD,Q1);
DRAWRECTREL(N1-14,ZKP,N1-2,ZCP,Q1);
JO:="FSKY.JO#DAY";
JC3:="FSKY.JC3#DAY";
JH:="FSKY.JH#DAY";
JL:="FSKY.JL#DAY";
ZZKP:=100-(JO/JC3-1)*1000;
ZZCP:=100-(JC/JC3-1)*1000;
ZZZG:=100-(JH/JC3-1)*1000;
ZZZD:=100-(JL/JC3-1)*1000;
Q2:=IF(JC>JO,RGB(255,0,0),IF(JC<JO,RGB(84,255,255),IF(JC=JO,RGB(255,255,255),DRAWNULL)));
DRAWRECTREL(N1-21,ZZZG,N1-18,ZZZD,Q2);
DRAWRECTREL(N1-26,ZZKP,N1-14,ZZCP,Q2);
JO3:="FSKY.JO3#DAY";
JC4:="FSKY.JC4#DAY";
JH3:="FSKY.JH3#DAY";
JL3:="FSKY.JL3#DAY";
ZZKP3:=100-(JO3/JC4-1)*1000;
ZZCP3:=100-(JC3/JC4-1)*1000;
ZZZG3:=100-(JH3/JC4-1)*1000;
ZZZD3:=100-(JL3/JC4-1)*1000;
Q3:=IF(JC3>JO3,RGB(255,0,0),IF(JC3<JO3,RGB(84,255,255),IF(JC3=JO3,RGB(255,255,255),DRAWNULL)));
DRAWRECTREL(N1-34,ZZZG3,N1-30,ZZZD3,Q3);
DRAWRECTREL(N1-39,ZZKP3,N1-26,ZZCP3,Q3);
JO4:="FSKY.JO4#DAY";
JC5:="FSKY.JC5#DAY";
JH4:="FSKY.JH4#DAY";
JL4:="FSKY.JL4#DAY";
ZZKP4:=100-(JO4/JC5-1)*1000;
ZZCP4:=100-(JC4/JC5-1)*1000;
ZZZG4:=100-(JH4/JC5-1)*1000;
ZZZD4:=100-(JL4/JC5-1)*1000;
Q4:=IF(JC4>JO4,RGB(255,0,0),IF(JC4<JO4,RGB(84,255,255),IF(JC4=JO4,RGB(255,255,255),DRAWNULL)));
DRAWRECTREL(N1-47,ZZZG4,N1-44,ZZZD4,Q4);
DRAWRECTREL(N1-51,ZZKP4,N1-39,ZZCP4,Q4);
T1:=IF(ZX>KP OR (ZX=KP AND ZX>=ZS),RGB(255,0,0),RGB(84,255,255));
T2:=IF(ZC>ZO OR (ZC=ZO AND ZC>=JC),RGB(255,0,0),RGB(84,255,255));
T3:=IF(JC>JO OR (JC=JO AND JC>=JC3),RGB(255,0,0),RGB(84,255,255));
T4:=IF(JC3>JO3 OR (JC3=JO3 AND JC3>=JC4),RGB(255,0,0),RGB(84,255,255));
T5:=IF(JC4>JO4 OR (JC4=JO4 AND JC4>=JC5),RGB(255,0,0),RGB(84,255,255));
DRAWRECTREL(N1+2,N2-(HSL#DAY*10/N2-1)*M,N1+10,N,T1);
DRAWRECTREL(N1-12,N2-("FSKY.V1#DAY"/N2-1)*M,N1,N,T2);
DRAWRECTREL(N1-24,N2-("FSKY.V2#DAY"/N2-1)*M,N1-10,N,T3);
DRAWRECTREL(N1-36,N2-("FSKY.V3#DAY"/N2-1)*M,N1-22,N,T4);
DRAWRECTREL(N1-48,N2-("FSKY.V4#DAY"/N2-1)*M,N1-34,N,T5);

本帖被以下淘专辑推荐:

发表于 2016-3-20 14:52 | 显示全部楼层
学分不够啊,好郁闷啊
回复

使用道具 举报

发表于 2016-3-20 23:08 | 显示全部楼层
JJ:=(CLOSE+HIGH+LOW)/3;
A:=EMA(JJ,10);
B:=REF(A,1);
STICKLINE(A>B ,A ,B ,1 ,0 ),COLORRED;
STICKLINE(A<B ,B ,A ,1 ,0 ),COLORGREEN;
MA3:MA(CLOSE,3),COLORGRAY;
M19:MA(CLOSE,19),COLOR00FF00,LINETHICK1;
VAR1:=EMA(CLOSE,15);
VAR2:=EMA(CLOSE,60);
红多:=(CLOSE-VAR1)*2/(15+1)+VAR1,LINETHICK2, COLORRED;
VAR3:=(CLOSE-VAR2)*2/(60+1)+VAR2;
蓝空:=IF(红多>VAR3,VAR3,红多),LINETHICK2,COLORGREEN;
生命线:VAR3,LINETHICK1, COLORYELLOW;
回复

使用道具 举报

发表于 2016-12-5 23:26 | 显示全部楼层
谢谢分享,好好学习。
回复

使用道具 举报

发表于 2017-9-14 22:15 | 显示全部楼层
谢谢楼主分享
回复

使用道具 举报

发表于 2018-1-6 11:46 | 显示全部楼层
谢谢楼主的分享, 要多看看楼主的帖子,多向您学习!
回复

使用道具 举报

发表于 2018-1-17 21:42 | 显示全部楼层
谢谢分享,好好学习。
回复

使用道具 举报

发表于 2018-5-6 19:20 | 显示全部楼层
谢谢楼主分享,辛苦了!
回复

使用道具 举报

发表于 2018-5-7 08:19 | 显示全部楼层
求楼主科普科普这个分时主图的用法
回复

使用道具 举报

发表于 2021-11-25 00:57 | 显示全部楼层
{顶底侯}
JJ:=(CLOSE+HIGH+LOW)/3;
A:=EMA(JJ,10);
B:=REF(A,1);
STICKLINE(A>B ,A ,B ,1 ,0 ),COLORRED;
STICKLINE(A<B ,B ,A ,1 ,0 ),COLORGREEN;
MA3:MA(CLOSE,3),COLORGRAY;
M19:MA(CLOSE,19),COLOR00FF00,LINETHICK1;
VAR1:=EMA(CLOSE,15);
VAR2:=EMA(CLOSE,60);
红多:=(CLOSE-VAR1)*2/(15+1)+VAR1,LINETHICK2, COLORRED;
VAR3:=(CLOSE-VAR2)*2/(60+1)+VAR2;
蓝空:=IF(红多>VAR3,VAR3,红多),LINETHICK2,COLORGREEN;
生命线:VAR3,LINETHICK1, COLORYELLOW;
回复

使用道具 举报

发表于 2021-11-25 01:13 | 显示全部楼层

{顶底侯}
JJ:=(CLOSE+HIGH+LOW)/3;
A:=EMA(JJ,10);
B:=REF(A,1);
STICKLINE(A>B ,A ,B ,1 ,0 ),COLORRED;
STICKLINE(A<B ,B ,A ,1 ,0 ),COLORGREEN;
MA3:MA(CLOSE,3),COLORGRAY;
M19:MA(CLOSE,19),COLOR00FF00,LINETHICK1;
VAR1:=EMA(CLOSE,15);
VAR2:=EMA(CLOSE,60);
红多:=(CLOSE-VAR1)*2/(15+1)+VAR1,LINETHICK2, COLORRED;
VAR3:=(CLOSE-VAR2)*2/(60+1)+VAR2;
蓝空:=IF(红多>VAR3,VAR3,红多),LINETHICK2,COLORGREEN;
生命线:VAR3,LINETHICK1, COLORYELLOW;
回复

使用道具 举报

发表于 2021-11-25 01:55 | 显示全部楼层
JJ:=(CLOSE+HIGH+LOW)/3;
A:=EMA(JJ,10);
B:=REF(A,1);
STICKLINE(A>B ,A ,B ,1 ,0 ),COLORRED;
STICKLINE(A<B ,B ,A ,1 ,0 ),COLORGREEN;
MA3:MA(CLOSE,3),COLORGRAY;
M19:MA(CLOSE,19),COLOR00FF00,LINETHICK1;
VAR1:=EMA(CLOSE,15);
VAR2:=EMA(CLOSE,60);
红多:=(CLOSE-VAR1)*2/(15+1)+VAR1,LINETHICK2, COLORRED;
VAR3:=(CLOSE-VAR2)*2/(60+1)+VAR2;
蓝空:=IF(红多>VAR3,VAR3,红多),LINETHICK2,COLORGREEN;
生命线:VAR3,LINETHICK1, COLORYELLOW;
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|股海明灯官网 ( 京ICP备18020431号 )

GMT+8, 2024-11-22 01:05 , Processed in 0.113398 second(s), Total 16, Slave 14 queries , Gzip On, MemCached On.

Powered by Discuz! X3.5

Copyright © 2001-2024 Tencent Cloud.

快速回复 返回顶部 返回列表