variable:kcj=0;
if todaybar=1 then kcj:=open;
		 
		//用每天开盘价做基准,然后实行低买高卖,只赚取n个价位盈利。
input:n(5,1,10,1);
		if c<kcj-n*MINDIFF then 
begin
sellshort(1,holding,marketr);
buy(holding=0,1,marketr);
kcj:=close;
end
		 
		if c>kcj+n*mindiff then 
begin
sell(1,holding,marketr);
buyshort(holding=0,1,marketr);
kcj:=close;
end
		 
		//尾盘平仓,不隔日
		if time = 1900 then 
begin 
 sell(1,holding,marketr);
 sellshort(1,holding,marketr);
end