Rss & SiteMap

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

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

标题:只有一个交易方向。有问题

1楼
系统使用者 发表于:2012/10/18 17:10:16

Variable: aa=0,bb=0,cc=0,dd=0,ee=0,ff=0,gg=0,hh=0;
IF MA(C,2)<MA(C,5)then aa:=1;
if MA(C,2)>MA(C,5)then aa:=-1;
if C>MA(C,40) then bb:=1;
if C<MA(C,40) then bb:=-1;
if HHVBars(C,50)>LLVBars(C,50) then cc:=1;
if HHVBars(C,50)<LLVBars(C,50) then cc:=-1;
if ((high-low)<MA((high-low),10)) and C>C[1] or ((high-low)>MA((high-low),10)) and C<C[1] then dd:=1;
if ((high-low)<MA((high-low),10)) and C<C[1] or ((high-low)>MA((high-low),10)) and C>C[1] then dd:=-1;
if C>(MA(H,15)+MA(L,15))/2 then ee:=1;
if C<(MA(H,15)+MA(L,15))/2 then ee:=-1;
if C<O and C[1]<O[1] then ff=1;
  else ff:=0;
if C>O and C[1]>O[1] then ff:=-1;
if L>L[1] and L[1]<ref(LLV(L,3),2) and C>C[1] and C[1]<C[2]then gg:=1;
  else gg:=0;
if H<H[1] and H[1]>ref(HHV(H,3),2) and C<C[1] and C[1]>C[2]then gg:=-1;
if HHV(L,3)-LLV(L,3)<=0.2*(HHV(H,3)-LLV(L,3)) then hh=1;
  else hh:=0;
if HHV(H,3)-LLV(H,3)<=0.2*(HHV(H,3)-LLV(L,3)) then hh:=-1;
 val1:=aa+bb+cc+dd+ee+ff+gg+hh;
 val2:=aa+bb+cc+dd+ee+ff+gg+hh;

 if val2>0 then buy(1,25%,limitr,close);
 if val1<0 then buyshort(1,25%,limitr,close); 

资金线:asset,noaxis,colorffff,LINEDOT;

 

[此贴子已经被作者于2012-10-18 17:11:27编辑过]
2楼
jinzhe 发表于:2012/10/18 17:14:00

没写平仓条件啊

图表交易不能锁仓也就是说不能同时开多和开空,

3楼
系统使用者 发表于:2012/10/18 17:15:00
次周期市价开仓,收盘平仓!
[此贴子已经被作者于2012-10-18 17:15:56编辑过]
4楼
系统使用者 发表于:2012/10/18 17:17:25

if aa+bb+cc+dd+ee+ff+gg+hh>0 then Buy('', DEFAULT, 0, 0, OT_Market, OB_NextBar,  '');请解释BUY里面各个参数的含义

 

if aa+bb+cc+dd+ee+ff+gg+hh<0 then SellShort('', DEFAULT, 0, 0, OT_Market, OB_NextBar,  '');请解释SELLSRHOT里面各个参数的含义

 

次周期市价开仓,收盘平仓!

5楼
系统使用者 发表于:2012/10/18 17:18:44
麻烦一下,
6楼
jinzhe 发表于:2012/10/18 17:21:12

那么就是一个方向的条件总是满足,另一个方向的条件总是不满足,所以造成有平仓条件的情况下只开一个方向的单

7楼
系统使用者 发表于:2012/10/18 17:23:07

但在金魔方里就正常的,

 

8楼
RogarZ 发表于:2012/10/18 17:41:47

那你用的是金字塔还是金魔方?

金字塔的代码和金魔方的代码一样嘛?

相当于你用的了TB的代码 复制到 金字塔里 然后要求金字塔必须读出来。。。、

BUY SELL函数的意义  数据放到  公式中 BUY SELL上

 

"Buy('', DEFAULT, 0, 0, OT_Market, OB_NextBar,  '')"

这个是金魔方的代码,金字塔暂不支持,具体使用方法、参数设置 请咨询金魔方

9楼
系统使用者 发表于:2012/10/18 18:12:43
我使用的金字塔
10楼
系统使用者 发表于:2012/10/18 18:17:53
想转换在金字塔下使用。
共12 条记录, 每页显示 10 条, 页签: [1] [2]


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