N:=5; AA:=ABS((2*CLOSE+HIGH+LOW)/4-MA(CLOSE,N))/MA(CLOSE,N); 多空线:=DMA((2*CLOSE+LOW+HIGH)/4,AA),LINETHICK3,COLORMAGENTA; CC:=(CLOSE/多空线); MA1:=MA(CC*(2*CLOSE+HIGH+LOW)/4,3); MAAA:=((MA1-多空线)/多空线)/3; TMP:=MA1-MAAA*MA1; {多头买入} ENTERLONG: (CROSS(KDJ.J,0) AND 多空线<=TMP) OR (多空线<=TMP AND REF(多空线>TMP,1) AND CLOSE>=多空线) ; {多头卖出} EXITLONG: 多空线>=TMP AND REF(多空线AND CLOSE<多空线 { OR ( CLOSE<多空线 AND HIGH*1.005>=多空线 AND REF( HIGH*1.005,1)<多空线 AND COUNT(CLOSE<多空线 AND HIGH*1.005>=多空线 AND REF( HIGH*1.005,1)<多空线,5)<2 ) } OR ( CLOSEAND TMP<多空线 AND ABS(多空线-TMP)/多空线<0.01 AND REF(TMP,1)>TMP AND REF(TMP,2)AND REF( HIGH*1.005,1)>=多空线 ) OR (CROSS(100,KDJ.J) AND 多空线>=TMP) ; |