通达信分时图3根日K线主图+近三日能量公式

[复制链接]
查看107 | 回复0 | 2022-6-27 23:30:35 | 显示全部楼层 |阅读模式

 写个三天的K线图 ,谢谢!!!

 
通达信分时图3根日K线主图+近三日能量公式
步骤:
 
首先:
 
1:建立引用公式名字 : FSKY
 
 
今量:VOL;
昨量:REF(VOL,1);
前量:REF(VOL,2);
昨开:REF(O,1);
昨收:REF(C,1);
前开:REF(O,2);
前收:REF(C,2);
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);
 
2:以上引用指标独立创建一个指标, 下面是分时主图指标同时创建主图叠加指标 
名字:分时主图
前量:="FSKY.前量#DAY";
昨量:="FSKY.昨量#DAY";
今量:="FSKY.今量#DAY";
前总:=前量;
昨总:=昨量;
总:=今量,NODRAW;
BMM:=MAX(前总,昨总);
AMM:=IF(总/BMM>2,BMM*3,BMM);
MM:=200/AMM;
KP:=DYNAINFO(4);
ZX:=DYNAINFO(7);
A1:=IF(ZX>=KP,355,0);
A2:=IF(ZX>=KP,0,355);
A3:=IF(ZX>=KP,0,0);
DRAWRECTREL(0,80,MM*今量,110,RGB(A1,A2,A3));
昨开:="FSKY.昨开#DAY";
昨收:="FSKY.昨收#DAY";
A4:=IF(昨收>=昨开,355,0);
A5:=IF(昨收>=昨开,0,355);
A6:=IF(昨收>=昨开,0,0);
DRAWRECTREL(0,40,MM*昨量,70,RGB(A4,A5,A6));
前开:="FSKY.前开#DAY";
前收:="FSKY.前收#DAY";
A7:=IF(前收>=前开,355,0);
A8:=IF(前收>=前开,0,355);
A9:=IF(前收>=前开,0,0);
DRAWRECTREL(0,0,MM*前量,30,RGB(A7,A8,A9));
KP:=DYNAINFO(4);
ZS:=DYNAINFO(3);
ZG:=DYNAINFO(5);
ZD:=DYNAINFO(6);
OP:=500-(KP/ZS-1)*4000;
CL:=500-(ZX/ZS-1)*4000;
HI:=500-(ZG/ZS-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S-1)*4000;
CL:=500-(ZX/ZS-1)*4000;
HI:=500-(ZG/ZS-1)*4000;
LO:=500-(ZD/ZS-1)*4000;
N1:=IF(TIME>=130000 OR TIME<91500,360,900);
DRAWRECTREL(N1+4,OP,N1+8,HI,RGB(350,0,350));
DRAWRECTREL(N1+4,CL,N1+8,LO,RGB(0,355,0));
Q1:=IF(ZX>=KP,350,0);
Q2:=IF(ZX>=KP,0,350);
Q3:=IF(ZX>=KP,0,0);
DRAWRECTREL(N1-10,OP,N1+22,CL,RGB(Q1,Q2,Q3));
ZO:="FSKY.ZO#DAY";
ZC:="FSKY.ZC#DAY";
ZH:="FSKY.ZH#DAY";
ZL:="FSKY.ZL#DAY";
ZKP:=500-(ZO/ZS-1)*4000;
ZCP:=500-(ZC/ZS-1)*4000;
ZZG:=500-(ZH/ZS-1)*4000;
ZZD:=500-(ZL/ZS-1)*4000;
DRAWRECTREL(N1-36,ZKP,N1-32,ZZG,RGB(355,0,355));
DRAWRECTREL(N1-36,ZCP,N1-32,ZZD,RGB(0,355,0));
Q4:=IF(ZC>=ZO,355,0);
Q5:=IF(ZC>=ZO,0,355);
Q6:=IF(ZC>=ZO,0,0);
DRAWRECTREL(N1-49,ZKP,N1-17,ZCP,RGB(Q4,Q5,Q6));
JO:="FSKY.JO#DAY";
JC:="FSKY.JC#DAY";
JH:="FSKY.JH#DAY";
JL:="FSKY.JL#DAY";
ZZKP:=500-(JO/ZS-1)*4000;
ZZCP:=500-(JC/ZS-1)*4000;
ZZZG:=500-(JH/ZS-1)*4000;
ZZZD:=500-(JL/ZS-1)*4000;
DRAWRECTREL(N1-76,ZZKP,N1-72,ZZZG,RGB(355,0,355));
DRAWRECTREL(N1-76,ZZCP,N1-72,ZZZD,RGB(0,355,0));
Q7:=IF(JC>=JO,355,0);
Q8:=IF(JC>=JO,0,355);
Q9:=IF(JC>=JO,0,0);
DRAWRECTREL(N1-89,ZZKP,N1-57,ZZCP,RGB(Q7,Q8,Q9));
 
3:在分时调出分时主图  就可以显示3日K线图如下:(不会搞的可以下载下面附件引入通达信)

p20161312211255106.jpg

p20161312211255106.jpg

2016131221658776.rar

3.21 KB, 下载次数: 0

售价: 4 金钱  [记录]  [购买]

2016131221658776.rar

回复

使用道具 举报

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

本版积分规则