欢迎使用金字塔普通技术服务论坛,您可以在相关区域发表技术支持贴。
我司技术服务人员将优先处理 VIP客服论坛 服务贴,普通区问题处理速度慢,请耐心等待。谢谢您对我们的支持与理解。


金字塔客服中心 - 专业程序化交易软件提供商金字塔软件公式模型编写问题提交 → 麻烦看一下这个公式,出现解释错误

   

欢迎使用金字塔普通技术服务论坛,您可以在相关区域发表技术支持贴。
我司技术服务人员将优先处理 VIP客服论坛 服务贴,普通区问题处理速度慢,请耐心等待。谢谢您对我们的支持与理解。    


  共有5235人关注过本帖树形打印复制链接

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

帅哥哟,离线,有人找我吗?
yuezongqi
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:新手上路 帖子:3 积分:16 威望:0 精华:0 注册:2011/6/30 16:10:07
麻烦看一下这个公式,出现解释错误  发帖心情 Post By:2011/7/5 15:39:09    Post IP:218.240.150.114[显示全部帖子]

老师,我的意思是,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   


 回到顶部