通达信快乐王子公式
N:=13;
TB:=IF(HIGH>REF(CLOSE,1),HIGH-REF(CLOSE,1)+CLOSE-LOW,CLOSE-LOW);
TS:=IF(REF(CLOSE,1)>LOW,REF(CLOSE,1)-LOW+HIGH-CLOSE,HIGH-CLOSE);
VOL_:=(TB-TS)*VOL/(TB+TS)/10000;
VOL_0:=DMA(VOL_,0.1);
VOL_1:=DMA(VOL_,0.05);
RES1:=VOL_0-VOL_1;
LON:SUM(RES1,0),COLORSTICK;
LON;
MA1:MA(LON,N);
CROSS(LON,0)*10;
CROSS(LON,MA1)*5;