-- 作者:Ritter
-- 发布时间:2020/9/21 10:16:39
--
IF (KD3 OR KD4 OR KD5 OR KD6) AND KD2 THEN BEGIN SELLSHORT(1,0,NEXTOPEN); BUY(HOLDING=0,CW%,NEXTOPEN); END
IF (KK3 OR KK4 OR KK5 OR KK6 ) AND KK2 THEN BEGIN SELL(1,0,NEXTOPEN); BUYSHORT(HOLDING=0,CW%,NEXTOPEN); END
zg:=hhv(h,enterbars+1); CS:=LLV(L,ENTERBARS+1);
IF (ZG-AVGENTERPRICE)/AVGENTERPRICE>=ZY*0.2 AND C<AVGENTERPRICE THEN BEGIN SELL(1,0,NEXTOPEN); END IF (AVGENTERPRICE-CS)/CS>=ZY*0.2 AND C>AVGENTERPRICE THEN BEGIN SELLSHORT(1,0,NEXTOPEN); END
if (zg-avgenterprice)/avgenterprice>=ZY*0.4 and (C-avgenterprice)<=(zg-avgenterprice)*0.5 then begin sell(1,0,NEXTOPEN); END if (avgenterprice-CS)/CS>=ZY*0.4 and (avgenterprice-C)<=(avgenterprice-CS)*0.5 then begin sellshort(1,0,NEXTOPEN); End
if (zg-avgenterprice)/avgenterprice>=ZY*0.6 and (C-avgenterprice)<=(zg-avgenterprice)*0.6 then begin sell(1,0,NEXTOPEN); END if (avgenterprice-CS)/CS>=ZY*0.6 and (avgenterprice-C)<=(avgenterprice-CS)*0.6 then begin sellshort(1,0,NEXTOPEN); End
if (zg-avgenterprice)/avgenterprice>=ZY*0.8 and (C-avgenterprice)<=(zg-avgenterprice)*0.7 then begin sell(1,0,NEXTOPEN); END if (avgenterprice-CS)/CS>=ZY*0.8 and (avgenterprice-C)<=(avgenterprice-CS)*0.7 then begin sellshort(1,0,NEXTOPEN); End
if (zg-avgenterprice)/avgenterprice>=ZY and (C-avgenterprice)<=(zg-avgenterprice)*0.8 then begin sell(1,0,NEXTOPEN); END if (avgenterprice-CS)/CS>=ZY and (avgenterprice-C)<=(avgenterprice-CS)*0.8 then begin sellshort(1,0,NEXTOPEN); End
多单止损:=sell(avgenterprice-c>c*ZS and holding>0 ,0,NEXTOPEN); 空单止损:=sellshort(c-avgenterprice>c*ZS and holding<0 ,0 ,NEXTOPEN);
|