基柱是倍量:=1; {1=倍量,0=小倍量;}
基柱类型:=1; {0=长阳,1=将军柱,2=次黄金柱,3=黄金柱,4=标准黄金柱;}
梯周期至少:=5; {每个黄金梯至少的周期宽度;}
N日内有信号:=1; {例如,取3时,表示前天\昨天\今天,3天内任何一天有符合条件的,都会选出}
HJ_1:=MIN(CLOSE,OPEN);
HJ_2:=基柱类型;
HJ_3:=LLV(CLOSE,3)>=REF(HJ_1,3);
HJ_4:=IF(基柱是倍量=1,1.8,1.1);
HJ_5:=VOL>=REF(VOL,1)*HJ_4;
HJ_6:=CLOSE/REF(CLOSE,1)>1.02 OR CLOSE/OPEN>1.02;
HJ_7:=REF(HJ_6,3) AND HJ_3;
HJ_8:=CLOSE>REF(CLOSE,1);
HJ_9:=CLOSE>REF(MAX(CLOSE,OPEN),1) AND HJ_6;
HJ_10:=HJ_5 AND HJ_9;
HJ_11:=MA(VOL,3)<=REF(VOL,3)*1.03;
HJ_12:=REF(HJ_10,3) AND HJ_3;
HJ_13:=MA(CLOSE,3)>=REF(CLOSE,3) AND CLOSE>=REF(CLOSE,3);
HJ_14:=COUNT(HJ_8 OR CLOSE>OPEN,3)=3;
HJ_15:=HHV(VOL,3)<=REF(VOL,3)*1.03;
HJ_16:=HJ_12 AND HJ_13 AND HJ_11;
HJ_17:=LLV(CLOSE,3)>=REF(CLOSE,3);
HJ_18:=HJ_16 AND HJ_17 AND HJ_15;
HJ_19:=COUNT(HJ_8,3)=3;
HJ_20:=COUNT(VOL<REF(VOL,1),3)=3;
HJ_21:=HJ_18 AND HJ_19 AND HJ_20;
HJ_22:=IF(HJ_2=1,HJ_12,IF(HJ_2=2,HJ_16,IF(HJ_2=3,HJ_18,IF(HJ_2=4,HJ_21,HJ_7))));
HJ_23:=BARSLAST(HJ_22);
HJ_24:=REF(LOW,HJ_23+3);
HJ_25:=HJ_24;
HJ_26:=LLV(CLOSE,HJ_23)>=HJ_25 AND HJ_23>=梯周期至少-2;
HJ_27:=HJ_26;
HJ_28:=REF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