Rss & SiteMap

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

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

标题:前根K阳线下根开多,前阴线下根开空。

1楼
qq代人发帖 发表于:2014/1/21 10:25:32

请教:前根K阳线下根开多,前阴线下根开空。我就是想测试下发单。
if  ref(c,1)>ref(o,1) then
begin
sellshort(1,1,thisclose);
buy(1,1,MARKET);
end

if ref(c,1)<ref(o,1) then
begin
sell(1,1,thisclose);
buyshort(1,1,market);
end
但实际执行时候,只能一直开多或一直开空,而不是根据前根阳或阴而变化,不明白是咋回事?

2楼
qq代人发帖 发表于:2014/1/21 10:31:46

您好,开平仓条件加上holding的限制。

if  ref(c,1)>ref(o,1) then
begin
sellshort(holding<0,1,thisclose);
buy(holding=0,1,MARKET);
end

if ref(c,1)<ref(o,1) then
begin
sell(holding>0,1,thisclose);
buyshort(holding=0,1,market);
end

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


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