N1:=SYSPARAM(3);
NN:=N1-SYSPARAM(2)+1;
HH:=HHV(C,NN);
LL:=LLV(C,NN);
最高:=HH[N1];
最低:=LL[N1];
RCC:=最高*1.05-(最高*1.05-最低*1)*0.1;//MACD放在主图上边的0轴定性
限制显示K线面积:=RANGE(BARPOS,SYSPARAM(3)-120,SYSPARAM(3)+1);//限制在120个K线范围内,可自行调节
FILLRGN(DIFZ>DEAZ AND 限制显示K线面积,DIFZ*5/2+RCC,EMA(DIFZ*5/2+RCC,9)),COLORFF0080;
FILLRGN(DIFZ<=DEAZ AND 限制显示K线面积,DIFZ*5/2+RCC,EMA(DIFZ*5/2+RCC,9)),COLORGRAY;
{以上是DIFF/DEA画色带}
STICKLINE((RCC+MACDZ)>RCC AND (RCC+MACDZ)<=REF(RCC+MACDZ,1) AND 限制显示K线面积,RCC,RCC+MACDZ,5,0),COLOR400080;
STICKLINE((RCC+MACDZ)>RCC AND (RCC+MACDZ)>REF(RCC+MACDZ,1) AND 限制显示K线面积,RCC,RCC+MACDZ,5,0),COLOR00FFFF;
STICKLINE((RCC+MACDZ)<=RCC AND (RCC+MACDZ)<=REF(RCC+MACDZ,1) AND 限制显示K线面积,RCC,RCC+MACDZ,5,0),COLOR008080;
STICKLINE((RCC+MACDZ)<=RCC AND (RCC+MACDZ)>REF(RCC+MACDZ,1) AND 限制显示K线面积,RCC,RCC+MACDZ,5,0),COLORC080FF;
{以上显示柱子}
PARTLINE(限制显示K线面积,EMA(DIFZ*5/2+RCC,9)),COLORFFFFFF,LINETHICK1,PRECISION2;
PARTLINE(限制显示K线面积,DIFZ*5/2+RCC),COLORRED,LINETHICK1,PRECISION2;
PARTLINE((DIFZ*5/2+RCC)<=REF(DIFZ*5/2+RCC,1) AND 限制显示K线面积,DIFZ*5/2+RCC),COLORFFF000,LINETHICK1,PRECISION2;
{以上是显示DIFF和DEA}
N1:=SYSPARAM(3);
NN:=N1-SYSPARAM(2)+1;
HH:=HHV(C,NN);
LL:=LLV(C,NN);
最高:=HH[N1];
最低:=LL[N1];
RCC:=最低*0.95-(最高*1.05-最低*0.95)*0.1;//MACD放在主图下边的0轴定性
限制显示K线面积:=RANGE(BARPOS,SYSPARAM(3)-120,SYSPARAM(3)+1);//限制在120个K线范围内,可自行调节
FILLRGN(DIFZ>DEAZ AND 限制显示K线面积,DIFZ*5/2+RCC,EMA(DIFZ*5/2+RCC,9)),COLORFF0080;
FILLRGN(DIFZ<=DEAZ AND 限制显示K线面积,DIFZ*5/2+RCC,EMA(DIFZ*5/2+RCC,9)),COLORGRAY;
{以上是DIFF/DEA画色带}
STICKLINE((RCC+MACDZ)>RCC AND (RCC+MACDZ)<=REF(RCC+MACDZ,1) AND 限制显示K线面积,RCC,RCC+MACDZ,5,0),COLOR400080;
STICKLINE((RCC+MACDZ)>RCC AND (RCC+MACDZ)>REF(RCC+MACDZ,1) AND 限制显示K线面积,RCC,RCC+MACDZ,5,0),COLOR00FFFF;
STICKLINE((RCC+MACDZ)<=RCC AND (RCC+MACDZ)<=REF(RCC+MACDZ,1) AND 限制显示K线面积,RCC,RCC+MACDZ,5,0),COLOR008080;
STICKLINE((RCC+MACDZ)<=RCC AND (RCC+MACDZ)>REF(RCC+MACDZ,1) AND 限制显示K线面积,RCC,RCC+MACDZ,5,0),COLORC080FF;
{以上显示柱子}
PARTLINE(限制显示K线面积,EMA(DIFZ*5/2+RCC,9)),COLORFFFFFF,LINETHICK1,PRECISION2;
PARTLINE(限制显示K线面积,DIFZ*5/2+RCC),COLORRED,LINETHICK1,PRECISION2;
PARTLINE((DIFZ*5/2+RCC)<=REF(DIFZ*5/2+RCC,1) AND 限制显示K线面积,DIFZ*5/2+RCC),COLORFFF000,LINETHICK1,PRECISION2;
{以上是显示DIFF和DEA}