input:N(9,1,100,10),P1(3,2,50,5),P2(3,2,50,5),P3(5,1,20,2);
RSV:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;
K:=SMA(RSV,P1,1);
D:=SMA(K,P2,1);
J:=3*K-2*D;
kddo:=cross(K,D);
kdko:=cross(D,K) and D>=60;
kaiduo:=cross(K,D);
kaikon:=cross(D,K);
if holding=0 and cross(K,D) then
buy(1,1,mkt);
if holding=0 and kaikon then
buyshort(c>o,1,lmt,c);
if holding>0 then begin
if c<ENTERPRICE-20*MINDIFF then sell(1,1,mkt);
if kdko then sell(1,1,mkt);
if time>145800 then sell(1,1,mkt);
end
if holding<0 then begin
if c>ENTERPRICE+20*MINDIFF then sellshort(1,1,mkt);
if kddo then sellshort(1,1,mkt);
if if time>145800 then sellshort(1,1,mkt);
end
mkt lmt 错误,这是后台用的。图标请用 market 和 limitr
这种人
自己用心找找错误啊
自己帮自己,别人才能帮你
if holding<0 then begin
if c>ENTERPRICE+20*MINDIFF then sellshort(1,1,mkt);
if kddo then sellshort(1,1,mkt);
if if time>145800 then sellshort(1,1,mkt);//这里多了一个if
end