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


金字塔客服中心 - 专业程序化交易软件提供商金字塔软件公式模型编写问题提交 → 我想每赚10个点平一手可第一个10点就全平了,老大帮看看哪写错了

   

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


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

主题:我想每赚10个点平一手可第一个10点就全平了,老大帮看看哪写错了

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


加好友 发短信
等级:新手上路 帖子:30 积分:98 威望:0 精华:0 注册:2011/12/8 16:58:13
  发帖心情 Post By:2012/7/26 17:46:28    Post IP:120.192.237.128[只看该作者]

INPUT:N(8,1,100,1); //设置参数时;
INPUT:M(21,1,100,1); //设置参数时;;
INPUT:M2(10,1,100,1); //设置参数时;
INPUT:M4(10,1,100,1); //设置参数时;
MA1:MA(C,n);
MA3:MA(C,m);

 

//建立多头的进场条件
long := time>093000 and time<140000;

if long  and cross(ma1,ma3) then
 begin
 sellshort(holding < 0 , 0, thisclose);
 end
if long and cross(ma1,ma3) then
 begin
 buy(holding = 0 , N, thisclose);
 end
//14:00-14:55平空仓
if cross(ma3,ma1) and time>140000 and time<145500 then
begin
sellshort(holding < 0, 0, thisclose);
end

 


//开空条件
short :=  time > 093000 and time < 140000;

if short  and cross(ma3,ma1) then
 begin
 sell(holding > 0, 0, thisclose);
 end
if short and l < cross(ma3,ma1) then
 begin
 buyshort(holding = 0 ,N, thisclose);
 end 

 //140000-1455平多仓
if cross(ma3,ma1) and time>=140000 and time<=145500 then
begin
sell(holding > 0, 0, thisclose);
end


//收盘前5分钟平仓
if time > 145400 then
 begin
 sell(holding > 0, 0, thisclose);
 sellshort(holding < 0, 0, thisclose);
 end

//赢10点(m2及M4均先设为10)
 If holding < 0 then begin
  sellshort(Enterprice-l>=M2, 1, limitr, enterprice-M2+mindiff);
 end
 
 If  holding > 0 then begin
  sell(h-Enterprice>=M2, 1, limitr, enterprice+m2-mindiff);
  end
 
   //赢20点
 If holding < 0 then begin
  sellshort(Enterprice-l>=M2+M4, 1, limitr, enterprice-M2-m4+mindiff);
 end
 
 If  holding > 0 then begin
  sell(h-Enterprice>=M2+M4, 1, limitr, enterprice+m2+m4-mindiff);
  end
  //赢30点
 If Enterprice-l>=M2+2*M4 then begin
  sellshort(holding < 0, 1, limitr, enterprice-M2-2*m4+mindiff);
 end
 
 If h-Enterprice>=M2+2*M4 then begin
  sell(holding > 0, 1, limitr, enterprice+m2+2*m4-mindiff);
  end
   //赢40点
 If Enterprice-l>=M2+3*M4 then begin
  sellshort(holding < 0, 1, limitr, enterprice-M2-3*m4+mindiff);
 end
 
 If h-Enterprice>=M2+3*M4 then begin
  sell(holding > 0, 1, limitr, enterprice+m2+3*m4-mindiff);
  end
   //赢50点
 If Enterprice-l>=M2+4*M4 then begin
  sellshort(holding < 0, 1, limitr, enterprice-M2-4*m4+mindiff);
 end
 
 If h-Enterprice>=M2+4*M4 then begin
  sell(holding > 0, 1, limitr, enterprice+m2+4*m4-mindiff);
  end
   //赢60点
 If Enterprice-l>=M2+5*M4 then begin
  sellshort(holding < 0, 1, limitr, enterprice-M2-5*m4+mindiff);
 end
 
 If h-Enterprice>=M2+5*M4 then begin
  sell(holding > 0, 1, limitr, enterprice+m2+5*m4-mindiff);
  end
   //赢70点
 If Enterprice-l>=M2+6*M4 then begin
  sellshort(holding < 0, 1, limitr, enterprice-M2-6*m4+mindiff);
 end
 
 If h-Enterprice>=M2+6*M4 then begin
  sell(holding > 0, 1, limitr, enterprice+m2+6*m4-mindiff);
  end
   //赢80点
 If Enterprice-l>=M2+7*M4 then begin
  sellshort(holding < 0, 1, limitr, enterprice-M2-7*m4+mindiff);
 end
 
 If h-Enterprice>=M2+7*M4 then begin
  sell(holding > 0, 1, limitr, enterprice+m2+7*m4-mindiff);
  end
   //赢90点
 If Enterprice-l>=M2+8*M4 then begin
  sellshort(holding < 0, 1, limitr, enterprice-M2-8*m4+mindiff);
 end
 
 If h-Enterprice>=M2+8*M4 then begin
  sell(holding > 0, 1, limitr, enterprice+m2+8*m4-mindiff);
  end
    //赢100点
 If Enterprice-l>=M2+9*M4 then begin
  sellshort(holding < 0, 1, limitr, enterprice-M2-9*m4+mindiff);
 end
 
 If h-Enterprice>=M2+9*M4 then begin
  sell(holding > 0, 1, limitr, enterprice+m2+9*m4-mindiff);
  end
    //赢110点
 If Enterprice-l>=M2+10*M4 then begin
  sellshort(holding < 0, 1, limitr, enterprice-M2-10*m4+mindiff);
 end
 
 If h-Enterprice>=M2+10*M4 then begin
  sell(holding > 0, 1, limitr, enterprice+m2+10*m4-mindiff);
  end


 回到顶部