网友求助:
请老师帮忙修改短均线颜色,要求短均今天大于前天时变成红色,其它还是绿色,谢谢.
OBV0:=SUM(IF(CLOSE>REF(CLOSE,1),VOL,IF(CLOSE<REF(CLOSE,1),-VOL,0)),0);
OBV:=OBV0/100000;
MA30:=MA(OBV,30);
SUB:=OBV-MA30;
短均:EMA(SUB,5),COLORGREEN;
解答如下:
OBV0:=SUM(IF(CLOSE>REF(CLOSE,1),VOL,IF(CLOSE<REF(CLOSE,1),-VOL,0)),0);
OBV:=OBV0/100000;
MA30:=MA(OBV,30);
SUB:=OBV-MA30;
短均:EMA(SUB,5),COLORGREEN;
PARTLINE(短均,短均>ref(短均,1),RGB(255,0,0));