Rss & SiteMap

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

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

标题:日内交易当天连亏3次停止交易,隔天继续怎么写?

1楼
小布丁 发表于:2012/2/29 16:32:40

buycond:=ref(c>ma(c,10),1)  and time<144000;

sellcond:=ref(c<ma(c,10),1) and time<144000;

if holding>0 and sellcond then sell(1,1,market);

if holding<0 and buycond then sellshort(1,1,market);

if holding=0 and buycond then buy(1,1,market);

if holding=0 and sellcond then buyshort(1,1,market);

if time>=145000 then begin

    sell(holding>0,1,market);

    sellshort(holding<0,1,market);

end

 

请问日内交易模型,如果当天信号连亏3次的时候,停止交易等到第二天再继续,应该怎么写?

2楼
just 发表于:2012/2/29 17:20:49
参考函数NUMLOSSTRADE
共2 条记录, 每页显示 10 条, 页签: [1]


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