1,OBV(资金流)
INPUT:N(9,1,100);
TYP:=(高+低+平仓)/ 3;
rs:= SUM(IF(TYP》 REF(TYP,1),TYP * VOL,0),N)/ SUM(IF(TYP << = REF(TYP,1),TYP * VOL,0), N);
MFI:= 100-100 /(1 + rs);
资金流向:MFI,LINETHICK0;
a1:= SUM(IF (MFI“ REF(MFI,1),VOL,IF(MFI” REF(MFI,1),-VOL,0)),0); {OBV}
RSV:=(a1 -LLV (a1,34))/(HHV(a1,34)-LLV(a1,34))* 100;
K:SMA(RSV,5,1);
D:SMA(K,3,1);
J:3 * K-2 * D;
50,彩色灰色,LINEDOT;
80, 颜色,LINEDOT;
2,OBV.MACD(能量)
INPUT:N(9,1,10);
LC:= REF(CLOSE ,1);
a1:= SMA(MAX(CLOSE-LC,0),N,1)/ SMA(ABS(CLOSE-LC),N,1)* 100; {RSI}
DIFF:-1 *(EMA(a1,26)-EMA(a1,12))/ 200,COLORCYAN;
DEA:-1 *(EMA( DIFF,9))/ 200,COLORRED;
MACD:2000 *(DIFF-DEA),COLORSTICK,LINETHICK2;
{Bar color}
s1 := MACD《 REF(MACD,1)和MACD》 0;
s2:= MACD《 REF(MACD,1)/ 2和MACD《 0;
STICKLINE(MACD “ = 0,MACD,0,8,1),颜色;
STICKLINE(s1,0,MACD,8,1),COLOR00ffff;
STICKLINE(s2,0, MACD,8,0),COLORffffff;
STICKLINE(MACD“ REF(MACD,1)和MACD” 0,0,MACD,8,1),COLORffff00;
80 ,COLORMAGENTA,LINEDOT;