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


金字塔客服中心 - 专业程序化交易软件提供商金字塔软件策略编写求助区 → [求助]求高人帮忙编写一个简单的趋势交易思路

   

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


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

主题:[求助]求高人帮忙编写一个简单的趋势交易思路

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


加好友 发短信
等级:金字塔养老院 帖子:1323 积分:6764 威望:0 精华:0 注册:2011/6/14 17:27:11
  发帖心情 Post By:2012/4/19 14:44:24 [显示全部帖子]

variable:aa=0;
c1:=ref(c,1);
c2:=ref(c,2);
o1:=ref(o,1);
ma5:=ma(c,5);
ma20:=ma(c,20);
rma5:=ref(ma5,1);
rma20:=ref(ma20,1);
rrma5:=ref(ma5,2);
rrma20:=ref(ma20,2);
开多:=(c1-o1)>ma((h-l),60);
x1:(c1-o1),linethick0;
x2:ma((h-l),60),linethick0;
if all(c>o,3) and aa=0 then begin
  if (c2>rrma5 or c2>rrma20) and 开多 and c>ma5 and c>ma20 then
  begin
  buy(holding=0,1,limitr,c);
  aa:=1;
  end
end

 if aa=1 and o>c then begin
 sell(holding>0,holding,market);
 end



金字塔—专业程序化交易量化投资平台

客户服务部

-----------------------------------------------------------

欢迎您参加我公司的技术培训,具体培训需求请发邮件到service@weistock.com

您的宝贵建议或者投诉,请发往邮箱:weiwei@weistock.com
 回到顶部
帅哥哟,离线,有人找我吗?
just
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:金字塔养老院 帖子:1323 积分:6764 威望:0 精华:0 注册:2011/6/14 17:27:11
  发帖心情 Post By:2012/4/27 13:41:04 [显示全部帖子]

以下是引用rushtaotao在2012-4-27 10:34:34的发言:

//如果连续三根阳线(前两根阳线收盘价都要满足收盘价收在ma5或者ma20其中一根均线之上,第三根阳线要收在两根均线之上),那我们以第三根阳线的收盘价平空开多

variable:aa=0;
c1:=ref(c,1);
c2:=ref(c,2);
o1:=ref(o,1);
ma5:=ma(c,5);
ma20:=ma(c,20);
rma5:=ref(ma5,1);
rma20:=ref(ma20,1);
rrma5:=ref(ma5,2);
rrma20:=ref(ma20,2);
开多:=(c1-o1)>ma((h-l),60);
x1:(c1-o1),linethick0;
x2:ma((h-l),60),linethick0;
cond1:c1>rma5 or c2>rma20;
cond2:c2>rrma5 or c2>rrma20;
if all(c>o,3) and aa=0 and then begin
  if cond1 and cond2 and 开多 and c>ma5 and c>ma20 and c>ref(hhv(h,1),1)  then
  begin
  sellshort(1,0,market);
  buy(holding=0,1,limitr,c);
  aa:=1;
  end

 

else if cond1 and cond2 and c>ma5 and c>ma20 then

 begin

 sellshort(1,0,market);

 buy(holding=0,1,limitr,c);

 aa:=1;

end

end

 

 if aa=1 and o>c then begin
 sell(holding>0,holding,market);
 end

[此贴子已经被作者于2012-4-27 10:39:08编辑过]



金字塔—专业程序化交易量化投资平台

客户服务部

-----------------------------------------------------------

欢迎您参加我公司的技术培训,具体培训需求请发邮件到service@weistock.com

您的宝贵建议或者投诉,请发往邮箱:weiwei@weistock.com
 回到顶部