以文本方式查看主题 - 金字塔客服中心 - 专业程序化交易软件提供商 (http://weistock.com/bbs/index.asp) -- 公式模型编写问题提交 (http://weistock.com/bbs/list.asp?boardid=4) ---- 老师, 帮忙编个程序 (http://weistock.com/bbs/dispbbs.asp?boardid=4&id=90761) |
-- 作者:qushi -- 发布时间:2016/1/27 14:34:04 -- 老师, 帮忙编个程序 日内策略:看一分钟K线.下午14:00后,如果突破了当天的最高点 就做多,(有夜盘的 从晚上开盘到第二天上午都算当天) 一直留到收盘最后一分钟前(14:59)平仓.止损点数为开仓价格的0.5%.比如4000开仓做多,止损就是3980. 每天就一笔交易,做空相反. |
-- 作者:jinzhe -- 发布时间:2016/1/27 14:45:14 -- 每天就一笔交易
只多空加起来一笔还是多空各一笔 |
-- 作者:qushi -- 发布时间:2016/1/27 14:55:26 -- 加起来 就一笔, |
-- 作者:jinzhe -- 发布时间:2016/1/27 15:06:51 -- 看一分钟K线.下午14:00后,如果突破了当天的最高点 就做多,(有夜盘的 从晚上开盘到第二天上午都算当天) 一直留到收盘最后一分钟前(14:59)平仓.止损点数为开仓价格的0.5%.比如4000开仓做多,止损就是3980. 每天就一笔交易,做空相反.
variable:n=0; if time>=180000 and time<185900 and h>ref(hhv(h,todaybar),1) and holding=0 and n=0 then begin buy(holding=0,1,marketr); n:=1; end
if time>=180000 and time<185900 and l<ref(llv(l,todaybar),1) and holding=0 and n=0 then begin buyshort(holding=0,1,marketr); n:=1; end
if time>=180000 and time<185900 and holding>0 and c<=enterprice*(1-0.05) then sell(1,0,marketr); if time>=180000 and time<185900 and holding<0 and c>=enterprice*(1+0.05) then sellshort(1,0,marketr);
if time=190000 then begin sell(1,0,marketr); sellshort(1,0,marketr); n:=0; end |
-- 作者:qushi -- 发布时间:2016/1/27 15:21:19 -- 怎么我测试你这个没有数据啊,并且我加载图标程序化,也不现实信号 |
-- 作者:qushi -- 发布时间:2016/1/27 15:25:24 -- 已经买了你们软件,麻烦写好,我直接能用,每次下单一个品种用100万的成交额 |
-- 作者:jinzhe -- 发布时间:2016/1/27 15:26:36 -- 测试的是什么品种? 当前的最后一根k线时间是15:00还是19:00? [此贴子已经被作者于2016/1/27 15:26:41编辑过]
|
-- 作者:qushi -- 发布时间:2016/1/27 15:32:01 -- 我测试了股指连续 |
-- 作者:qushi -- 发布时间:2016/1/27 15:33:34 -- 是不是有夜盘的,跟没夜盘的品种要分开来测? |
-- 作者:jinzhe -- 发布时间:2016/1/27 15:34:59 -- 前面用户讲有夜盘,我就按照夜盘写了,希望用户测试时不要用股指去测试,这样会没有效果 |