input:N(20,1,999),P(2,0.1,10);
FO:=OPEN;
FH:=HIGH;
FL:=LOW;
FC:=CLOSE;
KK:=IF(FC>=FO AND (FC>=REF(FC,1) OR REF(FC,1)>=REF(FO,1)),1,IF(FC
KKS1:=KK=1 AND FC>=FO OR KK=1 AND FC
KKS2:=KK<=0 AND FC>=FO OR KK<=0 AND FC
D:=(FO+FC)/2;
今转:=IF(KK=1,MIN(FC,FO),IF(KK=-1,MAX(FC,FO),IF(REF(KK,1)=1,MIN(FC,FO),IF(REF(KK,1)=-1,MAX(FC,FO),(FC+FO)/2))));
HL:=EMA(HIGH,5);
LL:=EMA(LOW,5);
CH:=crOSS(CLOSE,HL);
CL:=-CROSS(LL,CLOSE);
TF:=IF(CH,CH,IF(CROSS(LL,CLOSE),CL,0));
UD:=REF(TF,BArslAST(TF));
霸王控盘线:=IF(UD>0,LL,HL);
PARTLINE(1,霸王控盘线),LINETHICK2,colorFFFF;
PARTLINE(UD=1 AND REF(UD,1)=1,LL),LINETHICK2,colorFF;
PARTLINE(UD=-1 AND REF(UD,1)=-1 ,HL),LINETHICK2,colorFF00;