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


金字塔客服中心 - 专业程序化交易软件提供商金字塔软件公式模型编写问题提交 → 范围内找点

   

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


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

主题:范围内找点

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


加好友 发短信
等级:论坛游民 帖子:178 积分:0 威望:0 精华:0 注册:2016/10/17 16:49:11
范围内找点  发帖心情 Post By:2016/12/9 10:25:44    Post IP:175.11.158.46[只看该作者]

a1:=ma(c,10);
PARTLINE(a1>=ref(a1,1),a1,colorred,2);
PARTLINE(a1<ref(a1,1),a1,colorgreen,2);
a2:=ma(c,22);
PARTLINE(a2>=ref(a2,1),a2,colorred,3);
PARTLINE(a2<ref(a2,1),a2,colorgreen,3);
a3:=ma(c,10)>=ref(ma(c,10),1) and ma(c,22)>=ref(ma(c,22),1);
a8:=ma(c,10)<ref(ma(c,10),1) and ma(c,22)<ref(ma(c,22),1);

variable:n=0,m=0;
mm:=ref(h,1)=hhv(h,3); 
nn:=ref(l,1)=llv(l,3);

variable:bj=0;
variable:dt=0,kt=0;
mm:=ref(h,1)=hhv(h,3);
nn:=ref(l,1)=llv(l,3);

if mm then bj:=1;
if nn then bj:=-1;
nn1:=barslast(mm);
nn2:=barslast(nn);
if c<ref(l,nn1+1) and bj=1 then i:=1;
if c>ref(h,nn2+1) and bj=-1 then i:=-1;

uu3:=cross(i=1,0.5);
uu4:=cross(i=-1,0.5);
if uu3 or ((ref(c,1)>ref(o,1) and h>ref(h,1) and c<ref(l,1))) or (ref(h,1)=hhv(h,3) and c<ref(l,1)) or c<ref(l,barslast(c>o)) or c<ref(l,1) then begin
 n:=0;
 m:=m+1;
end

//m为绿色
if uu4 or (ref(l,1)=llv(l,3) and c>ref(h,1)) or ((ref(o,1)>ref(c,1) and l<ref(l,1) and c>ref(h,1))) or c>ref(h,barslast(c<o)) or c>ref(h,1) then begin
 n:=n+1;
 m:=0;
end
//n为红色
STICKLINE(cross(m,0.5),o,CLOSE,7.5,0),COLORgreen;
STICKLINE(cross(n,0.5),o,c,7.5,0),COLORred;
x1:=cross(m,0.5);
x2:=cross(n,0.5);


通过代码,把“x1”与“x2”之间的最高最低点找出来。谢谢

 回到顶部
帅哥哟,离线,有人找我吗?
jinzhe
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:罗宾汉 帖子:46311 积分:50819 威望:0 精华:2 注册:2011/3/23 8:50:25
  发帖心情 Post By:2016/12/9 13:47:51    Post IP:180.169.30.6[只看该作者]

n1:=barslast(x1);

n2:=barslast(x2);

valuewhen(x1,hhv(h,n2+1));

valuewhen(x1,llv(l,n2+1));

高低点如上所写



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

客户服务部

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

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

 回到顶部