兩儀四象TS進場交易系統(tǒng)源碼代碼
作者:開拓者 TB 來源:cxh99.com 發(fā)布時間:2012年11月26日
- 源碼:
if(currentbar>maxlist(N1,N2)+1) then begin
if Summation(absvalue(close-close[1]),N1)<>0 then begin
EF=maxlist(highest(close,N1)-Lowest(close,N1),absvalue(close-close[N1]))/Summation(absvalue(close-close[1]),N1);
end;
EFMA=Average(EF,N1);
MER=IntPortion(N1-(EFMA-0.5)*N2);
LY=Summation((close-close[1])*Volume,MER);
LYSX=Average(LY,N1);
end;
messagelog("LYSX",LYSX);
messagelog("EF",EF);
if (time>=opentime+maxlist(N1,N2)+1 and time<lasttime and marketposition=0 and tradeNumber<maxtime ) then
begin
if LYSX>0 then begin
buy 1 share next bar at Open;
end;
if LYSX<0 then begin
sellshort 1 share next bar at Open;
end;
end;