Rss & SiteMap

金字塔客服中心 - 专业程序化交易软件提供商 http://www.weistock.com/bbs/

专业程序化软件提供商
共9 条记录, 每页显示 10 条, 页签: [1]
[浏览完整版]

标题:[求助]求助,哪有有问题,能帮忙更改一下吗

1楼
利物莫的门徒 发表于:2015/1/3 21:01:58
 H1 := ref(HHV(High,Length),1);
L1  := ref(LLV(Low,Length),1);

VARIABLE:BreakUnderCounter = 0 ;
VARIABLE:BreakUnderCounter = 0 ;

if High > H1 then Begin
BreakoutCounter := 1 ;
BreakUnderCounter := 0 ;
end;

if Low < L1 then Begin
BreakUnderCounter := 1 ;
BreakOutCounter := 0 ;
end;

if BreakOutCounter >= BrkOutNo then Begin
Buy(holding=0,1,market);
BreakOutCounter = 1 ;
end;

if BreakUnderCounter >= BrkOutNo then Begin
buyshort(holding=0,1,market);
BreakUnderCounter = 1 ;
end;

if c< LlV(Low,TrailLen) then begin 
sell(holding>0,0,market);
end;

if c>hhv(high,TrailLen) then begin
sellshort(holding<0,0,market);
end;

资产:asset,noaxis,COLORGRAY; 
2楼
jinzhe 发表于:2015/1/4 13:58:33
Length,BrkOutNo,TrailLen未定义,定义了之后就正常
3楼
利物莫的门徒 发表于:2015/1/4 17:08:24
我自己肯定定义了啊,但是图表显示无信号
4楼
jinzhe 发表于:2015/1/5 9:19:37
那么把你的定义也一起贴上来
5楼
利物莫的门徒 发表于:2015/1/5 20:13:48
Length 10  ,BrkOutNo 2,TrailLen 4 定义了之后还是无显示,是申明全局变量有问题的吗?
6楼
jinzhe 发表于:2015/1/6 9:02:21
BreakoutCounter ,BreakUnderCounter 这两个变量只有0和1两个值,开仓条件是要让这两个变量大于2,所以恒不成立
7楼
利物莫的门徒 发表于:2015/1/6 10:23:27
哦,好的,谢谢版主,我去改下试试
8楼
利物莫的门徒 发表于:2015/1/6 10:29:31
我的意思是定
BreakoutCounter ,BreakUnderCounter 这两个变量没成立一次,就把变量加一,一直到大于2次,请问是不是需要把它定义成数组变量才行呢?
9楼
jinzhe 发表于:2015/1/6 10:33:48

改成这样

if High > H1 then Begin
BreakoutCounter := BreakoutCounter +1 ;
BreakUnderCounter := 0 ;
end;

if Low < L1 then Begin
BreakUnderCounter := BreakUnderCounter+1 ;
BreakOutCounter := 0 ;
end;

if BreakOutCounter >= BrkOutNo then Begin
Buy(holding=0,1,market);
BreakOutCounter := 1 ;
end;

if BreakUnderCounter >= BrkOutNo then Begin
buyshort(holding=0,1,market);
BreakUnderCounter := 1 ;
end;

共9 条记录, 每页显示 10 条, 页签: [1]


Powered By Dvbbs Version 8.3.0
Processed in 0.10156 s, 3 queries.