设置预警在http://i3.6.cn/cvbnm/ff/7b/11/9fa3fe4badb90533c898ad0db5e028bd.jpg
用的公式基本上就是视频教程里面的
H30: = ref(hhv(h,n),1);
L30: = ref(llv(l,n),1);
//H20: =ref(hhv(h,20),1);
//L20: =ref(llv(l,20),1);
Long:=h>h30 and time>(090000+n*100) and time<145200;
if l then
begin
sellshort(holding<0,0,limitr,h30);
buy(holding=0,1,limitr,h30);
end
partline(holding>0,l30,colorred);
Short:= l
(090000+n*100) and time < 145200 ;
if short then
begin
sell(holding>0,0,limitr,l30);
buyshort(holding=0,1,limitr,l30);
end
partline(holding<0,h30,colorgreen);
sell(time>145500 and holding>0,0,thisclose);
sellshort(time>145500 and holding<0,0,thisclose);
为什么不会预警?什么地方弄错了?
[此贴子已经被作者于2010-9-8 22:42:55编辑过]
假设n=30
H30: = ref(hhv(h,n),1);
L30: = ref(llv(l,n),1);
//H20: =ref(hhv(h,20),1);
//L20: =ref(llv(l,20),1);
Long:=h>h30 and time>093000 and time<145200;
if
long then
begin
sellshort(holding<0,0,limitr,h30);
buy(holding=0,1,limitr,h30);
end
partline(holding>0,l30,colorred);
Short:= l<l30 and time<(093000+n*100) and time < 145200 ;
if short then
begin
sell(holding>0,0,limitr,l30);
buyshort(holding=0,1,limitr,l30);
end
partline(holding<0,h30,colorgreen);
sell(time>145500 and holding>0,0,thisclose);
sellshort(time>145500 and holding<0,0,thisclose);
试试这样