Rss & SiteMap

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

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

标题:简单模型编写

1楼
longwuchi 发表于:2017/6/30 13:52:58
3分钟图
早上开盘第一根k线为阳线,限价做多1手
为阴线,限价做空1手

多单止损10点  止盈5点
空单止损10点,止盈5点

尾盘清仓;

咋写,最好 能测试 能直接模拟用




2楼
banzhuan 发表于:2017/6/30 14:36:52
if c>o  and time<=093300  then buy(1,1,limit,c);
if c<o  and time<=093300  then buyshort(1,1,limit,c);

sell((c-enterprice)>=5 and holding>0,1,market);
sell((c-enterprice)<=10 and holding>0,1,market);
sellshort((enterprice-c)>=5 and holding<0,1,market);
sellshort((c-enterprice)<=10 and holding>0,1,market);

if time>=145900 then 
  begin
  sell(holding>0,1,market);
  sellshort(holding<0,1,market);
  end 
共2 条记录, 每页显示 10 条, 页签: [1]


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