?
?來源: www.kzuj.com.cn
金字塔資深技術: [PEL] 復制代碼INPUT:Q1(5,1,1000,1),Q2(5,1,1000,1),S(1,1,100,1); ma10:ma(c,10); SS:=S; KD:c>ma10; pd:C<MA10; KK:=pd; pk:=kd; A1:=c-AVGENTERPRICE; if A1>0 AND A1>Q1*MINDIFF THEN BEGIN SELL(1,0,MARKET); if NUMPROFIT(1)>0 then zz:=1; if NUMPROFIT(1)<0 then zz:=zz+1; SELLSHORT(1,0,MARKET); if NUMPROFIT(1)>0 then zz:=1; if NUMPROFIT(1)<0 then zz:=zz+1; END if A1<0 AND ABS(A1) >Q2*MINDIFF THEN BEGIN SELL(1,0,MARKET); if NUMPROFIT(1)>0 then zz:=1; if NUMPROFIT(1)<0 then zz:=zz+1; SELLSHORT(1,0,MARKET); if NUMPROFIT(1)>0 then zz:=1; if NUMPROFIT(1)<0 then zz:=zz+1; END if pd and HOLDING>0 then BEGIN sell(1,ss,MARKET); if NUMPROFIT(1)>0 then zz:=1; if NUMPROFIT(1)<0 then zz:=zz+1; end if pk and HOLDING<0 then BEGIN sellshort(1,ss,MARKET); if NUMPROFIT(1)>0 then zz:=1; if NUMPROFIT(1)<0 then zz:=zz+1; end if zz=1 then ss:=1; if zz=2 then ss:=1; if zz=3 then ss:=2; if zz=4 then ss:=4; if zz=5 then ss:=8; if zz>=6 then ss:=16; if KD and HOLDING=0 then BEGIN BUY( 1,ss,MARKET); end if Kk and HOLDING=0 then BEGIN BUYshort( 1,ss,MARKET); end
?
截圖202110151637412643.png (148.26 KB, 下載次數: 578)
下載附件
2021-10-15 16:37 上傳