主图:
LB:=20; LLV_LOW:=LLV(C, LB); HHV_CLOSE:=HHV(C, LB); BARS_LOW:=BARSLAST(C=LLV_LOW); BARS_LOW2:=REF(BARSLAST(C=LLV_LOW), -BARS_LOW-1); SECOND_BOT:=IF(BARS_LOW > 10 AND BARS_LOW2 > 10, 1, 0); BRK_LEVEL:=IF(SECOND_BOT, REF(HHV_CLOSE, -BARS_LOW), DRAWNULL); DRAWLINE(CROSS(C, BRK_LEVEL), BRK_LEVEL, 0, 0, 1); STICKLINE(SECOND_BOT, LOW, CLOSE, 0, 0), COLORGREEN; DRAWTEXT(CROSS(C, BRK_LEVEL), BRK_LEVEL, 'BUY'), COLORYELLOW; ************************************************************************************************************************************************************************************
选股公式:
LB:=20; LLV_LOW:=LLV(C, LB); HHV_CLOSE:=HHV(C, LB); BARS_LOW:=BARSLAST(C=LLV_LOW); BARS_LOW2:=REF(BARSLAST(C=LLV_LOW), -BARS_LOW-1); SECOND_BOT:=IF(BARS_LOW > 10 AND BARS_LOW2 > 10, 1, 0); BRK_LEVEL:=IF(SECOND_BOT, REF(HHV_CLOSE, -BARS_LOW), DRAWNULL); CROSS_BRK:=CROSS(C, BRK_LEVEL); SECOND_BOT AND CROSS_BRK;