设为首页收藏本站

 找回密码
 注册
查看: 3741|回复: 4
打印 上一主题 下一主题

三角形态代码,求转为TB代码 [复制链接]

Rank: 5Rank: 5

精华
0
UID
116737
积分
781
帖子
210
主题
32
阅读权限
60
注册时间
2013-3-14
最后登录
2019-8-16
跳转到指定楼层
1#
发表于 2013-11-26 15:05:03 |只看该作者 |倒序浏览
inputs:
Length(20),
Strength(3),
MaximumSlope(10),
MaximumPivots(3);

variables:
FoundHighPivot(false),
FoundLowPivot(False),
N(0),M(0),
SH1(-1), SH2(-1),starBar(0),
SL1(-1), SL2(-1),
TH(-1), TL(-1),
highslope(0.0),lowslope(0.0),ProjectHigh(0.0),ProjectLow(0.0);

if date>date[1] then
starBar=BarNumber;



N=1;
SH1=PivotHighVSBar(N,high,strength,strength,Length);
if SH1<>-1 then begin
N=2;
FoundHighPivot=False;
while FoundHighPivot=False and N<=MaximumPivots begin
SH2=PivotHighVSBar(N,high,strength,strength,Length);
condition1= currentbar-SH2>=starBar;
if SH2<>-1 and high[SH1]<high[SH2] and condition1 then
FoundHighPivot=true;
N=N+1;
end;
end;

N=1;
SL1=PivotLowVSBar(N,low,strength,strength,Length);
if SL1<>-1 then begin
N=2;
FoundLowPivot=False;
while FoundLowPivot=False and N<=MaximumPivots begin
SL2=PivotLowVSBar(n,LOW,strength,strength,Length);
condition2= currentbar-SL2>=starBar;
if SL2<>-1 and Low[SL1]>Low[SL2] and condition2 then
FoundLowPivot=true;
N=N+1;
end;
end;

if FoundHighPivot and FoundLowPivot then begin

TH=tl_new(date,time[sh2],high[sh2],date,time[SH1],high[SH1]);


TL=tl_new(date,time[sl1],low[sl1],date,time[Sl2],low[Sl2]);


end;
附件: 你需要登录才可以下载或查看附件。没有帐号?注册

Rank: 4

精华
0
UID
110324
积分
340
帖子
257
主题
51
阅读权限
50
注册时间
2012-5-4
最后登录
2014-12-20
2#
发表于 2013-11-29 16:25:00 |只看该作者
请注明代码的含义

使用道具 举报

精华
0
UID
174646
积分
129
帖子
48
主题
1
阅读权限
0
注册时间
2013-10-29
最后登录
2014-9-24
3#
发表于 2013-12-5 22:05:22 |只看该作者
程序化交流,请加群310499265,验证:TB论坛。

使用道具 举报

Rank: 3Rank: 3

精华
0
UID
120840
积分
147
帖子
79
主题
44
阅读权限
40
注册时间
2013-7-1
最后登录
2015-12-27
4#
发表于 2013-12-6 20:26:42 |只看该作者
这应该是 Mc   下编的吧  
TH=tl_new(date,time[sh2],high[sh2],date,time[SH1],high[SH1]);


TL=tl_new(date,time[sl1],low[sl1],date,time[Sl2],low[Sl2]);
TH=tl_new  和    TL=tl_new 不知是什么函数

highslope(0.0),lowslope(0.0),ProjectHigh(0.0),ProjectLow(0.0)这几个变量也没有用到

使用道具 举报

Rank: 3Rank: 3

精华
0
UID
12849
积分
230
帖子
109
主题
13
阅读权限
40
注册时间
2010-6-23
最后登录
2024-2-2
5#
发表于 2016-12-2 15:16:56 |只看该作者
mc的

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

bottom

静态版|手机版|联系我们|交易开拓者 ( 粤ICP备07044698   

GMT+8, 2024-4-20 08:05

Powered by Discuz! X2 LicensedChrome插件扩展

© 2011-2012 交易开拓者 Inc.

回顶部