Rss & SiteMap

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

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

标题:[求助]为什么以上代码不执行平多信号??

1楼
zk7777777 发表于:2012/5/29 18:57:13


If c>ma(close,60) and ma(close,60)>REF(MA(C,60),1) then
 
 begin
 
Sellshort(holding<0,holding,thisclose);
 

Buy(holding=0,thisclose);
 

End
if enterprice<c then
begin
Sell(holding>0,holding,market)
end

 

为什么以上代码不执行平多信号??那个地方出错了?

 

请高手解释一下

2楼
myhcow 发表于:2012/5/29 19:28:50
if enterprice<c then 
begin
Sell(holding>0,holding,market)
end
这是止损信号?enterprice>c 
你知道不知道自己写的是什么意思?


If c>ma(close,60) and ma(close,60)>REF(MA(C,60),1) then 
 
 begin
 
Sellshort(holding<0,holding,thisclose); 平空
 

Buy(holding=0,thisclose);  开多
 

End


if enterprice>c  then 止损
begin
Sell(holding>0,holding,market)
end


应该还有平多开空的语句

3楼
zk7777777 发表于:2012/5/29 22:11:23
这是止损信号?enterprice>c 
你知道不知道自己写的是什么意思?

 

 

这个语句不对吗?我是想表现 当前为开多, 开仓价>当前收盘价(enterprice>c)为止损这个不对吗?

4楼
myhcow 发表于:2012/5/29 22:32:54
if enterprice<c then 
begin
Sell(holding>0,holding,market)
end

你的源代码,写反了
共4 条记录, 每页显示 10 条, 页签: [1]


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