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


金字塔客服中心 - 专业程序化交易软件提供商金字塔软件公式模型编写问题提交 → 怎样把序列模式改正逐K模式?

   

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


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

主题:怎样把序列模式改正逐K模式?

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


加好友 发短信
等级:新手上路 帖子:74 积分:0 威望:0 精华:0 注册:2013/8/19 15:11:43
  发帖心情 Post By:2013/10/14 14:34:47    Post IP:115.200.158.52[显示全部帖子]

麻烦了 代码有点长。。
VARIABLE:aq1=0,aq2=0,aq3=0,a1=0,a2=0,a3=0,b1=0,b2=0,b3=0;
variable:j=1,h1[2]=0,h2[2]=0,l2[2]=0;
variable:qq1=0,qq2=0,qq3=0;
for j=1 to barpos do
begin
if h[j]<a3 and l[j]>b3  then 
begin
end
else
begin
if a1>0 and a2=0 then
begin
a2:=h[j];b2:=l[j];aq2:=j;
end
if a1=0 and a2=0 then
begin
a1:=h[j];b1:=l[j];aq1:=j;
end
else 
begin
a1:=a2;b1:=b2;aq1:=aq2;
a2:=a3;b2:=b3;aq2:=aq3;
a3:=h[j];b3:=l[j];aq3:=j;
end
if (a2>a1 and a2>a3) or (a2=a1 and a2>a3) then
BEGIN
if h2[1]=0 then
BEGIN
qq3:=a2;
h2[1]:=a2;h2[2]:=aq2;
qq1:=l2[2];qq2:=h2[2];
drawline(barpos=qq1,l2[1],barpos=qq2,h2[1],0),colorblue;
end 
if h2[2]>l2[2] and a2>h2[1] then
BEGIN
qq3:=a2;
h2[1]:=a2;h2[2]:=aq2;
qq1:=l2[2];qq2:=h2[2];
drawline(barpos=qq1,l2[1],barpos=qq2,h2[1],0),colorblue;
end 
if  h2[2]<l2[2] then
begin
qq3:=a2;
h2[1]:=a2;h2[2]:=aq2;
qq1:=l2[2];qq2:=h2[2];
drawline(barpos=qq1,l2[1],barpos=qq2,h2[1],0),colorblue;
end
end
if (b2<b1 and b2<b3) or (b2=b1 and b2<b3)then
BEGIN
if l2[1]=0 then
BEGIN
l2[1]:=b2;l2[2]:=aq2;
qq1:=l2[2];qq2:=h2[2];
drawline(barpos=qq2,h2[1],barpos=qq1,l2[1],0),colorblue;
end
if l2[2]>h2[2] and b2<l2[1] then
BEGIN
l2[1]:=b2;l2[2]:=aq2;
qq1:=l2[2];qq2:=h2[2];
drawline(barpos=qq2,h2[1],barpos=qq1,l2[1],0),colorblue;
end
if l2[2]<h2[2] then
BEGIN
l2[1]:=b2;l2[2]:=aq2;
qq1:=l2[2];qq2:=h2[2];
drawline(barpos=qq2,h2[1],barpos=qq1,l2[1],0),colorblue;
end
end
end
end 

 回到顶部