{强弱macd}
廿个股: (C-REF(C,20))/REF(C,20)*100,COLOR4080FF,NODRAW;
廿大盘: (INDEXC-REF(INDEXC,20))/REF(INDEXC,20)*100,COLORFF80FF,NODRAW;
大盘1:=(EMA(INDEXC,12)/EMA(INDEXC,26)-1)*1000;
个股DIF:(EMA(CLOSE,12)/EMA(CLOSE,26)-1)*1000,COLORFFFFFF;
大盘DIF:IF(BACKSET(ISLASTBAR,40),大盘1,DRAWNULL)*
IF(PERIOD=5,1, {日}
DRAWNULL),COLORFFFFFF,DOTLINE;
A11:=IF(BACKSET(ISLASTBAR,60),个股DIF,DRAWNULL);
A22:=IF(BACKSET(ISLASTBAR,60),大盘1,DRAWNULL);
个股DEA:EMA(个股DIF,5),COLORYELLOW,LINETHICK1;
大盘DEA:
IF(PERIOD=5,EMA(大盘DIF,5), {日}
{1F}DRAWNULL),COLORFF00FF,LINETHICK2;
GG:=EMA(A11,5)-REF(EMA(A11,5),1);
DP:=EMA(A22,5)-REF(EMA(A22,5),1);
强弱值:IF(PERIOD=7,(GG-DP)*1.5, {月}
IF(PERIOD=6,(GG-DP)*1.1, {周}
IF(PERIOD=5,(GG-DP)*4, {日}
{1F}DRAWNULL))),COLOR0080FF,NODRAW;
{下面8句画彩色柱}
CDA:=强弱值0;
CDB:=强弱值>=REF(强弱值,1) AND 强弱值>0;
CDC:=强弱值>REF(强弱值,1) AND 强弱值<0;
CDD:=强弱值<=REF(强弱值,1) AND 强弱值<0;
STICKLINE(CDB,0,强弱值,0.5,0),COLOREE00EE;
STICKLINE(CDA,0,强弱值,0.5,0),COLOR0080FF;
STICKLINE(CDC,0,强弱值,0.5,0),COLORC080FF;
STICKLINE(CDD,0,强弱值,0.5,0),COLOR00FF00;
个股MACD:
IF(PERIOD=7,(个股DIF-EMA(个股DIF,9))*2, {月}
IF(PERIOD=6,(个股DIF-EMA(个股DIF,9))*2, {周}
IF(PERIOD=5,(个股DIF-EMA(个股DIF,9))*2, {日}
IF(PERIOD=4,(个股DIF-EMA(个股DIF,9))*2,{60F}
IF(PERIOD=3,(个股DIF-EMA(个股DIF,9))*2,{30F}
IF(PERIOD=2,(个股DIF-EMA(个股DIF,9))*2,{15F}
IF(PERIOD=1,(个股DIF-EMA(个股DIF,9))*2,{5F}
IF(PERIOD=0,(个股DIF-EMA(个股DIF,9))*2,{1F}0)))))))),COLORRED,COLORSTICK;
强弱度排序:强弱值*IF(强弱值>=REF(强弱值,1) AND 强弱值>0,1,DRAWNULL),COLORC080FF,NODRAW;