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


金字塔客服中心 - 专业程序化交易软件提供商金字塔软件公式模型编写问题提交 → 求助 运用全局变量 实现 大盈利或连续亏损两次后停止交易一段时间

   

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


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

主题:求助 运用全局变量 实现 大盈利或连续亏损两次后停止交易一段时间

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


加好友 发短信
等级:论坛游侠 帖子:107 积分:0 威望:0 精华:0 注册:2014/11/10 9:11:27
  发帖心情 Post By:2015/4/27 14:14:28    Post IP:58.247.225.238[只看该作者]

回jinzhe版主 其实我的A3 B3 A4 B4 A5 B5平仓条件已经加了 持仓判断,我刚才在执行代码里又加了一次,编译正常   图形显示 又回到 没有修改的状态了

应该 还是    if numprofit(1)>12000 then begin
         m:=0;
         n:=1;
     end
     if numprofit(1)>0 then m:=0;
     if numprofit(1)<0 then m:=m+1;
   这句有冲突 请版主 再帮着看看

if a4 and tpcc=1 and holding>0 then BEGIN
  平多4:SELL(1,lots,MARKETR),orderqueue;
  tpcc:=0;
  debugfile('D:\590191352.txt', '平多4 %.0f',holding );
     if numprofit(1)>12000 then begin
         m:=0;
         n:=1;
     end
     if numprofit(1)>0 then m:=0;
     if numprofit(1)<0 then m:=m+1;
   
end


if a5 and tpcc=1  and holding>0  then BEGIN
  平多5:SELL(1,lots,MARKETR),orderqueue;
  tpcc:=0;
  debugfile('D:\590191352.txt', '平多5 %.0f',holding );
     if numprofit(1)>12000 then begin
     
         n:=1;
     end
     if numprofit(1)>0 then m:=0;
     if numprofit(1)<0 then m:=m+1;
end

if a6 and tpcc=1  and holding>0 then BEGIN
  平多6:SELL(1,lots,MARKETR),orderqueue;
  tpcc:=0;
  debugfile('D:\590191352.txt', '平多6 %.0f',holding );
  if numprofit(1)>12000 then begin
         m:=0;
         n:=1;
     end
     if numprofit(1)>0 then m:=0;
     if numprofit(1)<0 then m:=m+1;
end

if a3  and tpcc=1  and holding>0   then BEGIN
   止损平多3:SELL(1,lots,MARKETR),orderqueue;
  tpcc:=0;
  debugfile('D:\590191352.txt', '止损平多3 %.0f',holding );
     if numprofit(1)>12000 then begin
         m:=0;
         n:=1;
     end
     if numprofit(1)>0 then m:=0;
     if numprofit(1)<0 then m:=m+1;
end


if b4 and tpcc=2  and holding<0 then BEGIN
  平空4:SELLSHORT(1,lots,MARKETR),orderqueue;
  tpcc:=0;
  debugfile('D:\590191352.txt', '平空4 %.0f',holding );
     if numprofit(1)>12000 then begin
         m:=0;
         n:=1;
     end
     if numprofit(1)>0 then m:=0;
     if numprofit(1)<0 then m:=m+1;
end

if b5 and tpcc=2  and  holding<0 then BEGIN
  平空5:SELLSHORT(1,lots,MARKETR),orderqueue;
  tpcc:=0;
  debugfile('D:\590191352.txt', '平空5 %.0f',holding );
     if numprofit(1)>12000 then begin
         m:=0;
         n:=1;
     end
     if numprofit(1)>0 then m:=0;
     if numprofit(1)<0 then m:=m+1;
end

if b6 and tpcc=2  and  holding<0 then BEGIN
  平空6:SELLSHORT(1,lots,MARKETR),orderqueue;
  tpcc:=0;
  debugfile('D:\590191352.txt', '平空6 %.0f',holding );
     if numprofit(1)>12000 then begin
         m:=0;
         n:=1;
     end
     if numprofit(1)>0 then m:=0;
     if numprofit(1)<0 then m:=m+1;
end

if b3 and tpcc=2 and holding<0 then BEGIN
  止损平空3:SELLSHORT(1,lots,MARKETR),orderqueue;
  tpcc:=0;
  debugfile('D:\590191352.txt', '平空3 %.0f',holding );
     if numprofit(1)>12000 then begin
         m:=0;
         n:=1;
     end
     if numprofit(1)>0 then m:=0;
     if numprofit(1)<0 then m:=m+1;
end

 回到顶部
总数 52 1 2 3 4 5 6 下一页