源码
N:=19;
VAR1:=HHV(HIGH,N);
VAR2:=LLV(LOW,N);
阻力线:EMA((CLOSE-VAR2)/(VAR1-VAR2),21)-0.5,COLORF0F000,LINETHICK2;
操作线:EMA((CLOSE-VAR2)/(VAR1-VAR2),5)-0.5,colorred,LINETHICK2;
DRAWTEXT(CROSS(操作线,阻力线) AND 阻力线<0.1,阻力线,'突破'),coloryellow;
DRAWTEXT(CROSS(阻力线,操作线) AND 阻力线>0.25,阻力线,'破位'),colorgreen;
红绿棒:(操作线-阻力线),COLORSTICK;
MID:=(3*CLOSE+LOW+OPEN+HIGH)/6;
主力:=(20*MID+19*REF(MID,1)+18*REF(MID,2)+17*REF(MID,3)+
16*REF(MID,4)+15*REF(MID,5)+14*REF(MID,6)+
13*REF(MID,7)+12*REF(MID,8)+11*REF(MID,9)+
10*REF(MID,10)+9*REF(MID,11)+8*REF(MID,12)+
7*REF(MID,13)+6*REF(MID,14)+5*REF(MID,15)+
4*REF(MID,16)+3*REF(MID,17)+2*REF(MID,18)+REF(MID,20))/210,colorred;
IF(主力>=REF(主力,1),主力,DRAWNULL),colorred,LINETHICK2;
IF(主力<=REF(主力,1),主力,DRAWNULL),colorgreen,LINETHICK2;