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


金字塔客服中心 - 专业程序化交易软件提供商金字塔软件公式模型编写问题提交 → 帮忙看下这个问题在哪里

   

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


  共有7053人关注过本帖平板打印复制链接

主题:帮忙看下这个问题在哪里

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


加好友 发短信 量化投资
等级:论坛游民 帖子:148 积分:653 威望:0 精华:0 注册:2010/9/27 16:08:27
帮忙看下这个问题在哪里  发帖心情 Post By:2011/11/3 16:57:42    Post IP:58.60.218.112[只看该作者]

帮忙看下这个问题在哪里 ,越改问题越多,图上好多小白开仓信号,

 

1:希望再帮忙修改每天正反只能个开一次

2:我写的止损条件好像图中显示的并不正确,本来是当开仓价格回碰当天开盘价止损。

万分感谢
runmode:0;

dayopen:=valuewhen(date<>ref(date,1),o);
 
enterlongcond:=high>=dayopen;
entershortcond:=low<=dayopen;

exittime:=time>=1458;

if holding=0 and time>1015 then begin
   if enterlongcond then
   buy(1,1,limitr,close+mindiff);
   if entershortcond then
   buyshort(1,1,limitr,close-mindiff);
end


if holding>0 and time>1015  then begin
   exitlongcond:=enterprice<=dayopen;
   if exitlongcond  then
   sell(1,holding,limitr,dayopen);
  
   if enterlongcond and enterbars>=1 then
   sell(1,holding,limitr,close-mindiff);
   buyshort(1,1,limitr,close-mindiff);

  
   if exittime then
   sell(1,holding,limitr,o);
   end
  
if holding<0 and time>1015 then begin
   exitshortcond:=enterprice>=dayopen;
   if exitshortcond then
    sellshort(1,holding,limitr,dayopen);
  
   if entershortcond and enterbars>=1  then
   sellshort(1,holding,limitr,closse+mindiff);
   buy(1,1,limitr,close+mindiff);
 
  
   if exittime then
   sellshort(1,holding,limitr,o);
   end
/
资产:asset-500000,noaxis,coloryellow,linethick2;
盈亏:(asset-500000)/500000,linethick0;
胜率:PERCENTWIN,linethick0;


 回到顶部
总数 20 1 2 下一页