以文本方式查看主题

-  金字塔客服中心 - 专业程序化交易软件提供商  (http://weistock.com/bbs/index.asp)
--  交易策略发布专区  (http://weistock.com/bbs/list.asp?boardid=10)
----  [交易系统]外包日系统  (http://weistock.com/bbs/dispbbs.asp?boardid=10&id=8569)

--  作者:z7c9
--  发布时间:2011/10/23 19:20:16
--  [交易系统]外包日系统

 

runmode:0;

variable:stopline=0;

entrylongcond:=ref(high,1)>ref(high,2) and ref(high,2)>ref(high,3) and ref(low,2)entryshortcond:=ref(low,1)ref(high,3) and ref(low,2)
atr:=3*ma(tr,15);

hh:=ref(high,1);
ll:=ref(low,1);

if holding=0 then begin
if entrylongcond then begin
buy(1,1,limitr,open);
stopline=:enterprice-atr;
end

if entryshortcond then begin
buyshort(1,1,limitr,open);
stopline:=enterprice+atr;
end
end

if holding>0 and enterbars>=1 then begin
if hh-atr>stopline then
stopline:=hh-atr;

if low<=stopline then
sell(1,holding,limitr,min(open,stopline));
end

if holding<0 and enterbars>=1 then begin
if ll+atr stopline:=ll+atr;

if high>=stopline then
sellshort(1,holding,limitr,max(open,stopline));
end

盈亏:asset-500000,noaxis,coloryellow,linethick2;


--  作者:CITSCWB
--  发布时间:2011/10/26 17:36:48
--  
缺少TR参数
--  作者:CITSCWB
--  发布时间:2011/10/26 17:38:10
--  
第三句完全是错的