BBI和EBBI的設計中用的是MA,導致了新股上市24日內BBI不顯示,新股上市162日內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);
(南方財富網(wǎng)SOUTHMONEY.COM)