NN:=120;
HH:=HHV(V*TT,NN);
LL:=LLV(V,NN);
最高:=CONST(HH);
最低:=CONST(LL);
最高2:=CONST(HHV(H,NN));
最低2:=CONST(LLV(L,NN));
PP:=IF((最高2*0.9-(最高2-最低2)*0.5) CONST(LLV(L,20)),0.9,IF((最高2*0.9-(最高2-最低2)*0.5) CONST(LLV(L,50)),0.7,0.6)),NODRAW;
RCC1:=最高2*0.9-(最高2-最低2)*PP;
最低3:=MIN(RCC1,最低2);
AA:=最低3;
MA5:=EMA(C,5),NODRAW;
MAR5:=SMA(C,5,1),COLORYELLOW,LINETHICK4;
MA20:MA(C,20),COLORRED,LINETHICK2;
MA55:MA(C,55),COLORFF00FF,LINETHICK2;
DRAWBAND(MAR5,RGB(0,200,200),MA5,RGB(200,0,0));
IF(MA20 REF(MA20,1),MA20,DRAWNULL),COLOR00FFFF,LINETHICK2;
IF(MA55 REF(MA55,1),MA55,DRAWNULL),COLORFFFFFF,LINETHICK2;
IF(MA20 =REF(MA20,1),AA-0.000*AA,DRAWNULL),COLORRED,LINETHICK8;
IF(MA55 =REF(MA55,1),AA-0.020*AA,DRAWNULL),COLORFF00FF,LINETHICK8;
DRAWICON(CROSS(C,MA20),MA20,5);
DRAWTEXT(CROSS(C,MA20),MA20*0.995,'买入');
DRAWICON(CROSS(MA20,MA55),MA20,23);
DRAWTEXT(CROSS(MA20,MA55),MA20*0.995,'加仓');
DRAWTEXT_FIX(1,0.1,0.66,0,'【红色----MA20走平上翘----介入】'),COLORYELLOW;
DRAWTEXT_FIX(1,0.1,0.72,0,'【粉色----MA55走平上翘----介入】'),COLORGREEN;