Rss & SiteMap

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

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

标题:麻烦看一下这个公式,出现解释错误

1楼
yuezongqi 发表于:2011/7/5 15:39:09

老师,我的意思是,close 上穿 均线就开多单,下穿 就开空,200点作为止损点,只有碰到止损点就反手。

运行的时候,说第五行,错误:解释错误

input:N(20,1,1000,5),STOPLOSS(200,100,1000,20);
ma1:=ma(close,n);
if  cross(close,ma1) and  then
   begin
      sellshort(holding<0,1,thisclose);
      buy(holding<=0 ,1,thisclose);     
   end
if  cross(ma1,close) and then
   begin
      sell(holding>0,1,thisclose);
      buyshort(holding>=0,1,thisclose);
   end  
if  holding>0 and Low<=enterprice-Stoploss  then
    begin
       sell(1,Low);
       buyshort(1,Low);
    end
if  holding<0 and High>=enterprice-Stoploss then
    begin
       sellshort(1,High);
       buy(1,High);
    end   

2楼
jinzhe 发表于:2011/7/5 16:05:22

if cross(close,ma1)以及if cross(ma1,close)后面多了and

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


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