-- 作者:jinzhe
-- 发布时间:2015/8/4 9:11:27
--
if cross(a,y) or cross(b,y) then begin sellshort.......; buy......; end
if cross(a,x) or cross(b,x) then begin sellshort.......; buy......; end
if cross(x,a) or cross(x,b) then begin sell.......; buyshort......; end
if cross(y,a) or cross(y,b) then begin sell.......; buyshort......; end
if 开多条件 and type(1)=1 then buy.....; if 开空条件 and type(1)=3 then buyshort......;
if 平多条件 then begin sell....; buyshort.....; end
if 平空条件 then begin sellshort.....; buy...; end
|
-- 作者:y
-- 发布时间:2015/8/4 10:59:45
--
手数:=ss; //--------------------------------------------- jf:INTPART(sum(h-l,n)/n)NOAXIS,LINETHICK0; jg:INTPART(sum(high,n)/n )LINETHICK0; jd:INTPART(sum(low,n)/n )LINETHICK0; //--------------------------------------------- x:INTPART(jd+jf)COLORRED; y:INTPART(jd-jf)COLORBLUE; a:(C+jf)COLORGREEN; b:(C-jf)COLORGREEN; //------------------------------------------------ 开多条件:=cross(a,y) or cross(b,y); 开空条件:=cross(x,a) or cross(x,b); 平多条件:=cross(x,a) or cross(x,b); 平空条件:=cross(a,y) or cross(b,y); //--------------------------------------- if cross(a,y) or cross(b,y) then begin sellshort(1,SS,MARKET); buy(1,SS,MARKET); end
if cross(a,x) or cross(b,x) then begin sellshort(1,SS,MARKET); buy(1,SS,MARKET); end
if cross(x,a) or cross(x,b) then begin sell(1,SS,MARKET); buyshort(1,SS,MARKET); end
if cross(y,a) or cross(y,b) then begin sell(1,SS,MARKET); buyshort(1,SS,MARKET); end
if 开多条件 and type(1)=1 then buy(1,SS,MARKET); if 开空条件 and type(1)=3 then buyshort(1,SS,MARKET); if 平多条件 then begin sell(1,SS,MARKET); buyshort(1,SS,MARKET); end
if 平空条件 then begin sellshort(1,SS,MARKET); buy(1,SS,MARKET); end
|