红钻:=1;
多线:=27;
空线:=55;
多方力度:=(3*SMA((CLOSE-LLV(LOW,多线))/(HHV(HIGH,多线)-LLV(LOW,多线))*100,5,1)-2*SMA(SMA((CLOSE-LLV(LOW,多线))/(HHV(HIGH,27)-LLV(LOW,多线))*100,5,1),3,1));
空方力度:=100*(HHV(HIGH,空线)-CLOSE)/(HHV(HIGH,空线)-LLV(LOW,空线));
量比:=V/REF(MA(V,1),1);
红钻石:=C/REF(C,1)>1.03 AND 量比>1.1 AND crOSS(多方力度,空方力度)*红钻;
红钻XG:红钻石;