通達(dá)信股票公式之BBI、EBBI指標(biāo)改進(jìn)
BBI和EBBI的設(shè)計(jì)中用的是MA,導(dǎo)致了新股上市24日內(nèi)BBI不顯示,新股上市162日內(nèi)EBBI不顯示,如果用EMA取代新股上市一定時(shí)期的MA則可以很好地解決這一問(wèn)題。以下是源碼:
CR:=(C*3+H+L+O)/6;
BB1:=(EMA(CR,3)+EMA(CR,6)+EMA(CR,12)*3+EMA(CR,24))/6;
BB2:=(MA(C,3)+MA(C,6)+MA(C,12)+MA(C,24))/4;
BBI:IF(BARSCOUNT(C)《24,BB1,BB2);
EBB1:=(EMA(CR,6)+EMA(CR,18)+EMA(CR,54)*3+EMA(CR,162))/6;
EBB2:=(MA(C,6)+MA(C,18)+MA(C,54)+MA(C,162))/4;
EBBI:IF(BARSCOUNT(C)《162,EBB1,EBB2);
(南方財(cái)富網(wǎng)SOUTHMONEY.COM)