Rss & SiteMap

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

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

标题:boll相关策略求助

1楼
yuhang 发表于:2012/12/7 23:10:02
在寻求高手帮助之前,先再次感谢yh_tl帮忙编写的策略。省了大量时间和精力,呵呵,坛子里好心人多呀!

现求助在下面策略(15分钟的boll图)上可否增加一个触发条件:

当日线boll图中K线初始值>mid ,则当天15分钟图只做多;
当日线boll图中 K线初始值<mid,则当天15分钟图只做空;
                                  --盼复,谢谢!

INPUT:M(26,5,500,30);
INPUT:N(2,0.1,10,1);
INPUT:X(0.2,0.2,10,0.2);

MID :  MA(CLOSE,M);
UPPER: MID + N*STD(CLOSE,M);
LOWER: MID - N*STD(CLOSE,M);

多:=ALL(C>O+15*X,2) AND ALL(O>MID,2);
空:=ALL(C<O-15*X,2) AND ALL(O<MID,2);


if 多 then begin
 sellshort(holding<0, 0, thisclose);
 buy(holding=0 {AND TIME<144000}, 1, thisclose);
 end

HH:=HHV(H,BARSLAST(HOLDING<=0));
多止损1:HH<Enterprice+60*X AND C<=HH-60*X ,LINETHICK0;
多止损2:Enterprice*1.02>=HH AND HH>=Enterprice+60*X AND C<Enterprice+2*X ,LINETHICK0;
多止损3:HH>Enterprice*1.02 AND C<HH*0.98 ,LINETHICK0;
多止损4:TIME>144000 AND C<Enterprice*1.03 ,LINETHICK0;

if 多止损1 OR 多止损2 OR 多止损3 OR 多止损4 then sell(holding>0, 0, thisclose);


if 空 then begin
 sell(holding>0, 0, thisclose);
 buyshort(holding=0 {AND TIME<144000}, 1, thisclose);
 end

LL:=LLV(L,BARSLAST(HOLDING>=0));
空止损1:LL>Enterprice-60*X AND C>=LL+60*X ,LINETHICK0;
空止损2:Enterprice<=LL*1.02 AND LL<=Enterprice-60*X AND C>Enterprice-2*X ,LINETHICK0;
空止损3:LL*1.02<Enterprice AND C*0.98>LL ,LINETHICK0;
空止损4:TIME>144000 AND C*1.03>Enterprice ,LINETHICK0;

if 空止损1 OR 空止损2 OR 空止损3 OR 空止损4 then sellshort(holding<0, 0, thisclose);

 

2楼
RogarZ 发表于:2012/12/8 11:03:56

首先,当日线boll图中K线初始值 是指开盘价出现的那一刻的bOLL值?

其次,你的公式运行在什么周期上?

这牵涉到具体公式中代码的处理方式,还请告知

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


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