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


金字塔客服中心 - 专业程序化交易软件提供商金字塔软件公式模型编写问题提交 → 请问怎么解决反手不开仓的问题

   

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


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

主题:请问怎么解决反手不开仓的问题

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


加好友 发短信
等级:论坛游侠 帖子:334 积分:0 威望:0 精华:0 注册:2013/8/29 9:26:12
  发帖心情 Post By:2013/11/18 15:54:31    Post IP:222.210.224.31[只看该作者]

谢谢老师,我改过来了,如果加上移动止赢变量,麻烦老师再看看下面的公式格式和逻辑对不对?谢谢!

variable:ydzy=1;                 //移动止盈开关
variable:highprice=0,lowprice=0; //记录开仓价

if kd  then begin
   sellshort(1,0,limitr,c);
   buy(holding=0,1,limitr,c);
   highprice:=enterprice; 
end
 
if kk  then begin
   sell(1,0,limitr,c);
   buyshort(holding=0,1,limitr,c);
   lowprice:=enterprice;
end
 
if pd or enterprice-c>=10 then sell(1,0,limitr,c);
if pk or c-enterprice>=10 then sellshort(1,0,limitr,c);

if ydzy=1 and holding<>0 then begin
   if h>highprice then highprice:=h;
   if (highprice-enterprice>=49 and highprice-h>=6) or (highprice-enterprice>=19 and h-enterprice<=17) then sell(1,0,limitr,c);
   if l<lowprice then lowprice:=l;
   if (enterprice-lowprice>=30 and l-lowprice>=16) or (enterprice-lowprice>=19 and enterprice-l<=13) then sellshort(1,0,limitr,c);
end


 回到顶部
总数 21 1 2 3 下一页