Rss & SiteMap

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

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

标题:[交易系统]肯特纳通道突破

1楼
z7c9 发表于:2011/2/24 9:08:39

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

 

runmode:0;

input:length(20,1,100,1);
input:numatrs(1);

entertime:=time>=093500 and time<=145500;
exittime:=time>=150000;

tprice:=(high+low+close)/3;
avgvalue:=ma(tprice,length);
shiftvalue:=numatrs*ma(tr,length);
upperband:=avgvalue+shiftvalue;
lowerband:=avgvalue-shiftvalue;

longcond:=entertime and high>=trimprice(ref(upperband,1));
longprice:=max(trimprice(ref(upperband,1)),open);

shortcond:=entertime and low<=trimprice(ref(lowerband,1));
shortprice:=min(trimprice(ref(lowerband,1)),open);

if holding=0 then begin
 if longcond then
  buy(1,1,limitr,longprice);
end

if holding=0 then begin
 if shortcond then
  buyshort(1,1,limitr,shortprice);
end

if holding>0 then begin
 if exittime then
  sell(1,holding,limitr,close);
end

if holding<0 then begin
 if exittime then
  sellshort(1,holding,limitr,close);
end
     
收益:(asset-500000)/500000,noaxis,colormagenta;
次数:totaltrade,linethick0;
胜率:percentwin,linethick0;
连亏:maxseqloss,linethick0;
连赢:maxseqwin,linethick0;

[此贴子已经被作者于2011-10-3 11:24:40编辑过]
2楼
阿火 发表于:2011/2/25 16:12:41

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

牛,怎么不加个止损进去

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


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