以文本方式查看主题 - 金字塔客服中心 - 专业程序化交易软件提供商 (http://weistock.com/bbs/index.asp) -- 公式模型编写问题提交 (http://weistock.com/bbs/list.asp?boardid=4) ---- 关于股票T+1平仓的问题 (http://weistock.com/bbs/dispbbs.asp?boardid=4&id=90723) |
-- 作者:一叶知秋 -- 发布时间:2016/1/26 13:52:50 -- 关于股票T+1平仓的问题 股票是T+1的,只能隔天平仓 代码这样写 T:=time<143000 and time>093000; if T then begin if 开仓 then begin buy(holding=0,100,market); n1:=date; end end if T then begin if 平仓 and n1>=n1+1 then begin // sell(1,0,market); n1:=0; end end 测试有错误,隔天平仓 应该怎么写才正确
|
-- 作者:一叶知秋 -- 发布时间:2016/1/26 13:53:34 -- 建仓周期是 半小时的 |
-- 作者:jinzhe -- 发布时间:2016/1/26 14:02:10 -- T:=time<143000 and time>093000; 开仓:h=hhv(h,3); 平仓:l=llv(l,3); if T then begin if 开仓 and holding=0 then begin buy(holding=0,100,market); n1:=date; end end if T then begin if 平仓 and date>=n1+1 and holding>0 then begin // sell(1,0,market); n1:=0; end end |