Rss & SiteMap

金字塔客服中心 - 专业程序化交易软件提供商 http://www.weistock.com/bbs/

专业程序化软件提供商
共3 条记录, 每页显示 10 条, 页签: [1]
[浏览完整版]

标题:关于股票T+1平仓的问题

1楼
一叶知秋 发表于:2016/1/26 13:52:50
股票是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
测试有错误,隔天平仓 应该怎么写才正确
2楼
一叶知秋 发表于:2016/1/26 13:53:34
建仓周期是 半小时的 
3楼
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
共3 条记录, 每页显示 10 条, 页签: [1]


Powered By Dvbbs Version 8.3.0
Processed in 0.01563 s, 3 queries.