Rss & SiteMap

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

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

标题:[交易系统]布林强盗系统

1楼
z7c9 发表于:2011/10/2 21:15:00

图片点击可在新窗口打开查看

 

runmode:0;

input:bollingerlengths(50);
input:liqlength(50);
input:roccalclength(30);

mid:=ma(close,bollingerlengths);
upperband:=ref(mid+1.25*std(close,bollingerlengths),1);
lowerband:=ref(mid-1.25*std(close,bollingerlengths),1);

roccalc:=close-ref(close,roccalclength-1);

entrylongcond:=roccalc>0 and high>=upperband;
entryshortcond:=roccalc<0 and low<=lowerband;

if holding=0 then begin
 if entrylongcond then
  buy(1,1,limitr,max(open,upperband));
end

if holding=0 then begin
 if entryshortcond then
  buyshort(1,1,limitr,min(open,lowerband));
end

if holding>0 then begin
 if entryshortcond then begin
  sell(1,holding,limitr,min(open,lowerband));
  buyshort(1,1,limitr,min(open,lowerband));
 end
end 

if holding<0 then begin
 if entrylongcond then begin
  sellshort(1,holding,limitr,max(open,upperband));
  buy(1,1,limitr,max(open,lowerband));
 end
end

if holding=0 then
 liqdays:=liqlength;
 
if holding<>0 then begin
 liqdays:=liqdays-1;
 liqdays:=max(liqdays,10); 
end 

ma1:=ref(ma(close,liqdays),1);

if holding>0 then begin
 if ma1<upperband and low<=ma1 then
  sell(1,holding,limitr,min(open,ma1));
end

if holding<0 then begin
 if ma1>lowerband and high>=ma1 then
  sellshort(1,holding,limitr,max(open,ma1));
end

盈亏:asset-50000,noaxis,colorred,linethick2; 
 
 

 

[此贴子已经被作者于2011-10-2 21:15:20编辑过]
2楼
shy508 发表于:2011/10/2 21:25:13
图片点击可在新窗口打开查看
3楼
xxb398 发表于:2012/2/5 5:38:06

z7c9你好,在“布林强盗系统”策略中有以下问题请予解答:

1、用了roccalc:=close-ref(close,roccalclength-1);会导致信号闪烁吧?

2、进出场时用的盘中突破,这样会导致历史测试与实际差异很大吧?

谢谢。

4楼
z7c9 发表于:2012/2/5 8:59:40
以下是引用xxb398在2012-2-5 5:38:06的发言:

z7c9你好,在“布林强盗系统”策略中有以下问题请予解答:

1、用了roccalc:=close-ref(close,roccalclength-1);会导致信号闪烁吧?

2、进出场时用的盘中突破,这样会导致历史测试与实际差异很大吧?

谢谢。

http://www.weistock.com/bbs/dispbbs.asp?boardid=10&Id=9107

[此贴子已经被作者于2012-2-5 8:59:52编辑过]
5楼
朱饭饭 发表于:2012/2/15 11:00:47
图片点击可在新窗口打开查看,随便来看看有没有能带走的
共5 条记录, 每页显示 10 条, 页签: [1]


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