gitee.com/quant1x/engine@v1.8.4/factors/feature_box_breaks.tdx (about)

     1  {T05: 有效突破平台, V1.1.3 2023-08-17}
     2  {倍量1, 以5日均量线的2倍计算}
     3  ICON_B_RATIO:=0.999;
     4  ICON_S_RATIO:=1.029;
     5  VRATIO:=2.00;
     6  BL1:=VOL/REF(VOL,1);
     7  BOXH:=MAX(OPEN,CLOSE);
     8  BOXL:=MIN(OPEN,CLOSE);
     9  
    10  BLN1:=BARSLAST(BL1>=VRATIO AND CLOSE>=OPEN),NODRAW;
    11  倍量周期:BLN1,NODRAW;
    12  BLN:=IFF(BLN1>=0,BLN1,BLN1),NODRAW;
    13  BLH:=IFF(BLN=0,BOXH,REF(BOXH,BLN)),DOTLINE;
    14  BLL:=IFF(BLN=0,BOXL,REF(BOXL,BLN)),DOTLINE;
    15  {为HHV修复BLN1的值,需要+1}
    16  BLYL:=IFF(BLN=0,HIGH,HHV(HIGH,BLN+1));
    17  
    18  倍量H:IFF(BLN=0,REF(BLH,1),BLH),DOTLINE;
    19  倍量L:IFF(BLN=0,REF(BLL,1),BLL),DOTLINE;
    20  倍量压力:BLYL,DOTLINE;
    21  
    22  MA3:MA(CLOSE,3),COLORCYAN;
    23  MA5:MA(CLOSE,5),COLOR0CAEE6;
    24  MA10:MA(CLOSE,10);
    25  MA20:MA(CLOSE,20);
    26  
    27  {绘制买入信号}
    28  B:CROSS(CLOSE,倍量H),COLORRED,NODRAW;
    29  DRAWICON(B,LOW*ICON_B_RATIO,1);
    30  
    31  {绘制卖出信号}
    32  S:CROSS(MA3,CLOSE),NODRAW;
    33  DRAWICON(S,HIGH*ICON_S_RATIO,2);
    34  
    35  BLV1:=HHV(VOL,BLN);
    36  BLHV:IFF(BLN=0,VOL,BLV1),NODRAW;
    37  
    38  SL:=VOL/BLHV;
    39  SLN:BARSLAST(SL<=0.5),NODRAW;
    40  
    41  均价:AMOUNT/VOL/100,COLORWHITE,DOTLINE,NODRAW;
    42  D:=MA5>REF(MA5,1) AND CLOSE>=MA5;
    43  K:=MA5<=REF(MA5,1) OR CLOSE<MA5;
    44  FD:=BARSLASTCOUNT(D);
    45  FK:=BARSLASTCOUNT(K);
    46  多空:IFF(FD>0,FD,-1*FK),NODRAW;