Rss & SiteMap

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

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

标题:[交易系统]布林带通道突破

1楼
z7c9 发表于:2011/2/17 10:42:11


 

runmode:0;

input:m(30,1,300,1);
input:n(2,0.5,10,0.5);

variable:myasset=30000;

mid:=ma(close,m);
upper:=mid+n*std(close,m);
lower:=mid-n*std(close,m);

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

highest:=ref(upper,1);
lowest:=ref(lower,1);

longcond:=entertime and high>=highest;
longprice:=max(highest,open);

shortcond:=entertime and low<=lowest;
shortprice:=min(lowest,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

if exittime then
myasset:=asset;

资产:myasset,colorred,noaxis;

[此贴子已经被作者于2011-10-3 11:25:06编辑过]
2楼
tsdaquan 发表于:2011/7/24 15:37:38
请问版主这是哪个品种什么周期的测试图?
共2 条记录, 每页显示 10 条, 页签: [1]


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