老师您好,请教一下画线的问题 [文华财经]
-
咨询内容:
我想在软件上的15分钟K线图上,按照天为界限,每天在开盘的K线上画一条竖线,然后在每天的高点和低点标准数字1,2,3,4.按照4天为一个周期,这个要怎么才能用函数实现?如果碰到周6日,在周一前加多一条线,这个可以实现吗?
就好像图这样的竖线
文件名:微信图片_20190730151407.png来源:程序化99
-
文华技术人员:
核实一下
例如第一天,高点低点K线都标注1,下一天都标注2,1234这样循环?
来源: WWW.CXH99.COM
-
文华客服:
不是的老师,我的想法是4天内数字不重复,123456一直下去,能实现吗?
-
网友回复:
这么试下:
AA:MOD(COUNT(DAYBARPOS=1,BARPOS),4),NODRAW; VERTLINE(CROSS(AA=0,0.5),COLORRED); VERTLINE(CROSS(AA=1,0.5),COLORGREEN); VERTLINE(CROSS(AA=2,0.5),COLORMAGENTA); VERTLINE(CROSS(AA=3,0.5),COLORYELLOW); HH4:CROSS(BACKSET( REFX(CROSS(AA=0,0.5),1),HHVBARS(H,DAYBARPOS)+1),0.5),NODRAW; LL4:CROSS(BACKSET( REFX(CROSS(AA=0,0.5),1),LLVBARS(L,DAYBARPOS)+1),0.5),NODRAW; HH3:CROSS(BACKSET( REFX(CROSS(AA=1,0.5),1),HHVBARS(H,DAYBARPOS)+1),0.5),NODRAW; LL3:CROSS(BACKSET( REFX(CROSS(AA=1,0.5),1),LLVBARS(L,DAYBARPOS)+1),0.5),NODRAW; HH2:CROSS(BACKSET( REFX(CROSS(AA=2,0.5),1),HHVBARS(H,DAYBARPOS)+1),0.5),NODRAW; LL2:CROSS(BACKSET( REFX(CROSS(AA=2,0.5),1),LLVBARS(L,DAYBARPOS)+1),0.5),NODRAW; HH1:CROSS(BACKSET( REFX(CROSS(AA=3,0.5),1),HHVBARS(H,DAYBARPOS)+1),0.5),NODRAW; LL1:CROSS(BACKSET( REFX(CROSS(AA=3,0.5),1),LLVBARS(L,DAYBARPOS)+1),0.5),NODRAW; DRAWNUMBER( COUNT(HH4||LL4,DAYBARPOS)=1&&(HH4||LL4),IF(HH4,H,L),7,0,COLORYELLOW); DRAWNUMBER( COUNT(HH4||LL4,DAYBARPOS)=2&&(HH4||LL4),IF(HH4,H,L),8,0,COLORYELLOW); DRAWNUMBER( COUNT(HH3||LL3,DAYBARPOS)=1&&(HH3||LL3),IF(HH3,H,L),1,0,COLORRED); DRAWNUMBER( COUNT(HH3||LL3,DAYBARPOS)=2&&(HH3||LL3),IF(HH3,H,L),2,0,COLORRED); DRAWNUMBER( COUNT(HH2||LL2,DAYBARPOS)=1&&(HH2||LL2),IF(HH2,H,L),3,0,COLORGREEN); DRAWNUMBER( COUNT(HH2||LL2,DAYBARPOS)=2&&(HH2||LL2),IF(HH2,H,L),4,0,COLORGREEN); DRAWNUMBER( COUNT(HH1||LL1,DAYBARPOS)=1&&(HH1||LL1),IF(HH1,H,L),5,0,COLORMAGENTA); DRAWNUMBER( COUNT(HH1||LL1,DAYBARPOS)=2&&(HH1||LL1),IF(HH1,H,L),6,0,COLORMAGENTA);
有思路,想编写各种指标公式,程序化交易模型,选股公式,预警公式的朋友
相关文章
-
没有相关内容