格子改编 [文华财经]
-
咨询内容:
老师新年好!麻烦你把下面网格指标没改成文华
等差网格主图公式源码(通达信软件):DRAWKLINE(H,O,L,C);
区间顶部:CONST(HHV(H,区间周期)),COLORYELLOW;
区间底部:CONST(LLV(L,区间周期)),COLORGREEN;
区间:区间顶部-区间底部,NODRAW;
区间跌幅:(区间顶部-区间底部)/区间顶部*100,NODRAW;
格子大小:C*网格百分比/100,NODRAW;
格子幅度:网格百分比,NODRAW;
格子数:INTPART(区间/格子大小),NODRAW;
当前格子:INTPART((C-区间底部)/格子大小),NODRAW;
底仓份数:格子数-当前格子,NODRAW;
收盘价:CONST(C),COLORWHITE;
STICKLINE(CURRBARSCOUNT=1, 区间底部,区间顶部,0,1),COLORWHITE;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0,0,0,' 等差网格交易建仓辅助'),COLORYELLOW;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0,0.05,0,' 区间顶:' ),COLORYELLOW;
DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.05,0.05,0, 区间顶部),COLORYELLOW;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0,0.1,0,' 区间底:' ),COLORYELLOW;
DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.05,0.1,0, 区间底部),COLORYELLOW;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0,0.15,0,' 格子幅度(百分比):' ),COLORYELLOW;
DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.12,0.15,0, 格子幅度),COLORYELLOW;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0,0.2,0,' 格子数:' ),COLORYELLOW;
DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.05,0.2,0, 格子数),COLORYELLOW;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.3,0.05,0,' 总资金份数' ),COLORYELLOW;
DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.38,0.05,0, 格子数),COLORYELLOW;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.3,0.1,0,' 当前格子' ),COLORYELLOW;
DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.38,0.1,0, 当前格子),COLORYELLOW;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.3,0.15,0,' 底仓份数'),COLORYELLOW;
DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.38,0.15,0, 底仓份数),COLORYELLOW;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.3,0.2,0,' 格子大小' ),COLORYELLOW;
DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.38,0.2,0, 格子大小),COLORYELLOW;
DRAWTEXT_FIX(1,0.00,0.90,0,'【所属地区】:')COLOR00FFFF;
DRAWTEXT_FIX(1,0.08,0.90,0,DYBLOCK)COLOR00FFFF;
DRAWTEXT_FIX(1,0.00,0.99,0,'【所属行业】:')COLORYELLOW;
DRAWTEXT_FIX(1,0.08,0.99,0,HYBLOCK)COLORYELLOW;
需要设置参数
元通等差网格需要设置参数,参看图示否则源码会通不过:网格百分比 最小2,最大50,默认5
区间周期 最小60 最大1000 默认120;
来源:程序化99
- 文华技术人员: 来源:程序化99
- 文华技术人员:DRAWTEXT_FIX 、 来源:程序化99
-
文华技术人员:DRAWNUMBER_FIX 等函数无法修改已为您删除。
其余参考:
DRAWKLINE1(H,O,L,C);区间周期:=120;网格百分比:=5;区间顶部:REFX1(HHV(H,区间周期),10000),COLORYELLOW;区间底部:REFX1(LLV(L,区间周期),10000),COLORGREEN;
区间:区间顶部-区间底部,NODRAW;
区间跌幅:(区间顶部-区间底部)/区间顶部*100,NODRAW;
格子大小:C*网格百分比/100,NODRAW;
格子幅度:网格百分比,NODRAW;
格子数:INTPART(区间/格子大小),NODRAW;
当前格子:INTPART((C-区间底部)/格子大小),NODRAW;
底仓份数:格子数-当前格子,NODRAW;
收盘价:REFX1(C,10000),COLORWHITE;CURRBARSCOUNT:=DATACOUNT-BARPOS+1;STICKLINE1(CURRBARSCOUNT=1, 区间底部,区间顶部,0,1),COLORWHITE;来源: WWW.CXH99.COM
-
文华客服:
老师,导入后没网格,能不能指标生成网格,每个网格横线标上数字,有利于交易。
另外请问老师,这个一模一样的策略文华7能不能实现自动交易。谢谢! -
网友回复:
您具体说下网格是如何定义的?
您的源码中含有未来函数,另外wh7是看盘软件,无法实现自动交易。 量化交易需要使用wh8软件,wh8是付费软件,文华官网下载:
www.wenhua.com.cn - 网友回复: 指标涨跌幅5%生成网格,每个网格横线标上数字,有利于交
有思路,想编写各种指标公式,交易模型,选股公式,还原公式的朋友
可联系技术人员 QQ: 262069696 或微信号:cxh99cxh99 进行 有偿收费 编写!
(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)
相关文章
-
没有相关内容