Rss & SiteMap

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

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

标题:给朋友编个程序

1楼
yhl99414 发表于:2014/12/25 21:57:55
 价格高于开盘价1个点时,做多,0.8个点止盈


价格低于开盘价1个点时,做空,0.8个点止盈



开仓后,不管是多还是空,都在止损1个点的位置反手,反手后止盈仍然是0.8个点。 

没有止损止盈则在收盘清仓。


2楼
jinzhe 发表于:2014/12/26 9:06:13

oo:=valuewhen(todaybar=1,open);

if h>oo+1 then buy(holding=0,1,market);

if l<oo-1 then buyshort(holding=0,1,market);

 

if holding>0 and h>enterprice+0.8 then sell(1,0,market);

 

if holding<0 and l<enterprice-0.8 then sellshort(1,0,market);

 

if holding>0 and l<enterprice-1 then begin

     sell(1,0,market);

     buyshort(holding=0,1,market);

end

 

if holding<0 and h>enterprice+1 then begin

    sellshort(1,0,market);

    buy(holding=0,1,market);

end

共2 条记录, 每页显示 10 条, 页签: [1]


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