以文本方式查看主题 - 金字塔客服中心 - 专业程序化交易软件提供商 (http://weistock.com/bbs/index.asp) -- 公式模型编写问题提交 (http://weistock.com/bbs/list.asp?boardid=4) ---- 请帮我写个日内交易模型 (http://weistock.com/bbs/dispbbs.asp?boardid=4&id=25489) |
-- 作者:a290380438 -- 发布时间:2012/9/14 10:40:51 -- 请帮我写个日内交易模型 1,价在均价线以上开多单并平空单,价在均价线以下开空单并平多单,每次开仓帐面亏损超过1%时全部平仓止损,以此循环。 早上和下午开盘后3分钟内不进行交易,上午和下午收盘前3分钟全部平仓。 |
-- 作者:jinzhe -- 发布时间:2012/9/14 10:50:18 -- time1:= time>090300 and time<112700 or (time>133300 and time<145700); time:= time> 112700 and time<113000 or (time>145700 and time<150000); if c>均线 and time1 then begin sellshort(); buy(); end//价在均线上平空开多
if c<均线 and time1 then begin sell(); buyshort(); end//价在均线下平多开空
if c<0.99*enterprice and holding>0 then sell();//1%多头止损 if c>enterprice*1.01 and holding<0 then sellshort();//1%空头止损
if time2 then begin//收盘前平仓 sell(); sellshort(); end
|
-- 作者:a290380438 -- 发布时间:2012/9/14 17:40:12 -- 以上模型通不过啊!()括号内该怎样处理?还均线参数也帮我设好 |
-- 作者:a290380438 -- 发布时间:2012/9/14 17:41:25 -- 以上模型通不过啊!()括号内该怎样处理?还有均线参数也请帮我设好嘛。
|
-- 作者:王锋 -- 发布时间:2012/9/14 17:46:31 -- 客服只是将代码的逻辑给你写出来了,具体的下单细节需要自己学习,并进行改写 |
-- 作者:a290380438 -- 发布时间:2012/9/14 18:55:07 -- 下单条件就请先按照我文字描述编写就可是了,我自已不懂,没有办法编写完善。还请老师帮编写并通过测试后再发给我吧。谢谢了! |
-- 作者:王锋 -- 发布时间:2012/9/14 18:58:27 -- http://www.weistock.com/bbs/dispbbs.asp?boardid=9&Id=11048 新手,请仔细先从基础开始学起 |
-- 作者:a290380438 -- 发布时间:2012/10/2 11:42:17 -- 有2个问题请帮忙 请老师帮我把9月14日贴 日内模型中的时间和止损去掉,我需要用非日内测试历吏数据。
另外,请问金字塔怎样同时测试多品种收益?
谢谢! |
-- 作者:王锋 -- 发布时间:2012/10/2 12:00:57 -- 交易菜单->单策略程序化测评->第5步里, 添加你所有要测评的品种 |
-- 作者:a290380438 -- 发布时间:2012/10/2 18:41:58 -- 这个模型请帮我把日内时间限制和止损帮我去掉 以下这个模型请老师帮我把日内的时间限制和止损部分帮我去掉,我需用非日内测试历吏数据。谢谢!
time1:= time>090300 and time<112700 or (time>133300 and time<145700); time:= time> 112700 and time<113000 or (time>145700 and time<150000); if c>均线 and time1 then begin sellshort(); buy(); end//价在均线上平空开多
if c<均线 and time1 then begin sell(); buyshort(); end//价在均线下平多开空
if c<0.99*enterprice and holding>0 then sell();//1%多头止损 if c>enterprice*1.01 and holding<0 then sellshort();//1%空头止损
if time2 then begin//收盘前平仓 sell(); sellshort(); end
|