Rss & SiteMap

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

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

标题:请教: 为何没任何信号出现?

1楼
qq代人发帖 发表于:2013/10/14 16:20:23
请教: 为何没任何信号出现?

ZZ1:=cross(c,ma(c,5));
DD1:=cross(ma(c,5),c);

开多条件:=ZZ1;//开多条件
平多条件:=DD1;//平多条件
开空条件:=DD1;//开空条件
平空条件:=ZZ1;//平空条件
///////////////////////////////////////////////////////////////////////////////////////////////
TR1:=MAX(MAX((HIGH-LOW),ABS(REF(CLOSE,1)-HIGH)),ABS(REF(CLOSE,1)-LOW));
ATR:=MA(TR1,14);
多开RATR:=valuewhen(开多条件 and holding=2,ATR);  
空开RATR:=valuewhen(开空条件 and holding=2,ATR);  
{
1.开仓2手后自动设止损 X*RATR    (X缺省为 1)
2.开仓2手后盈利达到了 Y*RATR,  将2手止损改为保本(成本+2跳)
3.保本后,盈利未达到 Z1*RATR前,忽略所有平仓信号,只有在盈利超过 Z1*RATR的平仓信号出现后才平仓1手。
4.保本后,盈利未达到 Z2*RATR前,忽略所有平仓信号,只有在盈利超过 Z2*RATR的平仓信号出现后才平仓1手。
}
if openprofit<=-2*x*多开RATR then SELL(1,0,market);

if openprofit>=y*多开RATR then begin
   if openprofit>=zyx1*多开RATR and openprofit<zyx2*多开RATR and 平多条件 and holding=2 then sell(holding=2,1,market);
   if openprofit>=zyx2*多开RATR and 平多条件 and holding=1 then sell(holding=1,1,market);
end

if openprofit<=-1*x*空开RATR then SELLSHORT(1,0,market);

if openprofit>=y*空开RATR then begin
   if openprofit>=zyx1*空开RATR and openprofit<zyx2*空开RATR and 平空条件 and holding=2 then SELLSHORT(holding=2,1,market);
   if openprofit>=zyx2*空开RATR and 平空条件 and holding=1 then SELLSHORT(holding=1,1,market);
end

资产:asset,noaxis;
2楼
system迷 发表于:2013/10/14 16:27:37

坐等行家解惑..........

3楼
jinzhe 发表于:2013/10/14 16:27:46

X:=;
Y:=;
ZYX1:=;
ZYX2:=;

这几个是多少?

4楼
system迷 发表于:2013/10/14 16:30:15

X:=1;
Y:=2;
ZYX1:=3;
ZYX2:=4;

 

5楼
jinzhe 发表于:2013/10/14 16:39:14
随便给的数字结果就是我这里一个交易信号都没有
6楼
system迷 发表于:2013/10/14 16:40:35
jinzhe  上面有你写的哦 我就是不会搞出信号来 急死人
7楼
system迷 发表于:2013/10/14 16:54:33

{

RATR 就是开仓信号出现当时的ATR值。
1.开仓2手后自动设止损 X*RATR (X缺省为 1)
2.开仓2手后盈利达到了 Y*RATR, 将2手止损改为保本(成本+2跳)(Y缺省为2)
3.保本后,盈利未达到 Zyx1*RATR前,忽略所有平仓信号,只有在盈利超过 Zyx1*RATR的平仓信号出现后才平仓1手。
4.保本后,盈利未达到 Zyx2*RATR前,忽略所有平仓信号,只有在盈利超过 Zyx2*RATR的平仓信号出现后才平仓1手。
}

[此贴子已经被作者于2013/10/14 16:55:42编辑过]
8楼
jinzhe 发表于:2013/10/14 16:55:56
那么就在原帖回,
9楼
system迷 发表于:2013/10/14 16:56:48

好吧

 

10楼
system迷 发表于:2013/10/14 17:02:38

请在这个贴里回吧

http://www.weistock.com/bbs/dispbbs.asp?boardid=4&id=57431&authorid=0&page=0&star=2

[此贴子已经被作者于2013/10/14 17:03:50编辑过]
共12 条记录, 每页显示 10 条, 页签: [1] [2]


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