股资源-股票学习站-学炒股-股票课程-炒股教程-分析选股指标-入门基础知识

 找回密码
 注册昵称

QQ登录

只需一步,快速开始

搜索
上一主题 下一主题

[飞狐] 日周月空心柱K线同显


    [-----复制链接-----]
楼主
 通达信源码安装路径:1,工具栏点击公式选项。2,弹出公式窗口点击新建。3,把源码复制到指标编辑器保存。4,回到K线图界面安装建立好的公式 || 2023-10-25 10:47:52

//n=2,2,100//
c1:="001.c1#week";
o1:="001.o1#week";
h1:="001.h1#week";
l1:="001.l1#week";
c2:="001.c1#MONTH";
o2:="001.o1#MONTH";
h2:="001.h1#MONTH";
l2:="001.l1#MONTH";
t1:=DAY=15ORDAY=16ORDAY=17ORDAY=18ORDAY=19
ORDAY=20ORDAY=21ORDAY=22ORDAY=23ORDAY=24;
t2:=FILTER(t1,10);
d:=DAY;
YQ:=if(D<REF(D,1),DAY,-1);
YD:=if(D>REFX(D,1),DAY,-1);
yj:=(c2>o2orc2=o2andc2>ref(c2,day));
STICKLINE(t2andyj,h2,c2,10,1)color3F7CFF;
STICKLINE(t2andyj,l2,o2,10,1)color3F7CFF;
STICKLINE(t2andnot(yj),h2,o2,10,1)ColorF38593;
STICKLINE(t2andnot(yj),l2,c2,10,1)ColorF38593;
partline(D>REF(D,1)andyj,c2)color3F7CFF;
partline(D>REF(D,1)andnot(yj),C2)ColorF38593;
partline(D>REF(D,1)andyj,O2)color3F7CFF;
partline(D>REF(D,1)andnot(yj),O2)ColorF38593;
stickline(YQ>0andyj,c2,o2,0.5,0)color3F7CFF;
stickline(YD>0andyj,c2,o2,0.5,0)color3F7CFF;
stickline(YQ>0andnot(yj),c2,o2,0.5,0)ColorF38593;
stickline(YD>0andnot(yj),c2,o2,0.5,0)ColorF38593;
STICKLINE(t2andyj,c2+(h2-c2)/n,o2-(o2-l2)/n,9.9,0)COLORBLACK;
STICKLINE(t2andnot(yj),c2-(c2-l2)/n,o2+(h2-o2)/n,9.9,0)COLORBLACK;


Z:=WEEKDAY;
Zd1:=if(Z>REF(Z,1),WEEKDAY,1);
ZQa:=if(Zd1<REF(Zd1,1),date,0);
T:=BARSLAST(ZQa)+1;
Zql:=LLV(DATE,T)LINETHICK0;
Zmh:=HHV(DATE,T)LINETHICK0;
ts1:=DATEDIFF(ZQl,Zmh)+1;
ts2:=if(ts1<7,ts1,1);
ts3:=BARSLAST(ts2<ref(ts2,1))+1;
z1:=min(ts1,ts3);
ZQa:=if(Z1<REF(Z1,1),z1,-1);
ZDa:=if(Z1>REFX(Z1,1),z1,-1);
zj:=(c1>o1orc1=o1andc1>ref(c1,z1));
partline(z1>REF(Z1,1)andzj,C1)Color9973FD,linethick2;
partline(Z1>REF(Z1,1)andzj,O1)Color9973FD,linethick2;
partline(Z1>REF(Z1,1)andnot(zj),C1)Color9DFC48,linethick2;
partline(Z1>REF(Z1,1)andnot(zj),O1)Color9DFC48,linethick2;
stickline(ZQa>0andzj,c1,o1,0.5,0)Color9973FD,linethick2;
stickline(ZDa>0andzj,c1,o1,0.5,0)Color9973FD,linethick2;
stickline(ZQa>0andnot(zj),c1,o1,0.5,0)Color9DFC48,linethick2;
stickline(ZDa>0andnot(zj),c1,o1,0.5,0)Color9DFC48,linethick2;

rj:=(c>oorc=oandc>ref(c,1));
stickline(rj,h,l,0.1,1),colorred;
stickline(rj,c,o,8,1),colorred;
stickline(not(rj),h,l,0.1,0),colorcyan;
stickline(not(rj),c,o,8,0),colorcyan;
ma5:ma(c,5);
ma10:ma(c,10);
ma30:ma(c,30);
ma60:ma(c,60);





回复

举报

QQ|

GMT+8, 2024-11-17 02:45

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