以文本方式查看主题 - 金字塔客服中心 - 专业程序化交易软件提供商 (http://222.73.7.161/bbs/index.asp) -- 公式模型编写问题提交 (http://222.73.7.161/bbs/list.asp?boardid=4) ---- 请管理帮个忙 (http://222.73.7.161/bbs/dispbbs.asp?boardid=4&id=63244) |
-- 作者:zm71212302 -- 发布时间:2014/3/28 12:07:19 -- 请管理帮个忙 n:=(取外部统计数值如果数值低于0.3则取0.3,最高不限); 止赢:检测真实账户实际持仓均价的盈利百分比大于n则止赢; 请帮忙将以上代码加入下面的交易模块中,更请优化一下开关仓代码,万分感谢!
清仓时间:= time>=112800 and time<=113000 or (time>=145800 and time<=150000); 开车时间:=time>090000 and time<112800 or (time>133000 and time<145800); tsell(tholding>0 and 平多 or 清仓时间,0,lmtc),orderqueue; tsellshort(tholding<0 and 平空 or 清仓时间,0,lmt,c),orderqueue; tbuy(tholding=0 and 开多 and 开仓时间,1,Lmt,c),orderqueue; tbuyshort(tholding=0 and 开空 and 开仓时间,1,Lmt,c),orderqueue; |
-- 作者:zm71212302 -- 发布时间:2014/3/28 12:17:49 -- 外部数值为变量S |
-- 作者:zm71212302 -- 发布时间:2014/3/28 12:34:24 -- 当前品种的当日震幅用什么函数? |
-- 作者:jinzhe -- 发布时间:2014/3/28 13:08:11 -- 振幅 DYNAINFO( 13) |
-- 作者:jinzhe -- 发布时间:2014/3/28 13:10:41 -- n:=if(s>=0.3,s,0.3); if tholding>0 and (dynainfo(7)-avgtenterprice)/avgtenterrpcie>n/100 then tsell(1,0,mkt); if tholding<0 and (avgtenterprice-dynainfo(7))/dynainfo(7)>n/100 then tsellshort(1,0,mkt); |
-- 作者:zm71212302 -- 发布时间:2014/3/28 13:29:33 -- avgtenterprice这是什么函数? |
-- 作者:zm71212302 -- 发布时间:2014/3/28 13:29:44 -- 先表示感谢
|
-- 作者:zm71212302 -- 发布时间:2014/3/28 13:31:01 -- TAVGENTERPRICE是它吗? |
-- 作者:jinzhe -- 发布时间:2014/3/28 13:49:29 -- 对的,后台均价写错了,不好意思 |