以文本方式查看主题 - 金字塔客服中心 - 专业程序化交易软件提供商 (http://weistock.com/bbs/index.asp) -- 公式模型编写问题提交 (http://weistock.com/bbs/list.asp?boardid=4) ---- 提前N秒下单 (http://weistock.com/bbs/dispbbs.asp?boardid=4&id=144250) |
-- 作者:tanyongde -- 发布时间:2016/12/7 13:23:22 -- 提前N秒下单 阿火提前N秒下单用于固定时间间隔,还是走完K线? ma5:=ma(c,5); ma10:=ma(c,10); input:tq(5,3,60,1); abb:=(time0-timetot0(dynainfo(207))<=tq) or not(islastbar); if abb then begin if holding>0 and ma5<ma10 then sell(1,1,thisclose); if holding<0 and ma5>ma10 then sellshort(1,1,thisclose); if holding=0 and ma5>ma10 then buy(1,1,thisclose); if holding=0 and ma5<ma10 then buyshort(1,1,thisclose); end
|
-- 作者:jinzhe -- 发布时间:2016/12/7 13:23:55 -- 必须是固定时间间隔 |
-- 作者:tanyongde -- 发布时间:2016/12/7 13:45:34 -- 谢谢!! |